All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.opsworks.AWSOpsWorksClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS OpsWorks module holds the client classes that are used for communicating with AWS OpsWorks Service

There is a newer version: 1.11.7
Show newest version
/*
 * Copyright 2011-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not
 * use this file except in compliance with the License. A copy of the License is
 * located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */
package com.amazonaws.services.opsworks;

import org.w3c.dom.*;

import java.net.*;
import java.util.*;
import java.util.Map.Entry;

import org.apache.commons.logging.*;

import com.amazonaws.*;
import com.amazonaws.auth.*;
import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.internal.auth.*;
import com.amazonaws.metrics.*;
import com.amazonaws.regions.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.protocol.json.*;
import com.amazonaws.util.AWSRequestMetrics.Field;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.services.opsworks.waiters.AWSOpsWorksWaiters;

import com.amazonaws.AmazonServiceException;

import com.amazonaws.services.opsworks.model.*;
import com.amazonaws.services.opsworks.model.transform.*;

/**
 * Client for accessing AWS OpsWorks. All service calls made using this client
 * are blocking, and will not return until the service call completes.
 * 

* AWS OpsWorks *

* Welcome to the AWS OpsWorks API Reference. This guide provides * descriptions, syntax, and usage examples for AWS OpsWorks actions and data * types, including common parameters and error codes. *

*

* AWS OpsWorks is an application management service that provides an integrated * experience for overseeing the complete application lifecycle. For information * about this product, go to the AWS * OpsWorks details page. *

*

* SDKs and CLI *

*

* The most common way to use the AWS OpsWorks API is by using the AWS Command * Line Interface (CLI) or by using one of the AWS SDKs to implement * applications in your preferred language. For more information, see: *

* *

* Endpoints *

*

* AWS OpsWorks supports the following endpoints, all HTTPS. You must connect to * one of the following endpoints. Stacks can only be accessed or managed within * the endpoint in which they are created. *

*
    *
  • *

    * opsworks.us-east-1.amazonaws.com *

    *
  • *
  • *

    * opsworks.us-west-1.amazonaws.com *

    *
  • *
  • *

    * opsworks.us-west-2.amazonaws.com *

    *
  • *
  • *

    * opsworks.eu-west-1.amazonaws.com *

    *
  • *
  • *

    * opsworks.eu-central-1.amazonaws.com *

    *
  • *
  • *

    * opsworks.ap-northeast-1.amazonaws.com *

    *
  • *
  • *

    * opsworks.ap-northeast-2.amazonaws.com *

    *
  • *
  • *

    * opsworks.ap-south-1.amazonaws.com *

    *
  • *
  • *

    * opsworks.ap-southeast-1.amazonaws.com *

    *
  • *
  • *

    * opsworks.ap-southeast-2.amazonaws.com *

    *
  • *
  • *

    * opsworks.sa-east-1.amazonaws.com *

    *
  • *
*

* Chef Versions *

*

* When you call CreateStack, CloneStack, or UpdateStack we * recommend you use the ConfigurationManager parameter to specify * the Chef version. The recommended and default value for Linux stacks is * currently 12. Windows stacks use Chef 12.2. For more information, see Chef Versions. *

* *

* You can specify Chef 12, 11.10, or 11.4 for your Linux stack. We recommend * migrating your existing Linux stacks to Chef 12 as soon as possible. *

*
*/ @ThreadSafe public class AWSOpsWorksClient extends AmazonWebServiceClient implements AWSOpsWorks { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AWSOpsWorks.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "opsworks"; private volatile AWSOpsWorksWaiters waiters; /** * Client configuration factory providing ClientConfigurations tailored to * this client */ protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory(); private final SdkJsonProtocolFactory protocolFactory = new SdkJsonProtocolFactory( new JsonClientMetadata() .withProtocolVersion("1.1") .withSupportsCbor(false) .withSupportsIon(false) .addErrorMetadata( new JsonErrorShapeMetadata() .withErrorCode("ResourceNotFoundException") .withModeledClass( com.amazonaws.services.opsworks.model.ResourceNotFoundException.class)) .addErrorMetadata( new JsonErrorShapeMetadata() .withErrorCode("ValidationException") .withModeledClass( com.amazonaws.services.opsworks.model.ValidationException.class)) .withBaseServiceExceptionClass( com.amazonaws.services.opsworks.model.AWSOpsWorksException.class)); /** * Constructs a new client to invoke service methods on AWS OpsWorks. A * credentials provider chain will be used that searches for credentials in * this order: *
    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Instance profile credentials delivered through the Amazon EC2 * metadata service
  • *
* *

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @see DefaultAWSCredentialsProviderChain */ public AWSOpsWorksClient() { this(new DefaultAWSCredentialsProviderChain(), configFactory .getConfig()); } /** * Constructs a new client to invoke service methods on AWS OpsWorks. A * credentials provider chain will be used that searches for credentials in * this order: *

    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Instance profile credentials delivered through the Amazon EC2 * metadata service
  • *
* *

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @param clientConfiguration * The client configuration options controlling how this client * connects to AWS OpsWorks (ex: proxy settings, retry counts, etc.). * * @see DefaultAWSCredentialsProviderChain */ public AWSOpsWorksClient(ClientConfiguration clientConfiguration) { this(new DefaultAWSCredentialsProviderChain(), clientConfiguration); } /** * Constructs a new client to invoke service methods on AWS OpsWorks using * the specified AWS account credentials. * *

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when * authenticating with AWS services. */ public AWSOpsWorksClient(AWSCredentials awsCredentials) { this(awsCredentials, configFactory.getConfig()); } /** * Constructs a new client to invoke service methods on AWS OpsWorks using * the specified AWS account credentials and client configuration options. * *

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when * authenticating with AWS services. * @param clientConfiguration * The client configuration options controlling how this client * connects to AWS OpsWorks (ex: proxy settings, retry counts, etc.). */ public AWSOpsWorksClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) { super(clientConfiguration); this.awsCredentialsProvider = new StaticCredentialsProvider( awsCredentials); init(); } /** * Constructs a new client to invoke service methods on AWS OpsWorks using * the specified AWS account credentials provider. * *

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to * authenticate requests with AWS services. */ public AWSOpsWorksClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, configFactory.getConfig()); } /** * Constructs a new client to invoke service methods on AWS OpsWorks using * the specified AWS account credentials provider and client configuration * options. * *

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to * authenticate requests with AWS services. * @param clientConfiguration * The client configuration options controlling how this client * connects to AWS OpsWorks (ex: proxy settings, retry counts, etc.). */ public AWSOpsWorksClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, null); } /** * Constructs a new client to invoke service methods on AWS OpsWorks using * the specified AWS account credentials provider, client configuration * options, and request metric collector. * *

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to * authenticate requests with AWS services. * @param clientConfiguration * The client configuration options controlling how this client * connects to AWS OpsWorks (ex: proxy settings, retry counts, etc.). * @param requestMetricCollector * optional request metric collector */ public AWSOpsWorksClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector) { super(clientConfiguration, requestMetricCollector); this.awsCredentialsProvider = awsCredentialsProvider; init(); } /** * Constructs a new client to invoke service methods on AWS OpsWorks using * the specified parameters. * *

* All service calls made using this new client object are blocking, and * will not return until the service call completes. * * @param clientParams * Object providing client parameters. */ AWSOpsWorksClient(AwsSyncClientParams clientParams) { super(clientParams); this.awsCredentialsProvider = clientParams.getCredentialsProvider(); init(); } private void init() { setServiceNameIntern(DEFAULT_SIGNING_NAME); setEndpointPrefix(ENDPOINT_PREFIX); // calling this.setEndPoint(...) will also modify the signer accordingly setEndpoint("https://opsworks.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s .addAll(chainFactory .newRequestHandlerChain("/com/amazonaws/services/opsworks/request.handlers")); requestHandler2s .addAll(chainFactory .newRequestHandler2Chain("/com/amazonaws/services/opsworks/request.handler2s")); } /** *

* Assign a registered instance to a layer. *

*
    *
  • *

    * You can assign registered on-premises instances to any layer type. *

    *
  • *
  • *

    * You can assign registered Amazon EC2 instances only to custom layers. *

    *
  • *
  • *

    * You cannot use this action with instances that were created with AWS * OpsWorks. *

    *
  • *
*

* Required Permissions: To use this action, an AWS Identity and * Access Management (IAM) user must have a Manage permissions level for the * stack or an attached policy that explicitly grants permissions. For more * information on user permissions, see Managing User Permissions. *

* * @param assignInstanceRequest * @return Result of the AssignInstance operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.AssignInstance */ @Override public AssignInstanceResult assignInstance( AssignInstanceRequest assignInstanceRequest) { ExecutionContext executionContext = createExecutionContext(assignInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new AssignInstanceRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(assignInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new AssignInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Assigns one of the stack's registered Amazon EBS volumes to a specified * instance. The volume must first be registered with the stack by calling * RegisterVolume. After you register the volume, you must call * UpdateVolume to specify a mount point before calling * AssignVolume. For more information, see Resource Management. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param assignVolumeRequest * @return Result of the AssignVolume operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.AssignVolume */ @Override public AssignVolumeResult assignVolume( AssignVolumeRequest assignVolumeRequest) { ExecutionContext executionContext = createExecutionContext(assignVolumeRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new AssignVolumeRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(assignVolumeRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new AssignVolumeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Associates one of the stack's registered Elastic IP addresses with a * specified instance. The address must first be registered with the stack * by calling RegisterElasticIp. For more information, see Resource Management. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param associateElasticIpRequest * @return Result of the AssociateElasticIp operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.AssociateElasticIp */ @Override public AssociateElasticIpResult associateElasticIp( AssociateElasticIpRequest associateElasticIpRequest) { ExecutionContext executionContext = createExecutionContext(associateElasticIpRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new AssociateElasticIpRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(associateElasticIpRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new AssociateElasticIpResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Attaches an Elastic Load Balancing load balancer to a specified layer. * For more information, see Elastic Load Balancing. *

* *

* You must create the Elastic Load Balancing instance separately, by using * the Elastic Load Balancing console, API, or CLI. For more information, * see Elastic Load Balancing Developer Guide. *

*
*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param attachElasticLoadBalancerRequest * @return Result of the AttachElasticLoadBalancer operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.AttachElasticLoadBalancer */ @Override public AttachElasticLoadBalancerResult attachElasticLoadBalancer( AttachElasticLoadBalancerRequest attachElasticLoadBalancerRequest) { ExecutionContext executionContext = createExecutionContext(attachElasticLoadBalancerRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new AttachElasticLoadBalancerRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(attachElasticLoadBalancerRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler( new JsonOperationMetadata().withPayloadJson(true) .withHasStreamingSuccessResponse(false), new AttachElasticLoadBalancerResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a clone of a specified stack. For more information, see Clone a Stack. By default, all parameters are set to the values used * by the parent stack. *

*

* Required Permissions: To use this action, an IAM user must have an * attached policy that explicitly grants permissions. For more information * on user permissions, see Managing User Permissions. *

* * @param cloneStackRequest * @return Result of the CloneStack operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.CloneStack */ @Override public CloneStackResult cloneStack(CloneStackRequest cloneStackRequest) { ExecutionContext executionContext = createExecutionContext(cloneStackRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CloneStackRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(cloneStackRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new CloneStackResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates an app for a specified stack. For more information, see Creating Apps. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param createAppRequest * @return Result of the CreateApp operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.CreateApp */ @Override public CreateAppResult createApp(CreateAppRequest createAppRequest) { ExecutionContext executionContext = createExecutionContext(createAppRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateAppRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(createAppRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new CreateAppResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Runs deployment or stack commands. For more information, see Deploying Apps and Run Stack Commands. *

*

* Required Permissions: To use this action, an IAM user must have a * Deploy or Manage permissions level for the stack, or an attached policy * that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param createDeploymentRequest * @return Result of the CreateDeployment operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.CreateDeployment */ @Override public CreateDeploymentResult createDeployment( CreateDeploymentRequest createDeploymentRequest) { ExecutionContext executionContext = createExecutionContext(createDeploymentRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateDeploymentRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(createDeploymentRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new CreateDeploymentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates an instance in a specified stack. For more information, see Adding an Instance to a Layer. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param createInstanceRequest * @return Result of the CreateInstance operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.CreateInstance */ @Override public CreateInstanceResult createInstance( CreateInstanceRequest createInstanceRequest) { ExecutionContext executionContext = createExecutionContext(createInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateInstanceRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(createInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new CreateInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a layer. For more information, see How to Create a Layer. *

* *

* You should use CreateLayer for noncustom layer types such as PHP * App Server only if the stack does not have an existing layer of that * type. A stack can have at most one instance of each noncustom layer; if * you attempt to create a second instance, CreateLayer fails. A * stack can have an arbitrary number of custom layers, so you can call * CreateLayer as many times as you like for that layer type. *

*
*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param createLayerRequest * @return Result of the CreateLayer operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.CreateLayer */ @Override public CreateLayerResult createLayer(CreateLayerRequest createLayerRequest) { ExecutionContext executionContext = createExecutionContext(createLayerRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateLayerRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(createLayerRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new CreateLayerResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new stack. For more information, see Create a New Stack. *

*

* Required Permissions: To use this action, an IAM user must have an * attached policy that explicitly grants permissions. For more information * on user permissions, see Managing User Permissions. *

* * @param createStackRequest * @return Result of the CreateStack operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @sample AWSOpsWorks.CreateStack */ @Override public CreateStackResult createStack(CreateStackRequest createStackRequest) { ExecutionContext executionContext = createExecutionContext(createStackRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateStackRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(createStackRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new CreateStackResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new user profile. *

*

* Required Permissions: To use this action, an IAM user must have an * attached policy that explicitly grants permissions. For more information * on user permissions, see Managing User Permissions. *

* * @param createUserProfileRequest * @return Result of the CreateUserProfile operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @sample AWSOpsWorks.CreateUserProfile */ @Override public CreateUserProfileResult createUserProfile( CreateUserProfileRequest createUserProfileRequest) { ExecutionContext executionContext = createExecutionContext(createUserProfileRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateUserProfileRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(createUserProfileRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new CreateUserProfileResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a specified app. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param deleteAppRequest * @return Result of the DeleteApp operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DeleteApp */ @Override public DeleteAppResult deleteApp(DeleteAppRequest deleteAppRequest) { ExecutionContext executionContext = createExecutionContext(deleteAppRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteAppRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(deleteAppRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DeleteAppResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a specified instance, which terminates the associated Amazon EC2 * instance. You must stop an instance before you can delete it. *

*

* For more information, see Deleting Instances. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param deleteInstanceRequest * @return Result of the DeleteInstance operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DeleteInstance */ @Override public DeleteInstanceResult deleteInstance( DeleteInstanceRequest deleteInstanceRequest) { ExecutionContext executionContext = createExecutionContext(deleteInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteInstanceRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(deleteInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DeleteInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a specified layer. You must first stop and then delete all * associated instances or unassign registered instances. For more * information, see How to Delete a Layer. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param deleteLayerRequest * @return Result of the DeleteLayer operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DeleteLayer */ @Override public DeleteLayerResult deleteLayer(DeleteLayerRequest deleteLayerRequest) { ExecutionContext executionContext = createExecutionContext(deleteLayerRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteLayerRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(deleteLayerRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DeleteLayerResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a specified stack. You must first delete all instances, layers, * and apps or deregister registered instances. For more information, see Shut Down a Stack. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param deleteStackRequest * @return Result of the DeleteStack operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DeleteStack */ @Override public DeleteStackResult deleteStack(DeleteStackRequest deleteStackRequest) { ExecutionContext executionContext = createExecutionContext(deleteStackRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteStackRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(deleteStackRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DeleteStackResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a user profile. *

*

* Required Permissions: To use this action, an IAM user must have an * attached policy that explicitly grants permissions. For more information * on user permissions, see Managing User Permissions. *

* * @param deleteUserProfileRequest * @return Result of the DeleteUserProfile operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DeleteUserProfile */ @Override public DeleteUserProfileResult deleteUserProfile( DeleteUserProfileRequest deleteUserProfileRequest) { ExecutionContext executionContext = createExecutionContext(deleteUserProfileRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteUserProfileRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(deleteUserProfileRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DeleteUserProfileResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deregisters a specified Amazon ECS cluster from a stack. For more * information, see Resource Management. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack or an attached policy that * explicitly grants permissions. For more information on user permissions, * see http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security- * users.html. *

* * @param deregisterEcsClusterRequest * @return Result of the DeregisterEcsCluster operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DeregisterEcsCluster */ @Override public DeregisterEcsClusterResult deregisterEcsCluster( DeregisterEcsClusterRequest deregisterEcsClusterRequest) { ExecutionContext executionContext = createExecutionContext(deregisterEcsClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeregisterEcsClusterRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(deregisterEcsClusterRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DeregisterEcsClusterResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deregisters a specified Elastic IP address. The address can then be * registered by another stack. For more information, see Resource Management. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param deregisterElasticIpRequest * @return Result of the DeregisterElasticIp operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DeregisterElasticIp */ @Override public DeregisterElasticIpResult deregisterElasticIp( DeregisterElasticIpRequest deregisterElasticIpRequest) { ExecutionContext executionContext = createExecutionContext(deregisterElasticIpRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeregisterElasticIpRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(deregisterElasticIpRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DeregisterElasticIpResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deregister a registered Amazon EC2 or on-premises instance. This action * removes the instance from the stack and returns it to your control. This * action can not be used with instances that were created with AWS * OpsWorks. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param deregisterInstanceRequest * @return Result of the DeregisterInstance operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DeregisterInstance */ @Override public DeregisterInstanceResult deregisterInstance( DeregisterInstanceRequest deregisterInstanceRequest) { ExecutionContext executionContext = createExecutionContext(deregisterInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeregisterInstanceRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(deregisterInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DeregisterInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deregisters an Amazon RDS instance. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param deregisterRdsDbInstanceRequest * @return Result of the DeregisterRdsDbInstance operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DeregisterRdsDbInstance */ @Override public DeregisterRdsDbInstanceResult deregisterRdsDbInstance( DeregisterRdsDbInstanceRequest deregisterRdsDbInstanceRequest) { ExecutionContext executionContext = createExecutionContext(deregisterRdsDbInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeregisterRdsDbInstanceRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(deregisterRdsDbInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DeregisterRdsDbInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deregisters an Amazon EBS volume. The volume can then be registered by * another stack. For more information, see Resource Management. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param deregisterVolumeRequest * @return Result of the DeregisterVolume operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DeregisterVolume */ @Override public DeregisterVolumeResult deregisterVolume( DeregisterVolumeRequest deregisterVolumeRequest) { ExecutionContext executionContext = createExecutionContext(deregisterVolumeRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeregisterVolumeRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(deregisterVolumeRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DeregisterVolumeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes the available AWS OpsWorks agent versions. You must specify a * stack ID or a configuration manager. DescribeAgentVersions * returns a list of available agent versions for the specified stack or * configuration manager. *

* * @param describeAgentVersionsRequest * @return Result of the DescribeAgentVersions operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeAgentVersions */ @Override public DescribeAgentVersionsResult describeAgentVersions( DescribeAgentVersionsRequest describeAgentVersionsRequest) { ExecutionContext executionContext = createExecutionContext(describeAgentVersionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeAgentVersionsRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(describeAgentVersionsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeAgentVersionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Requests a description of a specified set of apps. *

* *

* You must specify at least one of the parameters. *

*
*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack, or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeAppsRequest * @return Result of the DescribeApps operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeApps */ @Override public DescribeAppsResult describeApps( DescribeAppsRequest describeAppsRequest) { ExecutionContext executionContext = createExecutionContext(describeAppsRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeAppsRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(describeAppsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeAppsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes the results of specified commands. *

* *

* You must specify at least one of the parameters. *

*
*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack, or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeCommandsRequest * @return Result of the DescribeCommands operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeCommands */ @Override public DescribeCommandsResult describeCommands( DescribeCommandsRequest describeCommandsRequest) { ExecutionContext executionContext = createExecutionContext(describeCommandsRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeCommandsRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(describeCommandsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeCommandsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Requests a description of a specified set of deployments. *

* *

* You must specify at least one of the parameters. *

*
*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack, or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeDeploymentsRequest * @return Result of the DescribeDeployments operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeDeployments */ @Override public DescribeDeploymentsResult describeDeployments( DescribeDeploymentsRequest describeDeploymentsRequest) { ExecutionContext executionContext = createExecutionContext(describeDeploymentsRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeDeploymentsRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(describeDeploymentsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeDeploymentsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes Amazon ECS clusters that are registered with a stack. If you * specify only a stack ID, you can use the MaxResults and * NextToken parameters to paginate the response. However, AWS * OpsWorks currently supports only one cluster per layer, so the result set * has a maximum of one element. *

*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack or an attached * policy that explicitly grants permission. For more information on user * permissions, see Managing User Permissions. *

* * @param describeEcsClustersRequest * @return Result of the DescribeEcsClusters operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeEcsClusters */ @Override public DescribeEcsClustersResult describeEcsClusters( DescribeEcsClustersRequest describeEcsClustersRequest) { ExecutionContext executionContext = createExecutionContext(describeEcsClustersRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeEcsClustersRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(describeEcsClustersRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeEcsClustersResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes Elastic IP addresses. *

* *

* You must specify at least one of the parameters. *

*
*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack, or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeElasticIpsRequest * @return Result of the DescribeElasticIps operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeElasticIps */ @Override public DescribeElasticIpsResult describeElasticIps( DescribeElasticIpsRequest describeElasticIpsRequest) { ExecutionContext executionContext = createExecutionContext(describeElasticIpsRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeElasticIpsRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(describeElasticIpsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeElasticIpsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes a stack's Elastic Load Balancing instances. *

* *

* You must specify at least one of the parameters. *

*
*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack, or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeElasticLoadBalancersRequest * @return Result of the DescribeElasticLoadBalancers operation returned by * the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeElasticLoadBalancers */ @Override public DescribeElasticLoadBalancersResult describeElasticLoadBalancers( DescribeElasticLoadBalancersRequest describeElasticLoadBalancersRequest) { ExecutionContext executionContext = createExecutionContext(describeElasticLoadBalancersRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeElasticLoadBalancersRequestMarshaller( protocolFactory) .marshall(super .beforeMarshalling(describeElasticLoadBalancersRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler( new JsonOperationMetadata().withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeElasticLoadBalancersResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Requests a description of a set of instances. *

* *

* You must specify at least one of the parameters. *

*
*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack, or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeInstancesRequest * @return Result of the DescribeInstances operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeInstances */ @Override public DescribeInstancesResult describeInstances( DescribeInstancesRequest describeInstancesRequest) { ExecutionContext executionContext = createExecutionContext(describeInstancesRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeInstancesRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(describeInstancesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeInstancesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Requests a description of one or more layers in a specified stack. *

* *

* You must specify at least one of the parameters. *

*
*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack, or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeLayersRequest * @return Result of the DescribeLayers operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeLayers */ @Override public DescribeLayersResult describeLayers( DescribeLayersRequest describeLayersRequest) { ExecutionContext executionContext = createExecutionContext(describeLayersRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeLayersRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(describeLayersRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeLayersResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes load-based auto scaling configurations for specified layers. *

* *

* You must specify at least one of the parameters. *

*
*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack, or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeLoadBasedAutoScalingRequest * @return Result of the DescribeLoadBasedAutoScaling operation returned by * the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeLoadBasedAutoScaling */ @Override public DescribeLoadBasedAutoScalingResult describeLoadBasedAutoScaling( DescribeLoadBasedAutoScalingRequest describeLoadBasedAutoScalingRequest) { ExecutionContext executionContext = createExecutionContext(describeLoadBasedAutoScalingRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeLoadBasedAutoScalingRequestMarshaller( protocolFactory) .marshall(super .beforeMarshalling(describeLoadBasedAutoScalingRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler( new JsonOperationMetadata().withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeLoadBasedAutoScalingResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes a user's SSH information. *

*

* Required Permissions: To use this action, an IAM user must have * self-management enabled or an attached policy that explicitly grants * permissions. For more information on user permissions, see Managing User Permissions. *

* * @param describeMyUserProfileRequest * @return Result of the DescribeMyUserProfile operation returned by the * service. * @sample AWSOpsWorks.DescribeMyUserProfile */ @Override public DescribeMyUserProfileResult describeMyUserProfile( DescribeMyUserProfileRequest describeMyUserProfileRequest) { ExecutionContext executionContext = createExecutionContext(describeMyUserProfileRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeMyUserProfileRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(describeMyUserProfileRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeMyUserProfileResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes the permissions for a specified stack. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param describePermissionsRequest * @return Result of the DescribePermissions operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribePermissions */ @Override public DescribePermissionsResult describePermissions( DescribePermissionsRequest describePermissionsRequest) { ExecutionContext executionContext = createExecutionContext(describePermissionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribePermissionsRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(describePermissionsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribePermissionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describe an instance's RAID arrays. *

* *

* You must specify at least one of the parameters. *

*
*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack, or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeRaidArraysRequest * @return Result of the DescribeRaidArrays operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeRaidArrays */ @Override public DescribeRaidArraysResult describeRaidArrays( DescribeRaidArraysRequest describeRaidArraysRequest) { ExecutionContext executionContext = createExecutionContext(describeRaidArraysRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeRaidArraysRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(describeRaidArraysRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeRaidArraysResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes Amazon RDS instances. *

*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack, or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeRdsDbInstancesRequest * @return Result of the DescribeRdsDbInstances operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeRdsDbInstances */ @Override public DescribeRdsDbInstancesResult describeRdsDbInstances( DescribeRdsDbInstancesRequest describeRdsDbInstancesRequest) { ExecutionContext executionContext = createExecutionContext(describeRdsDbInstancesRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeRdsDbInstancesRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(describeRdsDbInstancesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeRdsDbInstancesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes AWS OpsWorks service errors. *

*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack, or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeServiceErrorsRequest * @return Result of the DescribeServiceErrors operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeServiceErrors */ @Override public DescribeServiceErrorsResult describeServiceErrors( DescribeServiceErrorsRequest describeServiceErrorsRequest) { ExecutionContext executionContext = createExecutionContext(describeServiceErrorsRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeServiceErrorsRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(describeServiceErrorsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeServiceErrorsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Requests a description of a stack's provisioning parameters. *

*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeStackProvisioningParametersRequest * @return Result of the DescribeStackProvisioningParameters operation * returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeStackProvisioningParameters */ @Override public DescribeStackProvisioningParametersResult describeStackProvisioningParameters( DescribeStackProvisioningParametersRequest describeStackProvisioningParametersRequest) { ExecutionContext executionContext = createExecutionContext(describeStackProvisioningParametersRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeStackProvisioningParametersRequestMarshaller( protocolFactory) .marshall(super .beforeMarshalling(describeStackProvisioningParametersRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler( new JsonOperationMetadata().withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeStackProvisioningParametersResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes the number of layers and apps in a specified stack, and the * number of instances in each state, such as running_setup or * online. *

*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack, or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeStackSummaryRequest * @return Result of the DescribeStackSummary operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeStackSummary */ @Override public DescribeStackSummaryResult describeStackSummary( DescribeStackSummaryRequest describeStackSummaryRequest) { ExecutionContext executionContext = createExecutionContext(describeStackSummaryRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeStackSummaryRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(describeStackSummaryRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeStackSummaryResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Requests a description of one or more stacks. *

*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack, or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeStacksRequest * @return Result of the DescribeStacks operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeStacks */ @Override public DescribeStacksResult describeStacks( DescribeStacksRequest describeStacksRequest) { ExecutionContext executionContext = createExecutionContext(describeStacksRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeStacksRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(describeStacksRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeStacksResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes time-based auto scaling configurations for specified instances. *

* *

* You must specify at least one of the parameters. *

*
*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack, or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeTimeBasedAutoScalingRequest * @return Result of the DescribeTimeBasedAutoScaling operation returned by * the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeTimeBasedAutoScaling */ @Override public DescribeTimeBasedAutoScalingResult describeTimeBasedAutoScaling( DescribeTimeBasedAutoScalingRequest describeTimeBasedAutoScalingRequest) { ExecutionContext executionContext = createExecutionContext(describeTimeBasedAutoScalingRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeTimeBasedAutoScalingRequestMarshaller( protocolFactory) .marshall(super .beforeMarshalling(describeTimeBasedAutoScalingRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler( new JsonOperationMetadata().withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeTimeBasedAutoScalingResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describe specified users. *

*

* Required Permissions: To use this action, an IAM user must have an * attached policy that explicitly grants permissions. For more information * on user permissions, see Managing User Permissions. *

* * @param describeUserProfilesRequest * @return Result of the DescribeUserProfiles operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeUserProfiles */ @Override public DescribeUserProfilesResult describeUserProfiles( DescribeUserProfilesRequest describeUserProfilesRequest) { ExecutionContext executionContext = createExecutionContext(describeUserProfilesRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeUserProfilesRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(describeUserProfilesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeUserProfilesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes an instance's Amazon EBS volumes. *

* *

* You must specify at least one of the parameters. *

*
*

* Required Permissions: To use this action, an IAM user must have a * Show, Deploy, or Manage permissions level for the stack, or an attached * policy that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param describeVolumesRequest * @return Result of the DescribeVolumes operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DescribeVolumes */ @Override public DescribeVolumesResult describeVolumes( DescribeVolumesRequest describeVolumesRequest) { ExecutionContext executionContext = createExecutionContext(describeVolumesRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeVolumesRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(describeVolumesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DescribeVolumesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Detaches a specified Elastic Load Balancing instance from its layer. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param detachElasticLoadBalancerRequest * @return Result of the DetachElasticLoadBalancer operation returned by the * service. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DetachElasticLoadBalancer */ @Override public DetachElasticLoadBalancerResult detachElasticLoadBalancer( DetachElasticLoadBalancerRequest detachElasticLoadBalancerRequest) { ExecutionContext executionContext = createExecutionContext(detachElasticLoadBalancerRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DetachElasticLoadBalancerRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(detachElasticLoadBalancerRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler( new JsonOperationMetadata().withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DetachElasticLoadBalancerResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Disassociates an Elastic IP address from its instance. The address * remains registered with the stack. For more information, see Resource Management. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param disassociateElasticIpRequest * @return Result of the DisassociateElasticIp operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.DisassociateElasticIp */ @Override public DisassociateElasticIpResult disassociateElasticIp( DisassociateElasticIpRequest disassociateElasticIpRequest) { ExecutionContext executionContext = createExecutionContext(disassociateElasticIpRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DisassociateElasticIpRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(disassociateElasticIpRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new DisassociateElasticIpResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a generated host name for the specified layer, based on the current * host name theme. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param getHostnameSuggestionRequest * @return Result of the GetHostnameSuggestion operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.GetHostnameSuggestion */ @Override public GetHostnameSuggestionResult getHostnameSuggestion( GetHostnameSuggestionRequest getHostnameSuggestionRequest) { ExecutionContext executionContext = createExecutionContext(getHostnameSuggestionRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetHostnameSuggestionRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(getHostnameSuggestionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new GetHostnameSuggestionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * *

* This action can be used only with Windows stacks. *

*
*

* Grants RDP access to a Windows instance for a specified time period. *

* * @param grantAccessRequest * @return Result of the GrantAccess operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.GrantAccess */ @Override public GrantAccessResult grantAccess(GrantAccessRequest grantAccessRequest) { ExecutionContext executionContext = createExecutionContext(grantAccessRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GrantAccessRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(grantAccessRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new GrantAccessResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Reboots a specified instance. For more information, see Starting, Stopping, and Rebooting Instances. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param rebootInstanceRequest * @return Result of the RebootInstance operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.RebootInstance */ @Override public RebootInstanceResult rebootInstance( RebootInstanceRequest rebootInstanceRequest) { ExecutionContext executionContext = createExecutionContext(rebootInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RebootInstanceRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(rebootInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new RebootInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Registers a specified Amazon ECS cluster with a stack. You can register * only one cluster with a stack. A cluster can be registered with only one * stack. For more information, see Resource Management. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param registerEcsClusterRequest * @return Result of the RegisterEcsCluster operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.RegisterEcsCluster */ @Override public RegisterEcsClusterResult registerEcsCluster( RegisterEcsClusterRequest registerEcsClusterRequest) { ExecutionContext executionContext = createExecutionContext(registerEcsClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RegisterEcsClusterRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(registerEcsClusterRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new RegisterEcsClusterResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Registers an Elastic IP address with a specified stack. An address can be * registered with only one stack at a time. If the address is already * registered, you must first deregister it by calling * DeregisterElasticIp. For more information, see Resource Management. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param registerElasticIpRequest * @return Result of the RegisterElasticIp operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.RegisterElasticIp */ @Override public RegisterElasticIpResult registerElasticIp( RegisterElasticIpRequest registerElasticIpRequest) { ExecutionContext executionContext = createExecutionContext(registerElasticIpRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RegisterElasticIpRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(registerElasticIpRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new RegisterElasticIpResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Registers instances with a specified stack that were created outside of * AWS OpsWorks. *

* *

* We do not recommend using this action to register instances. The complete * registration operation has two primary steps, installing the AWS OpsWorks * agent on the instance and registering the instance with the stack. * RegisterInstance handles only the second step. You should * instead use the AWS CLI register command, which performs the * entire registration operation. For more information, see Registering an Instance with an AWS OpsWorks Stack. *

*
*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param registerInstanceRequest * @return Result of the RegisterInstance operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.RegisterInstance */ @Override public RegisterInstanceResult registerInstance( RegisterInstanceRequest registerInstanceRequest) { ExecutionContext executionContext = createExecutionContext(registerInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RegisterInstanceRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(registerInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new RegisterInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Registers an Amazon RDS instance with a stack. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param registerRdsDbInstanceRequest * @return Result of the RegisterRdsDbInstance operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.RegisterRdsDbInstance */ @Override public RegisterRdsDbInstanceResult registerRdsDbInstance( RegisterRdsDbInstanceRequest registerRdsDbInstanceRequest) { ExecutionContext executionContext = createExecutionContext(registerRdsDbInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RegisterRdsDbInstanceRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(registerRdsDbInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new RegisterRdsDbInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Registers an Amazon EBS volume with a specified stack. A volume can be * registered with only one stack at a time. If the volume is already * registered, you must first deregister it by calling * DeregisterVolume. For more information, see Resource Management. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param registerVolumeRequest * @return Result of the RegisterVolume operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.RegisterVolume */ @Override public RegisterVolumeResult registerVolume( RegisterVolumeRequest registerVolumeRequest) { ExecutionContext executionContext = createExecutionContext(registerVolumeRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RegisterVolumeRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(registerVolumeRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new RegisterVolumeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Specify the load-based auto scaling configuration for a specified layer. * For more information, see Managing Load with Time-based and Load-based Instances. *

* *

* To use load-based auto scaling, you must create a set of load-based auto * scaling instances. Load-based auto scaling operates only on the instances * from that set, so you must ensure that you have created enough instances * to handle the maximum anticipated load. *

*
*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param setLoadBasedAutoScalingRequest * @return Result of the SetLoadBasedAutoScaling operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.SetLoadBasedAutoScaling */ @Override public SetLoadBasedAutoScalingResult setLoadBasedAutoScaling( SetLoadBasedAutoScalingRequest setLoadBasedAutoScalingRequest) { ExecutionContext executionContext = createExecutionContext(setLoadBasedAutoScalingRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new SetLoadBasedAutoScalingRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(setLoadBasedAutoScalingRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new SetLoadBasedAutoScalingResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Specifies a user's permissions. For more information, see Security and Permissions. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param setPermissionRequest * @return Result of the SetPermission operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.SetPermission */ @Override public SetPermissionResult setPermission( SetPermissionRequest setPermissionRequest) { ExecutionContext executionContext = createExecutionContext(setPermissionRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new SetPermissionRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(setPermissionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new SetPermissionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Specify the time-based auto scaling configuration for a specified * instance. For more information, see Managing Load with Time-based and Load-based Instances. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param setTimeBasedAutoScalingRequest * @return Result of the SetTimeBasedAutoScaling operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.SetTimeBasedAutoScaling */ @Override public SetTimeBasedAutoScalingResult setTimeBasedAutoScaling( SetTimeBasedAutoScalingRequest setTimeBasedAutoScalingRequest) { ExecutionContext executionContext = createExecutionContext(setTimeBasedAutoScalingRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new SetTimeBasedAutoScalingRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(setTimeBasedAutoScalingRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new SetTimeBasedAutoScalingResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Starts a specified instance. For more information, see Starting, Stopping, and Rebooting Instances. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param startInstanceRequest * @return Result of the StartInstance operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.StartInstance */ @Override public StartInstanceResult startInstance( StartInstanceRequest startInstanceRequest) { ExecutionContext executionContext = createExecutionContext(startInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartInstanceRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(startInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new StartInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Starts a stack's instances. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param startStackRequest * @return Result of the StartStack operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.StartStack */ @Override public StartStackResult startStack(StartStackRequest startStackRequest) { ExecutionContext executionContext = createExecutionContext(startStackRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartStackRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(startStackRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new StartStackResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Stops a specified instance. When you stop a standard instance, the data * disappears and must be reinstalled when you restart the instance. You can * stop an Amazon EBS-backed instance without losing data. For more * information, see Starting, Stopping, and Rebooting Instances. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param stopInstanceRequest * @return Result of the StopInstance operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.StopInstance */ @Override public StopInstanceResult stopInstance( StopInstanceRequest stopInstanceRequest) { ExecutionContext executionContext = createExecutionContext(stopInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StopInstanceRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(stopInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new StopInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Stops a specified stack. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param stopStackRequest * @return Result of the StopStack operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.StopStack */ @Override public StopStackResult stopStack(StopStackRequest stopStackRequest) { ExecutionContext executionContext = createExecutionContext(stopStackRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StopStackRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(stopStackRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new StopStackResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Unassigns a registered instance from all of it's layers. The instance * remains in the stack as an unassigned instance and can be assigned to * another layer, as needed. You cannot use this action with instances that * were created with AWS OpsWorks. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param unassignInstanceRequest * @return Result of the UnassignInstance operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.UnassignInstance */ @Override public UnassignInstanceResult unassignInstance( UnassignInstanceRequest unassignInstanceRequest) { ExecutionContext executionContext = createExecutionContext(unassignInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UnassignInstanceRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(unassignInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new UnassignInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Unassigns an assigned Amazon EBS volume. The volume remains registered * with the stack. For more information, see Resource Management. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param unassignVolumeRequest * @return Result of the UnassignVolume operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.UnassignVolume */ @Override public UnassignVolumeResult unassignVolume( UnassignVolumeRequest unassignVolumeRequest) { ExecutionContext executionContext = createExecutionContext(unassignVolumeRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UnassignVolumeRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(unassignVolumeRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new UnassignVolumeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates a specified app. *

*

* Required Permissions: To use this action, an IAM user must have a * Deploy or Manage permissions level for the stack, or an attached policy * that explicitly grants permissions. For more information on user * permissions, see Managing User Permissions. *

* * @param updateAppRequest * @return Result of the UpdateApp operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.UpdateApp */ @Override public UpdateAppResult updateApp(UpdateAppRequest updateAppRequest) { ExecutionContext executionContext = createExecutionContext(updateAppRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateAppRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(updateAppRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new UpdateAppResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates a registered Elastic IP address's name. For more information, see * Resource Management. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param updateElasticIpRequest * @return Result of the UpdateElasticIp operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.UpdateElasticIp */ @Override public UpdateElasticIpResult updateElasticIp( UpdateElasticIpRequest updateElasticIpRequest) { ExecutionContext executionContext = createExecutionContext(updateElasticIpRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateElasticIpRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(updateElasticIpRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new UpdateElasticIpResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates a specified instance. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param updateInstanceRequest * @return Result of the UpdateInstance operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.UpdateInstance */ @Override public UpdateInstanceResult updateInstance( UpdateInstanceRequest updateInstanceRequest) { ExecutionContext executionContext = createExecutionContext(updateInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateInstanceRequestMarshaller(protocolFactory) .marshall(super .beforeMarshalling(updateInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new UpdateInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates a specified layer. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param updateLayerRequest * @return Result of the UpdateLayer operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.UpdateLayer */ @Override public UpdateLayerResult updateLayer(UpdateLayerRequest updateLayerRequest) { ExecutionContext executionContext = createExecutionContext(updateLayerRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateLayerRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(updateLayerRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new UpdateLayerResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates a user's SSH public key. *

*

* Required Permissions: To use this action, an IAM user must have * self-management enabled or an attached policy that explicitly grants * permissions. For more information on user permissions, see Managing User Permissions. *

* * @param updateMyUserProfileRequest * @return Result of the UpdateMyUserProfile operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @sample AWSOpsWorks.UpdateMyUserProfile */ @Override public UpdateMyUserProfileResult updateMyUserProfile( UpdateMyUserProfileRequest updateMyUserProfileRequest) { ExecutionContext executionContext = createExecutionContext(updateMyUserProfileRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateMyUserProfileRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(updateMyUserProfileRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new UpdateMyUserProfileResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates an Amazon RDS instance. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param updateRdsDbInstanceRequest * @return Result of the UpdateRdsDbInstance operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.UpdateRdsDbInstance */ @Override public UpdateRdsDbInstanceResult updateRdsDbInstance( UpdateRdsDbInstanceRequest updateRdsDbInstanceRequest) { ExecutionContext executionContext = createExecutionContext(updateRdsDbInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateRdsDbInstanceRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(updateRdsDbInstanceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new UpdateRdsDbInstanceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates a specified stack. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param updateStackRequest * @return Result of the UpdateStack operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.UpdateStack */ @Override public UpdateStackResult updateStack(UpdateStackRequest updateStackRequest) { ExecutionContext executionContext = createExecutionContext(updateStackRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateStackRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(updateStackRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new UpdateStackResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates a specified user profile. *

*

* Required Permissions: To use this action, an IAM user must have an * attached policy that explicitly grants permissions. For more information * on user permissions, see Managing User Permissions. *

* * @param updateUserProfileRequest * @return Result of the UpdateUserProfile operation returned by the * service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.UpdateUserProfile */ @Override public UpdateUserProfileResult updateUserProfile( UpdateUserProfileRequest updateUserProfileRequest) { ExecutionContext executionContext = createExecutionContext(updateUserProfileRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateUserProfileRequestMarshaller( protocolFactory).marshall(super .beforeMarshalling(updateUserProfileRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new UpdateUserProfileResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates an Amazon EBS volume's name or mount point. For more information, * see Resource Management. *

*

* Required Permissions: To use this action, an IAM user must have a * Manage permissions level for the stack, or an attached policy that * explicitly grants permissions. For more information on user permissions, * see Managing User Permissions. *

* * @param updateVolumeRequest * @return Result of the UpdateVolume operation returned by the service. * @throws ValidationException * Indicates that a request was not valid. * @throws ResourceNotFoundException * Indicates that a resource was not found. * @sample AWSOpsWorks.UpdateVolume */ @Override public UpdateVolumeResult updateVolume( UpdateVolumeRequest updateVolumeRequest) { ExecutionContext executionContext = createExecutionContext(updateVolumeRequest); AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateVolumeRequestMarshaller(protocolFactory) .marshall(super.beforeMarshalling(updateVolumeRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true) .withHasStreamingSuccessResponse(false), new UpdateVolumeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * Returns additional metadata for a previously executed successful, * request, typically used for debugging issues where a service isn't acting * as expected. This data isn't considered part of the result data returned * by an operation, so it's available through this separate, diagnostic * interface. *

* Response metadata is only cached for a limited period of time, so if you * need to access this extra diagnostic information for an executed request, * you should use this method to retrieve it as soon as possible after * executing the request. * * @param request * The originally executed request * * @return The response metadata for the specified request, or null if none * is available. */ public ResponseMetadata getCachedResponseMetadata( AmazonWebServiceRequest request) { return client.getResponseMetadataForRequest(request); } /** * Normal invoke with authentication. Credentials are required and may be * overriden at the request level. **/ private Response invoke( Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { executionContext.setCredentialsProvider(CredentialUtils .getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider)); return doInvoke(request, responseHandler, executionContext); } /** * Invoke with no authentication. Credentials are not required and any * credentials set on the client or request will be ignored for this * operation. **/ private Response anonymousInvoke( Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return doInvoke(request, responseHandler, executionContext); } /** * Invoke the request using the http client. Assumes credentials (or lack * thereof) have been configured in the ExecutionContext beforehand. **/ private Response doInvoke( Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { request.setEndpoint(endpoint); request.setTimeOffset(timeOffset); HttpResponseHandler errorResponseHandler = protocolFactory .createErrorResponseHandler(new JsonErrorResponseMetadata()); return client.execute(request, responseHandler, errorResponseHandler, executionContext); } public AWSOpsWorksWaiters waiters() { if (waiters == null) { synchronized (this) { if (waiters == null) { waiters = new AWSOpsWorksWaiters(this); } } } return waiters; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy