示例#1
0
        /// <summary>Snippet for SetNamedPortsAsync</summary>
        public async Task SetNamedPortsAsync()
        {
            // Snippet: SetNamedPortsAsync(string, string, string, InstanceGroupsSetNamedPortsRequest, CallSettings)
            // Additional: SetNamedPortsAsync(string, string, string, InstanceGroupsSetNamedPortsRequest, CancellationToken)
            // Create client
            InstanceGroupsClient instanceGroupsClient = await InstanceGroupsClient.CreateAsync();

            // Initialize request argument(s)
            string project       = "";
            string zone          = "";
            string instanceGroup = "";
            InstanceGroupsSetNamedPortsRequest instanceGroupsSetNamedPortsRequestResource = new InstanceGroupsSetNamedPortsRequest();
            // Make the request
            Operation response = await instanceGroupsClient.SetNamedPortsAsync(project, zone, instanceGroup, instanceGroupsSetNamedPortsRequestResource);

            // End snippet
        }
示例#2
0
        /// <summary>Snippet for SetNamedPortsAsync</summary>
        public async Task SetNamedPortsRequestObjectAsync()
        {
            // Snippet: SetNamedPortsAsync(SetNamedPortsInstanceGroupRequest, CallSettings)
            // Additional: SetNamedPortsAsync(SetNamedPortsInstanceGroupRequest, CancellationToken)
            // Create client
            InstanceGroupsClient instanceGroupsClient = await InstanceGroupsClient.CreateAsync();

            // Initialize request argument(s)
            SetNamedPortsInstanceGroupRequest request = new SetNamedPortsInstanceGroupRequest
            {
                Zone          = "",
                RequestId     = "",
                InstanceGroup = "",
                Project       = "",
                InstanceGroupsSetNamedPortsRequestResource = new InstanceGroupsSetNamedPortsRequest(),
            };
            // Make the request
            Operation response = await instanceGroupsClient.SetNamedPortsAsync(request);

            // End snippet
        }