コード例 #1
0
        /// <summary>Snippet for GetDeploymentAsync</summary>
        public async Task GetDeploymentResourceNamesAsync()
        {
            // Snippet: GetDeploymentAsync(DeploymentName, CallSettings)
            // Additional: GetDeploymentAsync(DeploymentName, CancellationToken)
            // Create client
            DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();

            // Initialize request argument(s)
            DeploymentName name = DeploymentName.FromProjectLocationAgentEnvironmentDeployment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]");
            // Make the request
            Deployment response = await deploymentsClient.GetDeploymentAsync(name);

            // End snippet
        }
コード例 #2
0
        /// <summary>Snippet for GetDeploymentAsync</summary>
        public async Task GetDeploymentAsync()
        {
            // Snippet: GetDeploymentAsync(string, CallSettings)
            // Additional: GetDeploymentAsync(string, CancellationToken)
            // Create client
            DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();

            // Initialize request argument(s)
            string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/deployments/[DEPLOYMENT]";
            // Make the request
            Deployment response = await deploymentsClient.GetDeploymentAsync(name);

            // End snippet
        }