Exemple #1
0
        /// <summary>Snippet for SetLabelsAsync</summary>
        public async Task SetLabelsAsync()
        {
            // Snippet: SetLabelsAsync(string, string, string, RegionSetLabelsRequest, CallSettings)
            // Additional: SetLabelsAsync(string, string, string, RegionSetLabelsRequest, CancellationToken)
            // Create client
            ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();

            // Initialize request argument(s)
            string project  = "";
            string region   = "";
            string resource = "";
            RegionSetLabelsRequest regionSetLabelsRequestResource = new RegionSetLabelsRequest();
            // Make the request
            Operation response = await forwardingRulesClient.SetLabelsAsync(project, region, resource, regionSetLabelsRequestResource);

            // End snippet
        }
Exemple #2
0
        /// <summary>Snippet for SetLabelsAsync</summary>
        public async Task SetLabelsRequestObjectAsync()
        {
            // Snippet: SetLabelsAsync(SetLabelsForwardingRuleRequest, CallSettings)
            // Additional: SetLabelsAsync(SetLabelsForwardingRuleRequest, CancellationToken)
            // Create client
            ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();

            // Initialize request argument(s)
            SetLabelsForwardingRuleRequest request = new SetLabelsForwardingRuleRequest
            {
                RequestId = "",
                Region    = "",
                Resource  = "",
                Project   = "",
                RegionSetLabelsRequestResource = new RegionSetLabelsRequest(),
            };
            // Make the request
            Operation response = await forwardingRulesClient.SetLabelsAsync(request);

            // End snippet
        }