Ejemplo n.º 1
0
 /// <summary>Snippet for SetLabels</summary>
 public void SetLabelsRequestObject()
 {
     // Snippet: SetLabels(SetLabelsForwardingRuleRequest, CallSettings)
     // Create client
     ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
     // Initialize request argument(s)
     SetLabelsForwardingRuleRequest request = new SetLabelsForwardingRuleRequest
     {
         RequestId = "",
         Region    = "",
         Resource  = "",
         Project   = "",
         RegionSetLabelsRequestResource = new RegionSetLabelsRequest(),
     };
     // Make the request
     Operation response = forwardingRulesClient.SetLabels(request);
     // End snippet
 }
Ejemplo n.º 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
        }