Пример #1
0
        /// <summary>Snippet for InsertAsync</summary>
        public async Task InsertAsync()
        {
            // Snippet: InsertAsync(string, string, ForwardingRule, CallSettings)
            // Additional: InsertAsync(string, string, ForwardingRule, CancellationToken)
            // Create client
            ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();

            // Initialize request argument(s)
            string         project = "";
            string         region  = "";
            ForwardingRule forwardingRuleResource = new ForwardingRule();
            // Make the request
            Operation response = await forwardingRulesClient.InsertAsync(project, region, forwardingRuleResource);

            // End snippet
        }
Пример #2
0
        /// <summary>Snippet for InsertAsync</summary>
        public async Task InsertRequestObjectAsync()
        {
            // Snippet: InsertAsync(InsertForwardingRuleRequest, CallSettings)
            // Additional: InsertAsync(InsertForwardingRuleRequest, CancellationToken)
            // Create client
            ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();

            // Initialize request argument(s)
            InsertForwardingRuleRequest request = new InsertForwardingRuleRequest
            {
                RequestId = "",
                Region    = "",
                Project   = "",
                ForwardingRuleResource = new ForwardingRule(),
            };
            // Make the request
            Operation response = await forwardingRulesClient.InsertAsync(request);

            // End snippet
        }