Microsoft.Azure.Commands.Network.ChildResourceHelper.GetResourceNotSetId C# (CSharp) Method

GetResourceNotSetId() public static method

public static GetResourceNotSetId ( string subscriptionId, string resource, string resourceName ) : string
subscriptionId string
resource string
resourceName string
return string
        public static string GetResourceNotSetId(string subscriptionId, string resource, string resourceName)
        {
            return string.Format(
                Microsoft.Azure.Commands.Network.Properties.Resources.LoadBalancerChildResourceId,
                subscriptionId,
                Microsoft.Azure.Commands.Network.Properties.Resources.ResourceGroupNotSet,
                Microsoft.Azure.Commands.Network.Properties.Resources.LoadBalancerNameNotSet,
                resource,
                resourceName);
        }

Usage Example

Example #1
0
        public override void Execute()
        {
            base.Execute();

            var inboundNatRule = new PSInboundNatRule();

            inboundNatRule.Name         = this.Name;
            inboundNatRule.Protocol     = this.Protocol;
            inboundNatRule.FrontendPort = this.FrontendPort;
            inboundNatRule.BackendPort  = this.BackendPort;
            if (this.IdleTimeoutInMinutes > 0)
            {
                inboundNatRule.IdleTimeoutInMinutes = this.IdleTimeoutInMinutes;
            }
            inboundNatRule.EnableFloatingIP = this.EnableFloatingIP.IsPresent;

            if (!string.IsNullOrEmpty(this.FrontendIpConfigurationId))
            {
                inboundNatRule.FrontendIPConfiguration = new PSResourceId()
                {
                    Id = this.FrontendIpConfigurationId
                };
            }

            inboundNatRule.Id =
                ChildResourceHelper.GetResourceNotSetId(
                    this.NetworkClient.NetworkManagementClient.SubscriptionId,
                    Microsoft.Azure.Commands.Network.Properties.Resources.LoadBalancerInBoundNatRuleName,
                    this.Name);

            WriteObject(inboundNatRule);
        }
All Usage Examples Of Microsoft.Azure.Commands.Network.ChildResourceHelper::GetResourceNotSetId