/// <summary>Snippet for GetAutoscalingPolicyAsync</summary> public async Task GetAutoscalingPolicyAsync() { // Snippet: GetAutoscalingPolicyAsync(string, CallSettings) // Additional: GetAutoscalingPolicyAsync(string, CancellationToken) // Create client AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync(); // Initialize request argument(s) string name = "projects/[PROJECT]/locations/[LOCATION]/autoscalingPolicies/[AUTOSCALING_POLICY]"; // Make the request AutoscalingPolicy response = await autoscalingPolicyServiceClient.GetAutoscalingPolicyAsync(name); // End snippet }
/// <summary>Snippet for GetAutoscalingPolicyAsync</summary> public async Task GetAutoscalingPolicyResourceNamesAsync() { // Snippet: GetAutoscalingPolicyAsync(AutoscalingPolicyName, CallSettings) // Additional: GetAutoscalingPolicyAsync(AutoscalingPolicyName, CancellationToken) // Create client AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync(); // Initialize request argument(s) AutoscalingPolicyName name = AutoscalingPolicyName.FromProjectLocationAutoscalingPolicy("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"); // Make the request AutoscalingPolicy response = await autoscalingPolicyServiceClient.GetAutoscalingPolicyAsync(name); // End snippet }
/// <summary>Snippet for GetAutoscalingPolicyAsync</summary> public async Task GetAutoscalingPolicyAsync() { // Snippet: GetAutoscalingPolicyAsync(string,CallSettings) // Additional: GetAutoscalingPolicyAsync(string,CancellationToken) // Create client AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = await AutoscalingPolicyServiceClient.CreateAsync(); // Initialize request argument(s) string formattedName = new AutoscalingPolicyName("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]").ToString(); // Make the request AutoscalingPolicy response = await autoscalingPolicyServiceClient.GetAutoscalingPolicyAsync(formattedName); // End snippet }