Пример #1
0
        /// <summary>Snippet for CreateIngressRuleAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CreateIngressRuleRequestObjectAsync()
        {
            // Create client
            FirewallClient firewallClient = await FirewallClient.CreateAsync();

            // Initialize request argument(s)
            CreateIngressRuleRequest request = new CreateIngressRuleRequest
            {
                Parent = "",
                Rule   = new FirewallRule(),
            };
            // Make the request
            FirewallRule response = await firewallClient.CreateIngressRuleAsync(request);
        }
Пример #2
0
        /// <summary>Snippet for CreateIngressRuleAsync</summary>
        public async Task CreateIngressRuleRequestObjectAsync()
        {
            // Snippet: CreateIngressRuleAsync(CreateIngressRuleRequest, CallSettings)
            // Additional: CreateIngressRuleAsync(CreateIngressRuleRequest, CancellationToken)
            // Create client
            FirewallClient firewallClient = await FirewallClient.CreateAsync();

            // Initialize request argument(s)
            CreateIngressRuleRequest request = new CreateIngressRuleRequest
            {
                Parent = "",
                Rule   = new FirewallRule(),
            };
            // Make the request
            FirewallRule response = await firewallClient.CreateIngressRuleAsync(request);

            // End snippet
        }