We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.OpsWorks

Inherits:
AWS.Service show all
Identifier:
opsworks
API Version:
2013-02-18
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

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

OpsWorks Stacks is an application management service that provides an integrated experience for managing the complete application lifecycle. For information about OpsWorks, see the OpsWorks information page.

SDKs and CLI

Use the OpsWorks Stacks API by using the Command Line Interface (CLI) or by using one of the Amazon Web Services SDKs to implement applications in your preferred language. For more information, see:

Endpoints

OpsWorks Stacks 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-east-2.amazonaws.com

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

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

  • opsworks.ca-central-1.amazonaws.com (API only; not available in the Amazon Web Services Management Console)

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

  • opsworks.eu-west-2.amazonaws.com

  • opsworks.eu-west-3.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.

Note: 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.

Sending a Request Using OpsWorks

var opsworks = new AWS.OpsWorks();
opsworks.assignInstance(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the OpsWorks object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var opsworks = new AWS.OpsWorks({apiVersion: '2013-02-18'});

You can also set the API version globally in AWS.config.apiVersions using the opsworks service identifier:

AWS.config.apiVersions = {
  opsworks: '2013-02-18',
  // other service API versions
};

var opsworks = new AWS.OpsWorks();

Version:

  • 2013-02-18

Waiter Resource States

This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:

appExists, deploymentSuccessful, instanceOnline, instanceRegistered, instanceStopped, instanceTerminated

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, setupRequestListeners, defineService

Constructor Details

new AWS.OpsWorks(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a OpsWorks object

var opsworks = new AWS.OpsWorks({apiVersion: '2013-02-18'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.OpsWorks.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.OpsWorks.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.OpsWorks.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

assignInstance(params = {}, callback) ⇒ AWS.Request

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 OpsWorks Stacks.

Required Permissions: To use this action, an 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.

Service Reference:

Examples:

Calling the assignInstance operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  LayerIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
opsworks.assignInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceId — (String)

      The instance ID.

    • LayerIds — (Array<String>)

      The layer ID, which must correspond to a custom layer. You cannot assign a registered instance to a built-in layer.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

assignVolume(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the assignVolume operation

var params = {
  VolumeId: 'STRING_VALUE', /* required */
  InstanceId: 'STRING_VALUE'
};
opsworks.assignVolume(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • VolumeId — (String)

      The volume ID.

    • InstanceId — (String)

      The instance ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

associateElasticIp(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the associateElasticIp operation

var params = {
  ElasticIp: 'STRING_VALUE', /* required */
  InstanceId: 'STRING_VALUE'
};
opsworks.associateElasticIp(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ElasticIp — (String)

      The Elastic IP address.

    • InstanceId — (String)

      The instance ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

attachElasticLoadBalancer(params = {}, callback) ⇒ AWS.Request

Attaches an Elastic Load Balancing load balancer to a specified layer. OpsWorks Stacks does not support Application Load Balancer. You can only use Classic Load Balancer with OpsWorks Stacks. For more information, see Elastic Load Balancing.

Note: You must create the Elastic Load Balancing instance separately, by using the Elastic Load Balancing console, API, or CLI. For more information, see the 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.

Service Reference:

Examples:

Calling the attachElasticLoadBalancer operation

var params = {
  ElasticLoadBalancerName: 'STRING_VALUE', /* required */
  LayerId: 'STRING_VALUE' /* required */
};
opsworks.attachElasticLoadBalancer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ElasticLoadBalancerName — (String)

      The Elastic Load Balancing instance's name.

    • LayerId — (String)

      The ID of the layer to which the Elastic Load Balancing instance is to be attached.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

cloneStack(params = {}, callback) ⇒ AWS.Request

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the cloneStack operation

var params = {
  ServiceRoleArn: 'STRING_VALUE', /* required */
  SourceStackId: 'STRING_VALUE', /* required */
  AgentVersion: 'STRING_VALUE',
  Attributes: {
    '<StackAttributesKeys>': 'STRING_VALUE',
    /* '<StackAttributesKeys>': ... */
  },
  ChefConfiguration: {
    BerkshelfVersion: 'STRING_VALUE',
    ManageBerkshelf: true || false
  },
  CloneAppIds: [
    'STRING_VALUE',
    /* more items */
  ],
  ClonePermissions: true || false,
  ConfigurationManager: {
    Name: 'STRING_VALUE',
    Version: 'STRING_VALUE'
  },
  CustomCookbooksSource: {
    Password: 'STRING_VALUE',
    Revision: 'STRING_VALUE',
    SshKey: 'STRING_VALUE',
    Type: git | svn | archive | s3,
    Url: 'STRING_VALUE',
    Username: 'STRING_VALUE'
  },
  CustomJson: 'STRING_VALUE',
  DefaultAvailabilityZone: 'STRING_VALUE',
  DefaultInstanceProfileArn: 'STRING_VALUE',
  DefaultOs: 'STRING_VALUE',
  DefaultRootDeviceType: ebs | instance-store,
  DefaultSshKeyName: 'STRING_VALUE',
  DefaultSubnetId: 'STRING_VALUE',
  HostnameTheme: 'STRING_VALUE',
  Name: 'STRING_VALUE',
  Region: 'STRING_VALUE',
  UseCustomCookbooks: true || false,
  UseOpsworksSecurityGroups: true || false,
  VpcId: 'STRING_VALUE'
};
opsworks.cloneStack(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • SourceStackId — (String)

      The source stack ID.

    • Name — (String)

      The cloned stack name. Stack names can be a maximum of 64 characters.

    • Region — (String)

      The cloned stack Amazon Web Services Region, such as ap-northeast-2. For more information about Amazon Web Services Regions, see Regions and Endpoints.

    • VpcId — (String)

      The ID of the VPC that the cloned stack is to be launched into. It must be in the specified region. All instances are launched into this VPC, and you cannot change the ID later.

      • If your account supports EC2 Classic, the default value is no VPC.

      • If your account does not support EC2 Classic, the default value is the default VPC for the specified region.

      If the VPC ID corresponds to a default VPC and you have specified either the DefaultAvailabilityZone or the DefaultSubnetId parameter only, OpsWorks Stacks infers the value of the other parameter. If you specify neither parameter, OpsWorks Stacks sets these parameters to the first valid Availability Zone for the specified region and the corresponding default VPC subnet ID, respectively.

      If you specify a nondefault VPC ID, note the following:

      • It must belong to a VPC in your account that is in the specified region.

      • You must specify a value for DefaultSubnetId.

      For more information about how to use OpsWorks Stacks with a VPC, see Running a Stack in a VPC. For more information about default VPC and EC2 Classic, see Supported Platforms.

    • Attributes — (map<String>)

      A list of stack attributes and values as key/value pairs to be added to the cloned stack.

    • ServiceRoleArn — (String)

      The stack Identity and Access Management (IAM) role, which allows OpsWorks Stacks to work with Amazon Web Services resources on your behalf. You must set this parameter to the Amazon Resource Name (ARN) for an existing IAM role. If you create a stack by using the OpsWorkss Stacks console, it creates the role for you. You can obtain an existing stack's IAM ARN programmatically by calling DescribePermissions. For more information about IAM ARNs, see Using Identifiers.

      Note: You must set this parameter to a valid service role ARN or the action will fail; there is no default value. You can specify the source stack's service role ARN, if you prefer, but you must do so explicitly.
    • DefaultInstanceProfileArn — (String)

      The Amazon Resource Name (ARN) of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

    • DefaultOs — (String)

      The stack's operating system, which must be set to one of the following.

      • A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2, Amazon Linux 2018.03, Amazon Linux 2017.09, Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03.

      • A supported Ubuntu operating system, such as Ubuntu 18.04 LTS, Ubuntu 16.04 LTS, Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS.

      • CentOS Linux 7

      • Red Hat Enterprise Linux 7

      • Microsoft Windows Server 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft Windows Server 2012 R2 with SQL Server Web.

      • A custom AMI: Custom. You specify the custom AMI you want to use when you create instances. For more information about how to use custom AMIs with OpsWorks, see Using Custom AMIs.

      The default option is the parent stack's operating system. Not all operating systems are supported with all versions of Chef. For more information about supported operating systems, see OpsWorks Stacks Operating Systems.

      Note: You can specify a different Linux operating system for the cloned stack, but you cannot change from Linux to Windows or Windows to Linux.
    • HostnameTheme — (String)

      The stack's host name theme, with spaces are replaced by underscores. The theme is used to generate host names for the stack's instances. By default, HostnameTheme is set to Layer_Dependent, which creates host names by appending integers to the layer's short name. The other themes are:

      • Baked_Goods

      • Clouds

      • Europe_Cities

      • Fruits

      • Greek_Deities_and_Titans

      • Legendary_creatures_from_Japan

      • Planets_and_Moons

      • Roman_Deities

      • Scottish_Islands

      • US_Cities

      • Wild_Cats

      To obtain a generated host name, call GetHostNameSuggestion, which returns a host name based on the current theme.

    • DefaultAvailabilityZone — (String)

      The cloned stack's default Availability Zone, which must be in the specified region. For more information, see Regions and Endpoints. If you also specify a value for DefaultSubnetId, the subnet must be in the same zone. For more information, see the VpcId parameter description.

    • DefaultSubnetId — (String)

      The stack's default VPC subnet ID. This parameter is required if you specify a value for the VpcId parameter. All instances are launched into this subnet unless you specify otherwise when you create the instance. If you also specify a value for DefaultAvailabilityZone, the subnet must be in that zone. For information on default values and when this parameter is required, see the VpcId parameter description.

    • CustomJson — (String)

      A string that contains user-defined, custom JSON. It is used to override the corresponding default stack configuration JSON values. The string should be in the following format:

      "{\"key1\": \"value1\", \"key2\": \"value2\",...}"

      For more information about custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes

    • ConfigurationManager — (map)

      The configuration manager. When you clone a stack we recommend that you use the configuration manager to specify the Chef version: 12, 11.10, or 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for Linux stacks is currently 12.

      • Name — (String)

        The name. This parameter must be set to Chef.

      • Version — (String)

        The Chef version. This parameter must be set to 12, 11.10, or 11.4 for Linux stacks, and to 12.2 for Windows stacks. The default value for Linux stacks is 12.

    • ChefConfiguration — (map)

      A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version on Chef 11.10 stacks. For more information, see Create a New Stack.

      • ManageBerkshelf — (Boolean)

        Whether to enable Berkshelf.

      • BerkshelfVersion — (String)

        The Berkshelf version.

    • UseCustomCookbooks — (Boolean)

      Whether to use custom cookbooks.

    • UseOpsworksSecurityGroups — (Boolean)

      Whether to associate the OpsWorks Stacks built-in security groups with the stack's layers.

      OpsWorks Stacks provides a standard set of security groups, one for each layer, which are associated with layers by default. With UseOpsworksSecurityGroups you can instead provide your own custom security groups. UseOpsworksSecurityGroups has the following settings:

      • True - OpsWorks Stacks automatically associates the appropriate built-in security group with each layer (default setting). You can associate additional security groups with a layer after you create it but you cannot delete the built-in security group.

      • False - OpsWorks Stacks does not associate built-in security groups with layers. You must create appropriate Amazon EC2 security groups and associate a security group with each layer that you create. However, you can still manually associate a built-in security group with a layer on creation; custom security groups are required only for those layers that need custom settings.

      For more information, see Create a New Stack.

    • CustomCookbooksSource — (map)

      Contains the information required to retrieve an app or cookbook from a repository. For more information, see Adding Apps or Cookbooks and Recipes.

      • Type — (String)

        The repository type.

        Possible values include:
        • "git"
        • "svn"
        • "archive"
        • "s3"
      • Url — (String)

        The source URL. The following is an example of an Amazon S3 source URL: https://s3.amazonaws.com/opsworks-demo-bucket/opsworks&#95;cookbook&#95;demo.tar.gz.

      • Username — (String)

        This parameter depends on the repository type.

        • For Amazon S3 bundles, set Username to the appropriate IAM access key ID.

        • For HTTP bundles, Git repositories, and Subversion repositories, set Username to the user name.

      • Password — (String)

        When included in a request, the parameter depends on the repository type.

        • For Amazon S3 bundles, set Password to the appropriate IAM secret access key.

        • For HTTP bundles and Subversion repositories, set Password to the password.

        For more information on how to safely handle IAM credentials, see https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html.

        In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

      • SshKey — (String)

        In requests, the repository's SSH key.

        In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

      • Revision — (String)

        The application's version. OpsWorks Stacks enables you to easily deploy new versions of an application. One of the simplest approaches is to have branches or revisions in your repository that represent different versions that can potentially be deployed.

    • DefaultSshKeyName — (String)

      A default Amazon EC2 key pair name. The default value is none. If you specify a key pair name, OpsWorks installs the public key on the instance and you can use the private key with an SSH client to log in to the instance. For more information, see Using SSH to Communicate with an Instance and Managing SSH Access. You can override this setting by specifying a different key pair, or no key pair, when you create an instance.

    • ClonePermissions — (Boolean)

      Whether to clone the source stack's permissions.

    • CloneAppIds — (Array<String>)

      A list of source stack app IDs to be included in the cloned stack.

    • DefaultRootDeviceType — (String)

      The default root device type. This value is used by default for all instances in the cloned stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.

      Possible values include:
      • "ebs"
      • "instance-store"
    • AgentVersion — (String)

      The default OpsWorks Stacks agent version. You have the following options:

      • Auto-update - Set this parameter to LATEST. OpsWorks Stacks automatically installs new agent versions on the stack's instances as soon as they are available.

      • Fixed version - Set this parameter to your preferred agent version. To update the agent version, you must edit the stack configuration and specify a new version. OpsWorks Stacks automatically installs that version on the stack's instances.

      The default setting is LATEST. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2.

      Note: You can also specify an agent version when you create or update an instance, which overrides the stack's default setting.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • StackId — (String)

        The cloned stack ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createApp(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createApp operation

var params = {
  Name: 'STRING_VALUE', /* required */
  StackId: 'STRING_VALUE', /* required */
  Type: aws-flow-ruby | java | rails | php | nodejs | static | other, /* required */
  AppSource: {
    Password: 'STRING_VALUE',
    Revision: 'STRING_VALUE',
    SshKey: 'STRING_VALUE',
    Type: git | svn | archive | s3,
    Url: 'STRING_VALUE',
    Username: 'STRING_VALUE'
  },
  Attributes: {
    '<AppAttributesKeys>': 'STRING_VALUE',
    /* '<AppAttributesKeys>': ... */
  },
  DataSources: [
    {
      Arn: 'STRING_VALUE',
      DatabaseName: 'STRING_VALUE',
      Type: 'STRING_VALUE'
    },
    /* more items */
  ],
  Description: 'STRING_VALUE',
  Domains: [
    'STRING_VALUE',
    /* more items */
  ],
  EnableSsl: true || false,
  Environment: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE', /* required */
      Secure: true || false
    },
    /* more items */
  ],
  Shortname: 'STRING_VALUE',
  SslConfiguration: {
    Certificate: 'STRING_VALUE', /* required */
    PrivateKey: 'STRING_VALUE', /* required */
    Chain: 'STRING_VALUE'
  }
};
opsworks.createApp(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The stack ID.

    • Shortname — (String)

      The app's short name.

    • Name — (String)

      The app name.

    • Description — (String)

      A description of the app.

    • DataSources — (Array<map>)

      The app's data source.

      • Type — (String)

        The data source's type, AutoSelectOpsworksMysqlInstance, OpsworksMysqlInstance, RdsDbInstance, or None.

      • Arn — (String)

        The data source's ARN.

      • DatabaseName — (String)

        The database name.

    • Type — (String)

      The app type. Each supported type is associated with a particular layer. For example, PHP applications are associated with a PHP layer. OpsWorks Stacks deploys an application to those instances that are members of the corresponding layer. If your app isn't one of the standard types, or you prefer to implement your own Deploy recipes, specify other.

      Possible values include:
      • "aws-flow-ruby"
      • "java"
      • "rails"
      • "php"
      • "nodejs"
      • "static"
      • "other"
    • AppSource — (map)

      A Source object that specifies the app repository.

      • Type — (String)

        The repository type.

        Possible values include:
        • "git"
        • "svn"
        • "archive"
        • "s3"
      • Url — (String)

        The source URL. The following is an example of an Amazon S3 source URL: https://s3.amazonaws.com/opsworks-demo-bucket/opsworks&#95;cookbook&#95;demo.tar.gz.

      • Username — (String)

        This parameter depends on the repository type.

        • For Amazon S3 bundles, set Username to the appropriate IAM access key ID.

        • For HTTP bundles, Git repositories, and Subversion repositories, set Username to the user name.

      • Password — (String)

        When included in a request, the parameter depends on the repository type.

        • For Amazon S3 bundles, set Password to the appropriate IAM secret access key.

        • For HTTP bundles and Subversion repositories, set Password to the password.

        For more information on how to safely handle IAM credentials, see https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html.

        In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

      • SshKey — (String)

        In requests, the repository's SSH key.

        In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

      • Revision — (String)

        The application's version. OpsWorks Stacks enables you to easily deploy new versions of an application. One of the simplest approaches is to have branches or revisions in your repository that represent different versions that can potentially be deployed.

    • Domains — (Array<String>)

      The app virtual host settings, with multiple domains separated by commas. For example: 'www.example.com, example.com'

    • EnableSsl — (Boolean)

      Whether to enable SSL for the app.

    • SslConfiguration — (map)

      An SslConfiguration object with the SSL configuration.

      • Certificaterequired — (String)

        The contents of the certificate's domain.crt file.

      • PrivateKeyrequired — (String)

        The private key; the contents of the certificate's domain.kex file.

      • Chain — (String)

        Optional. Can be used to specify an intermediate certificate authority key or client authentication.

    • Attributes — (map<String>)

      One or more user-defined key/value pairs to be added to the stack attributes.

    • Environment — (Array<map>)

      An array of EnvironmentVariable objects that specify environment variables to be associated with the app. After you deploy the app, these variables are defined on the associated app server instance. For more information, see Environment Variables.

      There is no specific limit on the number of environment variables. However, the size of the associated data structure - which includes the variables' names, values, and protected flag values - cannot exceed 20 KB. This limit should accommodate most if not all use cases. Exceeding it will cause an exception with the message, "Environment: is too large (maximum is 20KB)."

      Note: If you have specified one or more environment variables, you cannot modify the stack's Chef version.
      • Keyrequired — (String)

        (Required) The environment variable's name, which can consist of up to 64 characters and must be specified. The name can contain upper- and lowercase letters, numbers, and underscores (_), but it must start with a letter or underscore.

      • Valuerequired — (String)

        (Optional) The environment variable's value, which can be left empty. If you specify a value, it can contain up to 256 characters, which must all be printable.

      • Secure — (Boolean)

        (Optional) Whether the variable's value is returned by the DescribeApps action. To hide an environment variable's value, set Secure to true. DescribeApps returns *****FILTERED***** instead of the actual value. The default value for Secure is false.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AppId — (String)

        The app ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDeployment(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createDeployment operation

var params = {
  Command: { /* required */
    Name: install_dependencies | update_dependencies | update_custom_cookbooks | execute_recipes | configure | setup | deploy | rollback | start | stop | restart | undeploy, /* required */
    Args: {
      '<String>': [
        'STRING_VALUE',
        /* more items */
      ],
      /* '<String>': ... */
    }
  },
  StackId: 'STRING_VALUE', /* required */
  AppId: 'STRING_VALUE',
  Comment: 'STRING_VALUE',
  CustomJson: 'STRING_VALUE',
  InstanceIds: [
    'STRING_VALUE',
    /* more items */
  ],
  LayerIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
opsworks.createDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The stack ID.

    • AppId — (String)

      The app ID. This parameter is required for app deployments, but not for other deployment commands.

    • InstanceIds — (Array<String>)

      The instance IDs for the deployment targets.

    • LayerIds — (Array<String>)

      The layer IDs for the deployment targets.

    • Command — (map)

      A DeploymentCommand object that specifies the deployment command and any associated arguments.

      • Namerequired — (String)

        Specifies the operation. You can specify only one command.

        For stacks, the following commands are available:

        • execute_recipes: Execute one or more recipes. To specify the recipes, set an Args parameter named recipes to the list of recipes to be executed. For example, to execute phpapp::appsetup, set Args to {"recipes":["phpapp::appsetup"]}.

        • install_dependencies: Install the stack's dependencies.

        • update_custom_cookbooks: Update the stack's custom cookbooks.

        • update_dependencies: Update the stack's dependencies.

        Note: The update_dependencies and install_dependencies commands are supported only for Linux instances. You can run the commands successfully on Windows instances, but they do nothing.

        For apps, the following commands are available:

        • deploy: Deploy an app. Ruby on Rails apps have an optional Args parameter named migrate. Set Args to {"migrate":["true"]} to migrate the database. The default setting is {"migrate":["false"]}.

        • rollback Roll the app back to the previous version. When you update an app, OpsWorks Stacks stores the previous version, up to a maximum of five versions. You can use this command to roll an app back as many as four versions.

        • start: Start the app's web or application server.

        • stop: Stop the app's web or application server.

        • restart: Restart the app's web or application server.

        • undeploy: Undeploy the app.

        Possible values include:
        • "install_dependencies"
        • "update_dependencies"
        • "update_custom_cookbooks"
        • "execute_recipes"
        • "configure"
        • "setup"
        • "deploy"
        • "rollback"
        • "start"
        • "stop"
        • "restart"
        • "undeploy"
      • Args — (map<Array<String>>)

        The arguments of those commands that take arguments. It should be set to a JSON object with the following format:

        {"arg_name1" : ["value1", "value2", ...], "arg_name2" : ["value1", "value2", ...], ...}

        The update_dependencies command takes two arguments:

        • upgrade_os_to - Specifies the Amazon Linux version that you want instances to run, such as Amazon Linux 2. You must also set the allow_reboot argument to true.

        • allow_reboot - Specifies whether to allow OpsWorks Stacks to reboot the instances if necessary, after installing the updates. This argument can be set to either true or false. The default value is false.

        For example, to upgrade an instance to Amazon Linux 2018.03, set Args to the following.

        { "upgrade_os_to":["Amazon Linux 2018.03"], "allow_reboot":["true"] }

    • Comment — (String)

      A user-defined comment.

    • CustomJson — (String)

      A string that contains user-defined, custom JSON. You can use this parameter to override some corresponding default stack configuration JSON values. The string should be in the following format:

      "{\"key1\": \"value1\", \"key2\": \"value2\",...}"

      For more information about custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes and Overriding Attributes With Custom JSON.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DeploymentId — (String)

        The deployment ID, which can be used with other requests to identify the deployment.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createInstance(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createInstance operation

var params = {
  InstanceType: 'STRING_VALUE', /* required */
  LayerIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  StackId: 'STRING_VALUE', /* required */
  AgentVersion: 'STRING_VALUE',
  AmiId: 'STRING_VALUE',
  Architecture: x86_64 | i386,
  AutoScalingType: load | timer,
  AvailabilityZone: 'STRING_VALUE',
  BlockDeviceMappings: [
    {
      DeviceName: 'STRING_VALUE',
      Ebs: {
        DeleteOnTermination: true || false,
        Iops: 'NUMBER_VALUE',
        SnapshotId: 'STRING_VALUE',
        VolumeSize: 'NUMBER_VALUE',
        VolumeType: gp2 | io1 | standard
      },
      NoDevice: 'STRING_VALUE',
      VirtualName: 'STRING_VALUE'
    },
    /* more items */
  ],
  EbsOptimized: true || false,
  Hostname: 'STRING_VALUE',
  InstallUpdatesOnBoot: true || false,
  Os: 'STRING_VALUE',
  RootDeviceType: ebs | instance-store,
  SshKeyName: 'STRING_VALUE',
  SubnetId: 'STRING_VALUE',
  Tenancy: 'STRING_VALUE',
  VirtualizationType: 'STRING_VALUE'
};
opsworks.createInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The stack ID.

    • LayerIds — (Array<String>)

      An array that contains the instance's layer IDs.

    • InstanceType — (String)

      The instance type, such as t2.micro. For a list of supported instance types, open the stack in the console, choose Instances, and choose + Instance. The Size list contains the currently supported types. For more information, see Instance Families and Types. The parameter values that you use to specify the various types are in the API Name column of the Available Instance Types table.

    • AutoScalingType — (String)

      For load-based or time-based instances, the type. Windows stacks can use only time-based instances.

      Possible values include:
      • "load"
      • "timer"
    • Hostname — (String)

      The instance host name. The following are character limits for instance host names.

      • Linux-based instances: 63 characters

      • Windows-based instances: 15 characters

    • Os — (String)

      The instance's operating system, which must be set to one of the following.

      • A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2, Amazon Linux 2018.03, Amazon Linux 2017.09, Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03.

      • A supported Ubuntu operating system, such as Ubuntu 18.04 LTS, Ubuntu 16.04 LTS, Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS.

      • CentOS Linux 7

      • Red Hat Enterprise Linux 7

      • A supported Windows operating system, such as Microsoft Windows Server 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft Windows Server 2012 R2 with SQL Server Web.

      • A custom AMI: Custom.

      Not all operating systems are supported with all versions of Chef. For more information about the supported operating systems, see OpsWorks Stacks Operating Systems.

      The default option is the current Amazon Linux version. If you set this parameter to Custom, you must use the CreateInstance action's AmiId parameter to specify the custom AMI that you want to use. Block device mappings are not supported if the value is Custom. For more information about how to use custom AMIs with OpsWorks Stacks, see Using Custom AMIs.

    • AmiId — (String)

      A custom AMI ID to be used to create the instance. The AMI should be based on one of the supported operating systems. For more information, see Using Custom AMIs.

      Note: If you specify a custom AMI, you must set Os to Custom.
    • SshKeyName — (String)

      The instance's Amazon EC2 key-pair name.

    • AvailabilityZone — (String)

      The instance Availability Zone. For more information, see Regions and Endpoints.

    • VirtualizationType — (String)

      The instance's virtualization type, paravirtual or hvm.

    • SubnetId — (String)

      The ID of the instance's subnet. If the stack is running in a VPC, you can use this parameter to override the stack's default subnet ID value and direct OpsWorks Stacks to launch the instance in a different subnet.

    • Architecture — (String)

      The instance architecture. The default option is x86_64. Instance types do not necessarily support both architectures. For a list of the architectures that are supported by the different instance types, see Instance Families and Types.

      Possible values include:
      • "x86_64"
      • "i386"
    • RootDeviceType — (String)

      The instance root device type. For more information, see Storage for the Root Device.

      Possible values include:
      • "ebs"
      • "instance-store"
    • BlockDeviceMappings — (Array<map>)

      An array of BlockDeviceMapping objects that specify the instance's block devices. For more information, see Block Device Mapping. Note that block device mappings are not supported for custom AMIs.

      • DeviceName — (String)

        The device name that is exposed to the instance, such as /dev/sdh. For the root device, you can use the explicit device name or you can set this parameter to ROOT_DEVICE and OpsWorks Stacks will provide the correct device name.

      • NoDevice — (String)

        Suppresses the specified device included in the AMI's block device mapping.

      • VirtualName — (String)

        The virtual device name. For more information, see BlockDeviceMapping.

      • Ebs — (map)

        An EBSBlockDevice that defines how to configure an Amazon EBS volume when the instance is launched.

        • SnapshotId — (String)

          The snapshot ID.

        • Iops — (Integer)

          The number of I/O operations per second (IOPS) that the volume supports. For more information, see EbsBlockDevice.

        • VolumeSize — (Integer)

          The volume size, in GiB. For more information, see EbsBlockDevice.

        • VolumeType — (String)

          The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized hard disk drives (HDD), sc1 for Cold HDD,and standard for Magnetic volumes.

          If you specify the io1 volume type, you must also specify a value for the Iops attribute. The maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1. Amazon Web Services uses the default volume size (in GiB) specified in the AMI attributes to set IOPS to 50 x (volume size).

          Possible values include:
          • "gp2"
          • "io1"
          • "standard"
        • DeleteOnTermination — (Boolean)

          Whether the volume is deleted on instance termination.

    • InstallUpdatesOnBoot — (Boolean)

      Whether to install operating system and package updates when the instance boots. The default value is true. To control when updates are installed, set this value to false. You must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

      Note: We strongly recommend using the default value of true to ensure that your instances have the latest security updates.
    • EbsOptimized — (Boolean)

      Whether to create an Amazon EBS-optimized instance.

    • AgentVersion — (String)

      The default OpsWorks Stacks agent version. You have the following options:

      • INHERIT - Use the stack's default agent version setting.

      • version_number - Use the specified agent version. This value overrides the stack's default setting. To update the agent version, edit the instance configuration and specify a new version. OpsWorks Stacks installs that version on the instance.

      The default setting is INHERIT. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2.

    • Tenancy — (String)

      The instance's tenancy option. The default option is no tenancy, or if the instance is running in a VPC, inherit tenancy settings from the VPC. The following are valid values for this parameter: dedicated, default, or host. Because there are costs associated with changes in tenancy options, we recommend that you research tenancy options before choosing them for your instances. For more information about dedicated hosts, see Dedicated Hosts Overview and Amazon EC2 Dedicated Hosts. For more information about dedicated instances, see Dedicated Instances and Amazon EC2 Dedicated Instances.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • InstanceId — (String)

        The instance ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createLayer(params = {}, callback) ⇒ AWS.Request

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

Note: 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.

Service Reference:

Examples:

Calling the createLayer operation

var params = {
  Name: 'STRING_VALUE', /* required */
  Shortname: 'STRING_VALUE', /* required */
  StackId: 'STRING_VALUE', /* required */
  Type: aws-flow-ruby | ecs-cluster | java-app | lb | web | php-app | rails-app | nodejs-app | memcached | db-master | monitoring-master | custom, /* required */
  Attributes: {
    '<LayerAttributesKeys>': 'STRING_VALUE',
    /* '<LayerAttributesKeys>': ... */
  },
  AutoAssignElasticIps: true || false,
  AutoAssignPublicIps: true || false,
  CloudWatchLogsConfiguration: {
    Enabled: true || false,
    LogStreams: [
      {
        BatchCount: 'NUMBER_VALUE',
        BatchSize: 'NUMBER_VALUE',
        BufferDuration: 'NUMBER_VALUE',
        DatetimeFormat: 'STRING_VALUE',
        Encoding: ascii | big5 | big5hkscs | cp037 | cp424 | cp437 | cp500 | cp720 | cp737 | cp775 | cp850 | cp852 | cp855 | cp856 | cp857 | cp858 | cp860 | cp861 | cp862 | cp863 | cp864 | cp865 | cp866 | cp869 | cp874 | cp875 | cp932 | cp949 | cp950 | cp1006 | cp1026 | cp1140 | cp1250 | cp1251 | cp1252 | cp1253 | cp1254 | cp1255 | cp1256 | cp1257 | cp1258 | euc_jp | euc_jis_2004 | euc_jisx0213 | euc_kr | gb2312 | gbk | gb18030 | hz | iso2022_jp | iso2022_jp_1 | iso2022_jp_2 | iso2022_jp_2004 | iso2022_jp_3 | iso2022_jp_ext | iso2022_kr | latin_1 | iso8859_2 | iso8859_3 | iso8859_4 | iso8859_5 | iso8859_6 | iso8859_7 | iso8859_8 | iso8859_9 | iso8859_10 | iso8859_13 | iso8859_14 | iso8859_15 | iso8859_16 | johab | koi8_r | koi8_u | mac_cyrillic | mac_greek | mac_iceland | mac_latin2 | mac_roman | mac_turkish | ptcp154 | shift_jis | shift_jis_2004 | shift_jisx0213 | utf_32 | utf_32_be | utf_32_le | utf_16 | utf_16_be | utf_16_le | utf_7 | utf_8 | utf_8_sig,
        File: 'STRING_VALUE',
        FileFingerprintLines: 'STRING_VALUE',
        InitialPosition: start_of_file | end_of_file,
        LogGroupName: 'STRING_VALUE',
        MultiLineStartPattern: 'STRING_VALUE',
        TimeZone: LOCAL | UTC
      },
      /* more items */
    ]
  },
  CustomInstanceProfileArn: 'STRING_VALUE',
  CustomJson: 'STRING_VALUE',
  CustomRecipes: {
    Configure: [
      'STRING_VALUE',
      /* more items */
    ],
    Deploy: [
      'STRING_VALUE',
      /* more items */
    ],
    Setup: [
      'STRING_VALUE',
      /* more items */
    ],
    Shutdown: [
      'STRING_VALUE',
      /* more items */
    ],
    Undeploy: [
      'STRING_VALUE',
      /* more items */
    ]
  },
  CustomSecurityGroupIds: [
    'STRING_VALUE',
    /* more items */
  ],
  EnableAutoHealing: true || false,
  InstallUpdatesOnBoot: true || false,
  LifecycleEventConfiguration: {
    Shutdown: {
      DelayUntilElbConnectionsDrained: true || false,
      ExecutionTimeout: 'NUMBER_VALUE'
    }
  },
  Packages: [
    'STRING_VALUE',
    /* more items */
  ],
  UseEbsOptimizedInstances: true || false,
  VolumeConfigurations: [
    {
      MountPoint: 'STRING_VALUE', /* required */
      NumberOfDisks: 'NUMBER_VALUE', /* required */
      Size: 'NUMBER_VALUE', /* required */
      Encrypted: true || false,
      Iops: 'NUMBER_VALUE',
      RaidLevel: 'NUMBER_VALUE',
      VolumeType: 'STRING_VALUE'
    },
    /* more items */
  ]
};
opsworks.createLayer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The layer stack ID.

    • Type — (String)

      The layer type. A stack cannot have more than one built-in layer of the same type. It can have any number of custom layers. Built-in layers are not available in Chef 12 stacks.

      Possible values include:
      • "aws-flow-ruby"
      • "ecs-cluster"
      • "java-app"
      • "lb"
      • "web"
      • "php-app"
      • "rails-app"
      • "nodejs-app"
      • "memcached"
      • "db-master"
      • "monitoring-master"
      • "custom"
    • Name — (String)

      The layer name, which is used by the console. Layer names can be a maximum of 32 characters.

    • Shortname — (String)

      For custom layers only, use this parameter to specify the layer's short name, which is used internally by OpsWorks Stacks and by Chef recipes. The short name is also used as the name for the directory where your app files are installed. It can have a maximum of 32 characters, which are limited to the alphanumeric characters, '-', '_', and '.'.

      Built-in layer short names are defined by OpsWorks Stacks. For more information, see the Layer Reference.

    • Attributes — (map<String>)

      One or more user-defined key-value pairs to be added to the stack attributes.

      To create a cluster layer, set the EcsClusterArn attribute to the cluster's ARN.

    • CloudWatchLogsConfiguration — (map)

      Specifies CloudWatch Logs configuration options for the layer. For more information, see CloudWatchLogsLogStream.

      • Enabled — (Boolean)

        Whether CloudWatch Logs is enabled for a layer.

      • LogStreams — (Array<map>)

        A list of configuration options for CloudWatch Logs.

        • LogGroupName — (String)

          Specifies the destination log group. A log group is created automatically if it doesn't already exist. Log group names can be between 1 and 512 characters long. Allowed characters include a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), '/' (forward slash), and '.' (period).

        • DatetimeFormat — (String)

          Specifies how the time stamp is extracted from logs. For more information, see the CloudWatch Logs Agent Reference.

        • TimeZone — (String)

          Specifies the time zone of log event time stamps.

          Possible values include:
          • "LOCAL"
          • "UTC"
        • File — (String)

          Specifies log files that you want to push to CloudWatch Logs.

          File can point to a specific file or multiple files (by using wild card characters such as /var/log/system.log*). Only the latest file is pushed to CloudWatch Logs, based on file modification time. We recommend that you use wild card characters to specify a series of files of the same type, such as access_log.2014-06-01-01, access_log.2014-06-01-02, and so on by using a pattern like access_log.*. Don't use a wildcard to match multiple file types, such as access_log_80 and access_log_443. To specify multiple, different file types, add another log stream entry to the configuration file, so that each log file type is stored in a different log group.

          Zipped files are not supported.

        • FileFingerprintLines — (String)

          Specifies the range of lines for identifying a file. The valid values are one number, or two dash-delimited numbers, such as '1', '2-5'. The default value is '1', meaning the first line is used to calculate the fingerprint. Fingerprint lines are not sent to CloudWatch Logs unless all specified lines are available.

        • MultiLineStartPattern — (String)

          Specifies the pattern for identifying the start of a log message.

        • InitialPosition — (String)

          Specifies where to start to read data (start_of_file or end_of_file). The default is start_of_file. This setting is only used if there is no state persisted for that log stream.

          Possible values include:
          • "start_of_file"
          • "end_of_file"
        • Encoding — (String)

          Specifies the encoding of the log file so that the file can be read correctly. The default is utf_8. Encodings supported by Python codecs.decode() can be used here.

          Possible values include:
          • "ascii"
          • "big5"
          • "big5hkscs"
          • "cp037"
          • "cp424"
          • "cp437"
          • "cp500"
          • "cp720"
          • "cp737"
          • "cp775"
          • "cp850"
          • "cp852"
          • "cp855"
          • "cp856"
          • "cp857"
          • "cp858"
          • "cp860"
          • "cp861"
          • "cp862"
          • "cp863"
          • "cp864"
          • "cp865"
          • "cp866"
          • "cp869"
          • "cp874"
          • "cp875"
          • "cp932"
          • "cp949"
          • "cp950"
          • "cp1006"
          • "cp1026"
          • "cp1140"
          • "cp1250"
          • "cp1251"
          • "cp1252"
          • "cp1253"
          • "cp1254"
          • "cp1255"
          • "cp1256"
          • "cp1257"
          • "cp1258"
          • "euc_jp"
          • "euc_jis_2004"
          • "euc_jisx0213"
          • "euc_kr"
          • "gb2312"
          • "gbk"
          • "gb18030"
          • "hz"
          • "iso2022_jp"
          • "iso2022_jp_1"
          • "iso2022_jp_2"
          • "iso2022_jp_2004"
          • "iso2022_jp_3"
          • "iso2022_jp_ext"
          • "iso2022_kr"
          • "latin_1"
          • "iso8859_2"
          • "iso8859_3"
          • "iso8859_4"
          • "iso8859_5"
          • "iso8859_6"
          • "iso8859_7"
          • "iso8859_8"
          • "iso8859_9"
          • "iso8859_10"
          • "iso8859_13"
          • "iso8859_14"
          • "iso8859_15"
          • "iso8859_16"
          • "johab"
          • "koi8_r"
          • "koi8_u"
          • "mac_cyrillic"
          • "mac_greek"
          • "mac_iceland"
          • "mac_latin2"
          • "mac_roman"
          • "mac_turkish"
          • "ptcp154"
          • "shift_jis"
          • "shift_jis_2004"
          • "shift_jisx0213"
          • "utf_32"
          • "utf_32_be"
          • "utf_32_le"
          • "utf_16"
          • "utf_16_be"
          • "utf_16_le"
          • "utf_7"
          • "utf_8"
          • "utf_8_sig"
        • BufferDuration — (Integer)

          Specifies the time duration for the batching of log events. The minimum value is 5000ms and default value is 5000ms.

        • BatchCount — (Integer)

          Specifies the max number of log events in a batch, up to 10000. The default value is 1000.

        • BatchSize — (Integer)

          Specifies the maximum size of log events in a batch, in bytes, up to 1048576 bytes. The default value is 32768 bytes. This size is calculated as the sum of all event messages in UTF-8, plus 26 bytes for each log event.

    • CustomInstanceProfileArn — (String)

      The ARN of an IAM profile to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

    • CustomJson — (String)

      A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances. For more information, see Using Custom JSON. This feature is supported as of version 1.7.42 of the CLI.

    • CustomSecurityGroupIds — (Array<String>)

      An array containing the layer custom security group IDs.

    • Packages — (Array<String>)

      An array of Package objects that describes the layer packages.

    • VolumeConfigurations — (Array<map>)

      A VolumeConfigurations object that describes the layer's Amazon EBS volumes.

      • MountPointrequired — (String)

        The volume mount point. For example "/dev/sdh".

      • RaidLevel — (Integer)

        The volume RAID level.

      • NumberOfDisksrequired — (Integer)

        The number of disks in the volume.

      • Sizerequired — (Integer)

        The volume size.

      • VolumeType — (String)

        The volume type. For more information, see Amazon EBS Volume Types.

        • standard - Magnetic. Magnetic volumes must have a minimum size of 1 GiB and a maximum size of 1024 GiB.

        • io1 - Provisioned IOPS (SSD). PIOPS volumes must have a minimum size of 4 GiB and a maximum size of 16384 GiB.

        • gp2 - General Purpose (SSD). General purpose volumes must have a minimum size of 1 GiB and a maximum size of 16384 GiB.

        • st1 - Throughput Optimized hard disk drive (HDD). Throughput optimized HDD volumes must have a minimum size of 125 GiB and a maximum size of 16384 GiB.

        • sc1 - Cold HDD. Cold HDD volumes must have a minimum size of 125 GiB and a maximum size of 16384 GiB.

      • Iops — (Integer)

        For PIOPS volumes, the IOPS per disk.

      • Encrypted — (Boolean)

        Specifies whether an Amazon EBS volume is encrypted. For more information, see Amazon EBS Encryption.

    • EnableAutoHealing — (Boolean)

      Whether to disable auto healing for the layer.

    • AutoAssignElasticIps — (Boolean)

      Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer.

    • AutoAssignPublicIps — (Boolean)

      For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances. For more information, see How to Edit a Layer.

    • CustomRecipes — (map)

      A LayerCustomRecipes object that specifies the layer custom recipes.

      • Setup — (Array<String>)

        An array of custom recipe names to be run following a setup event.

      • Configure — (Array<String>)

        An array of custom recipe names to be run following a configure event.

      • Deploy — (Array<String>)

        An array of custom recipe names to be run following a deploy event.

      • Undeploy — (Array<String>)

        An array of custom recipe names to be run following a undeploy event.

      • Shutdown — (Array<String>)

        An array of custom recipe names to be run following a shutdown event.

    • InstallUpdatesOnBoot — (Boolean)

      Whether to install operating system and package updates when the instance boots. The default value is true. To control when updates are installed, set this value to false. You must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

      Note: To ensure that your instances have the latest security updates, we strongly recommend using the default value of true.
    • UseEbsOptimizedInstances — (Boolean)

      Whether to use Amazon EBS-optimized instances.

    • LifecycleEventConfiguration — (map)

      A LifeCycleEventConfiguration object that you can use to configure the Shutdown event to specify an execution timeout and enable or disable Elastic Load Balancer connection draining.

      • Shutdown — (map)

        A ShutdownEventConfiguration object that specifies the Shutdown event configuration.

        • ExecutionTimeout — (Integer)

          The time, in seconds, that OpsWorks Stacks waits after triggering a Shutdown event before shutting down an instance.

        • DelayUntilElbConnectionsDrained — (Boolean)

          Whether to enable Elastic Load Balancing connection draining. For more information, see Connection Draining

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • LayerId — (String)

        The layer ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createStack(params = {}, callback) ⇒ AWS.Request

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the createStack operation

var params = {
  DefaultInstanceProfileArn: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE', /* required */
  Region: 'STRING_VALUE', /* required */
  ServiceRoleArn: 'STRING_VALUE', /* required */
  AgentVersion: 'STRING_VALUE',
  Attributes: {
    '<StackAttributesKeys>': 'STRING_VALUE',
    /* '<StackAttributesKeys>': ... */
  },
  ChefConfiguration: {
    BerkshelfVersion: 'STRING_VALUE',
    ManageBerkshelf: true || false
  },
  ConfigurationManager: {
    Name: 'STRING_VALUE',
    Version: 'STRING_VALUE'
  },
  CustomCookbooksSource: {
    Password: 'STRING_VALUE',
    Revision: 'STRING_VALUE',
    SshKey: 'STRING_VALUE',
    Type: git | svn | archive | s3,
    Url: 'STRING_VALUE',
    Username: 'STRING_VALUE'
  },
  CustomJson: 'STRING_VALUE',
  DefaultAvailabilityZone: 'STRING_VALUE',
  DefaultOs: 'STRING_VALUE',
  DefaultRootDeviceType: ebs | instance-store,
  DefaultSshKeyName: 'STRING_VALUE',
  DefaultSubnetId: 'STRING_VALUE',
  HostnameTheme: 'STRING_VALUE',
  UseCustomCookbooks: true || false,
  UseOpsworksSecurityGroups: true || false,
  VpcId: 'STRING_VALUE'
};
opsworks.createStack(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The stack name. Stack names can be a maximum of 64 characters.

    • Region — (String)

      The stack's Amazon Web Services Region, such as ap-south-1. For more information about Amazon Web Services Regions, see Regions and Endpoints.

      Note: In the CLI, this API maps to the --stack-region parameter. If the --stack-region parameter and the CLI common parameter --region are set to the same value, the stack uses a regional endpoint. If the --stack-region parameter is not set, but the CLI --region parameter is, this also results in a stack with a regional endpoint. However, if the --region parameter is set to us-east-1, and the --stack-region parameter is set to one of the following, then the stack uses a legacy or classic region: us-west-1, us-west-2, sa-east-1, eu-central-1, eu-west-1, ap-northeast-1, ap-southeast-1, ap-southeast-2. In this case, the actual API endpoint of the stack is in us-east-1. Only the preceding regions are supported as classic regions in the us-east-1 API endpoint. Because it is a best practice to choose the regional endpoint that is closest to where you manage Amazon Web Services, we recommend that you use regional endpoints for new stacks. The CLI common --region parameter always specifies a regional API endpoint; it cannot be used to specify a classic OpsWorks Stacks region.
    • VpcId — (String)

      The ID of the VPC that the stack is to be launched into. The VPC must be in the stack's region. All instances are launched into this VPC. You cannot change the ID later.

      • If your account supports EC2-Classic, the default value is no VPC.

      • If your account does not support EC2-Classic, the default value is the default VPC for the specified region.

      If the VPC ID corresponds to a default VPC and you have specified either the DefaultAvailabilityZone or the DefaultSubnetId parameter only, OpsWorks Stacks infers the value of the other parameter. If you specify neither parameter, OpsWorks Stacks sets these parameters to the first valid Availability Zone for the specified region and the corresponding default VPC subnet ID, respectively.

      If you specify a nondefault VPC ID, note the following:

      • It must belong to a VPC in your account that is in the specified region.

      • You must specify a value for DefaultSubnetId.

      For more information about how to use OpsWorks Stacks with a VPC, see Running a Stack in a VPC. For more information about default VPC and EC2-Classic, see Supported Platforms.

    • Attributes — (map<String>)

      One or more user-defined key-value pairs to be added to the stack attributes.

    • ServiceRoleArn — (String)

      The stack's IAM role, which allows OpsWorks Stacks to work with Amazon Web Services resources on your behalf. You must set this parameter to the Amazon Resource Name (ARN) for an existing IAM role. For more information about IAM ARNs, see Using Identifiers.

    • DefaultInstanceProfileArn — (String)

      The Amazon Resource Name (ARN) of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

    • DefaultOs — (String)

      The stack's default operating system, which is installed on every instance unless you specify a different operating system when you create the instance. You can specify one of the following.

      • A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2, Amazon Linux 2018.03, Amazon Linux 2017.09, Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03.

      • A supported Ubuntu operating system, such as Ubuntu 18.04 LTS, Ubuntu 16.04 LTS, Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS.

      • CentOS Linux 7

      • Red Hat Enterprise Linux 7

      • A supported Windows operating system, such as Microsoft Windows Server 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft Windows Server 2012 R2 with SQL Server Web.

      • A custom AMI: Custom. You specify the custom AMI you want to use when you create instances. For more information, see Using Custom AMIs.

      The default option is the current Amazon Linux version. Not all operating systems are supported with all versions of Chef. For more information about supported operating systems, see OpsWorks Stacks Operating Systems.

    • HostnameTheme — (String)

      The stack's host name theme, with spaces replaced by underscores. The theme is used to generate host names for the stack's instances. By default, HostnameTheme is set to Layer_Dependent, which creates host names by appending integers to the layer's short name. The other themes are:

      • Baked_Goods

      • Clouds

      • Europe_Cities

      • Fruits

      • Greek_Deities_and_Titans

      • Legendary_creatures_from_Japan

      • Planets_and_Moons

      • Roman_Deities

      • Scottish_Islands

      • US_Cities

      • Wild_Cats

      To obtain a generated host name, call GetHostNameSuggestion, which returns a host name based on the current theme.

    • DefaultAvailabilityZone — (String)

      The stack's default Availability Zone, which must be in the specified region. For more information, see Regions and Endpoints. If you also specify a value for DefaultSubnetId, the subnet must be in the same zone. For more information, see the VpcId parameter description.

    • DefaultSubnetId — (String)

      The stack's default VPC subnet ID. This parameter is required if you specify a value for the VpcId parameter. All instances are launched into this subnet unless you specify otherwise when you create the instance. If you also specify a value for DefaultAvailabilityZone, the subnet must be in that zone. For information on default values and when this parameter is required, see the VpcId parameter description.

    • CustomJson — (String)

      A string that contains user-defined, custom JSON. It can be used to override the corresponding default stack configuration attribute values or to pass data to recipes. The string should be in the following format:

      "{\"key1\": \"value1\", \"key2\": \"value2\",...}"

      For more information about custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes.

    • ConfigurationManager — (map)

      The configuration manager. When you create a stack we recommend that you use the configuration manager to specify the Chef version: 12, 11.10, or 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for Linux stacks is currently 12.

      • Name — (String)

        The name. This parameter must be set to Chef.

      • Version — (String)

        The Chef version. This parameter must be set to 12, 11.10, or 11.4 for Linux stacks, and to 12.2 for Windows stacks. The default value for Linux stacks is 12.

    • ChefConfiguration — (map)

      A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version on Chef 11.10 stacks. For more information, see Create a New Stack.

      • ManageBerkshelf — (Boolean)

        Whether to enable Berkshelf.

      • BerkshelfVersion — (String)

        The Berkshelf version.

    • UseCustomCookbooks — (Boolean)

      Whether the stack uses custom cookbooks.

    • UseOpsworksSecurityGroups — (Boolean)

      Whether to associate the OpsWorks Stacks built-in security groups with the stack's layers.

      OpsWorks Stacks provides a standard set of built-in security groups, one for each layer, which are associated with layers by default. With UseOpsworksSecurityGroups you can instead provide your own custom security groups. UseOpsworksSecurityGroups has the following settings:

      • True - OpsWorks Stacks automatically associates the appropriate built-in security group with each layer (default setting). You can associate additional security groups with a layer after you create it, but you cannot delete the built-in security group.

      • False - OpsWorks Stacks does not associate built-in security groups with layers. You must create appropriate EC2 security groups and associate a security group with each layer that you create. However, you can still manually associate a built-in security group with a layer on creation; custom security groups are required only for those layers that need custom settings.

      For more information, see Create a New Stack.

    • CustomCookbooksSource — (map)

      Contains the information required to retrieve an app or cookbook from a repository. For more information, see Adding Apps or Cookbooks and Recipes.

      • Type — (String)

        The repository type.

        Possible values include:
        • "git"
        • "svn"
        • "archive"
        • "s3"
      • Url — (String)

        The source URL. The following is an example of an Amazon S3 source URL: https://s3.amazonaws.com/opsworks-demo-bucket/opsworks&#95;cookbook&#95;demo.tar.gz.

      • Username — (String)

        This parameter depends on the repository type.

        • For Amazon S3 bundles, set Username to the appropriate IAM access key ID.

        • For HTTP bundles, Git repositories, and Subversion repositories, set Username to the user name.

      • Password — (String)

        When included in a request, the parameter depends on the repository type.

        • For Amazon S3 bundles, set Password to the appropriate IAM secret access key.

        • For HTTP bundles and Subversion repositories, set Password to the password.

        For more information on how to safely handle IAM credentials, see https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html.

        In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

      • SshKey — (String)

        In requests, the repository's SSH key.

        In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

      • Revision — (String)

        The application's version. OpsWorks Stacks enables you to easily deploy new versions of an application. One of the simplest approaches is to have branches or revisions in your repository that represent different versions that can potentially be deployed.

    • DefaultSshKeyName — (String)

      A default Amazon EC2 key pair name. The default value is none. If you specify a key pair name, OpsWorks installs the public key on the instance and you can use the private key with an SSH client to log in to the instance. For more information, see Using SSH to Communicate with an Instance and Managing SSH Access. You can override this setting by specifying a different key pair, or no key pair, when you create an instance.

    • DefaultRootDeviceType — (String)

      The default root device type. This value is the default for all instances in the stack, but you can override it when you create an instance. The default option is instance-store. For more information, see Storage for the Root Device.

      Possible values include:
      • "ebs"
      • "instance-store"
    • AgentVersion — (String)

      The default OpsWorks Stacks agent version. You have the following options:

      • Auto-update - Set this parameter to LATEST. OpsWorks Stacks automatically installs new agent versions on the stack's instances as soon as they are available.

      • Fixed version - Set this parameter to your preferred agent version. To update the agent version, you must edit the stack configuration and specify a new version. OpsWorks Stacks installs that version on the stack's instances.

      The default setting is the most recent release of the agent. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2.

      Note: You can also specify an agent version when you create or update an instance, which overrides the stack's default setting.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • StackId — (String)

        The stack ID, which is an opaque string that you use to identify the stack when performing actions such as DescribeStacks.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createUserProfile(params = {}, callback) ⇒ AWS.Request

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the createUserProfile operation

var params = {
  IamUserArn: 'STRING_VALUE', /* required */
  AllowSelfManagement: true || false,
  SshPublicKey: 'STRING_VALUE',
  SshUsername: 'STRING_VALUE'
};
opsworks.createUserProfile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • IamUserArn — (String)

      The user's IAM ARN; this can also be a federated user's ARN.

    • SshUsername — (String)

      The user's SSH user name. The allowable characters are [a-z], [A-Z], [0-9], '-', and '_'. If the specified name includes other punctuation marks, OpsWorks Stacks removes them. For example, my.name is changed to myname. If you do not specify an SSH user name, OpsWorks Stacks generates one from the IAM user name.

    • SshPublicKey — (String)

      The user's public SSH key.

    • AllowSelfManagement — (Boolean)

      Whether users can specify their own SSH public key through the My Settings page. For more information, see Setting an IAM User's Public SSH Key.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • IamUserArn — (String)

        The user's IAM ARN.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteApp(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the deleteApp operation

var params = {
  AppId: 'STRING_VALUE' /* required */
};
opsworks.deleteApp(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AppId — (String)

      The app ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteInstance(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the deleteInstance operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  DeleteElasticIp: true || false,
  DeleteVolumes: true || false
};
opsworks.deleteInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceId — (String)

      The instance ID.

    • DeleteElasticIp — (Boolean)

      Whether to delete the instance Elastic IP address.

    • DeleteVolumes — (Boolean)

      Whether to delete the instance's Amazon EBS volumes.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteLayer(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the deleteLayer operation

var params = {
  LayerId: 'STRING_VALUE' /* required */
};
opsworks.deleteLayer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • LayerId — (String)

      The layer ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteStack(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the deleteStack operation

var params = {
  StackId: 'STRING_VALUE' /* required */
};
opsworks.deleteStack(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The stack ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteUserProfile(params = {}, callback) ⇒ AWS.Request

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the deleteUserProfile operation

var params = {
  IamUserArn: 'STRING_VALUE' /* required */
};
opsworks.deleteUserProfile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • IamUserArn — (String)

      The user's IAM ARN. This can also be a federated user's ARN.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deregisterEcsCluster(params = {}, callback) ⇒ AWS.Request

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 https://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html.

Service Reference:

Examples:

Calling the deregisterEcsCluster operation

var params = {
  EcsClusterArn: 'STRING_VALUE' /* required */
};
opsworks.deregisterEcsCluster(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • EcsClusterArn — (String)

      The cluster's Amazon Resource Number (ARN).

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deregisterElasticIp(params = {}, callback) ⇒ AWS.Request

Deregisters a specified Elastic IP address. The address can be registered by another stack after it is deregistered. 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.

Service Reference:

Examples:

Calling the deregisterElasticIp operation

var params = {
  ElasticIp: 'STRING_VALUE' /* required */
};
opsworks.deregisterElasticIp(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ElasticIp — (String)

      The Elastic IP address.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deregisterInstance(params = {}, callback) ⇒ AWS.Request

Deregister an instance from OpsWorks Stacks. The instance can be a registered instance (Amazon EC2 or on-premises) or an instance created with OpsWorks. This action removes the instance from the stack and returns it to your control.

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.

Service Reference:

Examples:

Calling the deregisterInstance operation

var params = {
  InstanceId: 'STRING_VALUE' /* required */
};
opsworks.deregisterInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceId — (String)

      The instance ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deregisterRdsDbInstance(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the deregisterRdsDbInstance operation

var params = {
  RdsDbInstanceArn: 'STRING_VALUE' /* required */
};
opsworks.deregisterRdsDbInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • RdsDbInstanceArn — (String)

      The Amazon RDS instance's ARN.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deregisterVolume(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the deregisterVolume operation

var params = {
  VolumeId: 'STRING_VALUE' /* required */
};
opsworks.deregisterVolume(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • VolumeId — (String)

      The OpsWorks Stacks volume ID, which is the GUID that OpsWorks Stacks assigned to the instance when you registered the volume with the stack, not the Amazon EC2 volume ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeAgentVersions(params = {}, callback) ⇒ AWS.Request

Describes the available OpsWorks Stacks 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.

Service Reference:

Examples:

Calling the describeAgentVersions operation

var params = {
  ConfigurationManager: {
    Name: 'STRING_VALUE',
    Version: 'STRING_VALUE'
  },
  StackId: 'STRING_VALUE'
};
opsworks.describeAgentVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The stack ID.

    • ConfigurationManager — (map)

      The configuration manager.

      • Name — (String)

        The name. This parameter must be set to Chef.

      • Version — (String)

        The Chef version. This parameter must be set to 12, 11.10, or 11.4 for Linux stacks, and to 12.2 for Windows stacks. The default value for Linux stacks is 12.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AgentVersions — (Array<map>)

        The agent versions for the specified stack or configuration manager. Note that this value is the complete version number, not the abbreviated number used by the console.

        • Version — (String)

          The agent version.

        • ConfigurationManager — (map)

          The configuration manager.

          • Name — (String)

            The name. This parameter must be set to Chef.

          • Version — (String)

            The Chef version. This parameter must be set to 12, 11.10, or 11.4 for Linux stacks, and to 12.2 for Windows stacks. The default value for Linux stacks is 12.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeApps(params = {}, callback) ⇒ AWS.Request

Requests a description of a specified set of apps.

Note: This call accepts only one resource-identifying parameter.

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the describeApps operation

var params = {
  AppIds: [
    'STRING_VALUE',
    /* more items */
  ],
  StackId: 'STRING_VALUE'
};
opsworks.describeApps(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The app stack ID. If you use this parameter, DescribeApps returns a description of the apps in the specified stack.

    • AppIds — (Array<String>)

      An array of app IDs for the apps to be described. If you use this parameter, DescribeApps returns a description of the specified apps. Otherwise, it returns a description of every app.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Apps — (Array<map>)

        An array of App objects that describe the specified apps.

        • AppId — (String)

          The app ID.

        • StackId — (String)

          The app stack ID.

        • Shortname — (String)

          The app's short name.

        • Name — (String)

          The app name.

        • Description — (String)

          A description of the app.

        • DataSources — (Array<map>)

          The app's data sources.

          • Type — (String)

            The data source's type, AutoSelectOpsworksMysqlInstance, OpsworksMysqlInstance, RdsDbInstance, or None.

          • Arn — (String)

            The data source's ARN.

          • DatabaseName — (String)

            The database name.

        • Type — (String)

          The app type.

          Possible values include:
          • "aws-flow-ruby"
          • "java"
          • "rails"
          • "php"
          • "nodejs"
          • "static"
          • "other"
        • AppSource — (map)

          A Source object that describes the app repository.

          • Type — (String)

            The repository type.

            Possible values include:
            • "git"
            • "svn"
            • "archive"
            • "s3"
          • Url — (String)

            The source URL. The following is an example of an Amazon S3 source URL: https://s3.amazonaws.com/opsworks-demo-bucket/opsworks&#95;cookbook&#95;demo.tar.gz.

          • Username — (String)

            This parameter depends on the repository type.

            • For Amazon S3 bundles, set Username to the appropriate IAM access key ID.

            • For HTTP bundles, Git repositories, and Subversion repositories, set Username to the user name.

          • Password — (String)

            When included in a request, the parameter depends on the repository type.

            • For Amazon S3 bundles, set Password to the appropriate IAM secret access key.

            • For HTTP bundles and Subversion repositories, set Password to the password.

            For more information on how to safely handle IAM credentials, see https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html.

            In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

          • SshKey — (String)

            In requests, the repository's SSH key.

            In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

          • Revision — (String)

            The application's version. OpsWorks Stacks enables you to easily deploy new versions of an application. One of the simplest approaches is to have branches or revisions in your repository that represent different versions that can potentially be deployed.

        • Domains — (Array<String>)

          The app vhost settings with multiple domains separated by commas. For example: 'www.example.com, example.com'

        • EnableSsl — (Boolean)

          Whether to enable SSL for the app.

        • SslConfiguration — (map)

          An SslConfiguration object with the SSL configuration.

          • Certificaterequired — (String)

            The contents of the certificate's domain.crt file.

          • PrivateKeyrequired — (String)

            The private key; the contents of the certificate's domain.kex file.

          • Chain — (String)

            Optional. Can be used to specify an intermediate certificate authority key or client authentication.

        • Attributes — (map<String>)

          The stack attributes.

        • CreatedAt — (String)

          When the app was created.

        • Environment — (Array<map>)

          An array of EnvironmentVariable objects that specify environment variables to be associated with the app. After you deploy the app, these variables are defined on the associated app server instances. For more information, see Environment Variables.

          Note: There is no specific limit on the number of environment variables. However, the size of the associated data structure - which includes the variable names, values, and protected flag values - cannot exceed 20 KB. This limit should accommodate most if not all use cases, but if you do exceed it, you will cause an exception (API) with an "Environment: is too large (maximum is 20 KB)" message.
          • Keyrequired — (String)

            (Required) The environment variable's name, which can consist of up to 64 characters and must be specified. The name can contain upper- and lowercase letters, numbers, and underscores (_), but it must start with a letter or underscore.

          • Valuerequired — (String)

            (Optional) The environment variable's value, which can be left empty. If you specify a value, it can contain up to 256 characters, which must all be printable.

          • Secure — (Boolean)

            (Optional) Whether the variable's value is returned by the DescribeApps action. To hide an environment variable's value, set Secure to true. DescribeApps returns *****FILTERED***** instead of the actual value. The default value for Secure is false.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

describeCommands(params = {}, callback) ⇒ AWS.Request

Describes the results of specified commands.

Note: This call accepts only one resource-identifying parameter.

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the describeCommands operation

var params = {
  CommandIds: [
    'STRING_VALUE',
    /* more items */
  ],
  DeploymentId: 'STRING_VALUE',
  InstanceId: 'STRING_VALUE'
};
opsworks.describeCommands(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DeploymentId — (String)

      The deployment ID. If you include this parameter, DescribeCommands returns a description of the commands associated with the specified deployment.

    • InstanceId — (String)

      The instance ID. If you include this parameter, DescribeCommands returns a description of the commands associated with the specified instance.

    • CommandIds — (Array<String>)

      An array of command IDs. If you include this parameter, DescribeCommands returns a description of the specified commands. Otherwise, it returns a description of every command.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Commands — (Array<map>)

        An array of Command objects that describe each of the specified commands.

        • CommandId — (String)

          The command ID.

        • InstanceId — (String)

          The ID of the instance where the command was executed.

        • DeploymentId — (String)

          The command deployment ID.

        • CreatedAt — (String)

          Date and time when the command was run.

        • AcknowledgedAt — (String)

          Date and time when the command was acknowledged.

        • CompletedAt — (String)

          Date when the command completed.

        • Status — (String)

          The command status:

          • failed

          • successful

          • skipped

          • pending

        • ExitCode — (Integer)

          The command exit code.

        • LogUrl — (String)

          The URL of the command log.

        • Type — (String)

          The command type:

          • configure

          • deploy

          • execute_recipes

          • install_dependencies

          • restart

          • rollback

          • setup

          • start

          • stop

          • undeploy

          • update_custom_cookbooks

          • update_dependencies

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeDeployments(params = {}, callback) ⇒ AWS.Request

Requests a description of a specified set of deployments.

Note: This call accepts only one resource-identifying parameter.

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the describeDeployments operation

var params = {
  AppId: 'STRING_VALUE',
  DeploymentIds: [
    'STRING_VALUE',
    /* more items */
  ],
  StackId: 'STRING_VALUE'
};
opsworks.describeDeployments(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The stack ID. If you include this parameter, the command returns a description of the commands associated with the specified stack.

    • AppId — (String)

      The app ID. If you include this parameter, the command returns a description of the commands associated with the specified app.

    • DeploymentIds — (Array<String>)

      An array of deployment IDs to be described. If you include this parameter, the command returns a description of the specified deployments. Otherwise, it returns a description of every deployment.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Deployments — (Array<map>)

        An array of Deployment objects that describe the deployments.

        • DeploymentId — (String)

          The deployment ID.

        • StackId — (String)

          The stack ID.

        • AppId — (String)

          The app ID.

        • CreatedAt — (String)

          Date when the deployment was created.

        • CompletedAt — (String)

          Date when the deployment completed.

        • Duration — (Integer)

          The deployment duration.

        • IamUserArn — (String)

          The user's IAM ARN.

        • Comment — (String)

          A user-defined comment.

        • Command — (map)

          Used to specify a stack or deployment command.

          • Namerequired — (String)

            Specifies the operation. You can specify only one command.

            For stacks, the following commands are available:

            • execute_recipes: Execute one or more recipes. To specify the recipes, set an Args parameter named recipes to the list of recipes to be executed. For example, to execute phpapp::appsetup, set Args to {"recipes":["phpapp::appsetup"]}.

            • install_dependencies: Install the stack's dependencies.

            • update_custom_cookbooks: Update the stack's custom cookbooks.

            • update_dependencies: Update the stack's dependencies.

            Note: The update_dependencies and install_dependencies commands are supported only for Linux instances. You can run the commands successfully on Windows instances, but they do nothing.

            For apps, the following commands are available:

            • deploy: Deploy an app. Ruby on Rails apps have an optional Args parameter named migrate. Set Args to {"migrate":["true"]} to migrate the database. The default setting is {"migrate":["false"]}.

            • rollback Roll the app back to the previous version. When you update an app, OpsWorks Stacks stores the previous version, up to a maximum of five versions. You can use this command to roll an app back as many as four versions.

            • start: Start the app's web or application server.

            • stop: Stop the app's web or application server.

            • restart: Restart the app's web or application server.

            • undeploy: Undeploy the app.

            Possible values include:
            • "install_dependencies"
            • "update_dependencies"
            • "update_custom_cookbooks"
            • "execute_recipes"
            • "configure"
            • "setup"
            • "deploy"
            • "rollback"
            • "start"
            • "stop"
            • "restart"
            • "undeploy"
          • Args — (map<Array<String>>)

            The arguments of those commands that take arguments. It should be set to a JSON object with the following format:

            {"arg_name1" : ["value1", "value2", ...], "arg_name2" : ["value1", "value2", ...], ...}

            The update_dependencies command takes two arguments:

            • upgrade_os_to - Specifies the Amazon Linux version that you want instances to run, such as Amazon Linux 2. You must also set the allow_reboot argument to true.

            • allow_reboot - Specifies whether to allow OpsWorks Stacks to reboot the instances if necessary, after installing the updates. This argument can be set to either true or false. The default value is false.

            For example, to upgrade an instance to Amazon Linux 2018.03, set Args to the following.

            { "upgrade_os_to":["Amazon Linux 2018.03"], "allow_reboot":["true"] }

        • Status — (String)

          The deployment status:

          • running

          • successful

          • failed

        • CustomJson — (String)

          A string that contains user-defined custom JSON. It can be used to override the corresponding default stack configuration attribute values for stack or to pass data to recipes. The string should be in the following format:

          "{\"key1\": \"value1\", \"key2\": \"value2\",...}"

          For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes.

        • InstanceIds — (Array<String>)

          The IDs of the target instances.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

describeEcsClusters(params = {}, callback) ⇒ AWS.Request

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, OpsWorks Stacks 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 about user permissions, see Managing User Permissions.

This call accepts only one resource-identifying parameter.

Service Reference:

Examples:

Calling the describeEcsClusters operation

var params = {
  EcsClusterArns: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  StackId: 'STRING_VALUE'
};
opsworks.describeEcsClusters(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • EcsClusterArns — (Array<String>)

      A list of ARNs, one for each cluster to be described.

    • StackId — (String)

      A stack ID. DescribeEcsClusters returns a description of the cluster that is registered with the stack.

    • NextToken — (String)

      If the previous paginated request did not return all of the remaining results, the response object'sNextToken parameter value is set to a token. To retrieve the next set of results, call DescribeEcsClusters again and assign that token to the request object's NextToken parameter. If there are no remaining results, the previous response object's NextToken parameter is set to null.

    • MaxResults — (Integer)

      To receive a paginated response, use this parameter to specify the maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EcsClusters — (Array<map>)

        A list of EcsCluster objects containing the cluster descriptions.

        • EcsClusterArn — (String)

          The cluster's ARN.

        • EcsClusterName — (String)

          The cluster name.

        • StackId — (String)

          The stack ID.

        • RegisteredAt — (String)

          The time and date that the cluster was registered with the stack.

      • NextToken — (String)

        If a paginated request does not return all of the remaining results, this parameter is set to a token that you can assign to the request object's NextToken parameter to retrieve the next set of results. If the previous paginated request returned all of the remaining results, this parameter is set to null.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeElasticIps(params = {}, callback) ⇒ AWS.Request

Describes Elastic IP addresses.

Note: This call accepts only one resource-identifying parameter.

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the describeElasticIps operation

var params = {
  InstanceId: 'STRING_VALUE',
  Ips: [
    'STRING_VALUE',
    /* more items */
  ],
  StackId: 'STRING_VALUE'
};
opsworks.describeElasticIps(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceId — (String)

      The instance ID. If you include this parameter, DescribeElasticIps returns a description of the Elastic IP addresses associated with the specified instance.

    • StackId — (String)

      A stack ID. If you include this parameter, DescribeElasticIps returns a description of the Elastic IP addresses that are registered with the specified stack.

    • Ips — (Array<String>)

      An array of Elastic IP addresses to be described. If you include this parameter, DescribeElasticIps returns a description of the specified Elastic IP addresses. Otherwise, it returns a description of every Elastic IP address.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ElasticIps — (Array<map>)

        An ElasticIps object that describes the specified Elastic IP addresses.

        • Ip — (String)

          The IP address.

        • Name — (String)

          The name, which can be a maximum of 32 characters.

        • Domain — (String)

          The domain.

        • Region — (String)

          The Amazon Web Services Region. For more information, see Regions and Endpoints.

        • InstanceId — (String)

          The ID of the instance that the address is attached to.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeElasticLoadBalancers(params = {}, callback) ⇒ AWS.Request

Describes a stack's Elastic Load Balancing instances.

Note: This call accepts only one resource-identifying parameter.

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the describeElasticLoadBalancers operation

var params = {
  LayerIds: [
    'STRING_VALUE',
    /* more items */
  ],
  StackId: 'STRING_VALUE'
};
opsworks.describeElasticLoadBalancers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      A stack ID. The action describes the stack's Elastic Load Balancing instances.

    • LayerIds — (Array<String>)

      A list of layer IDs. The action describes the Elastic Load Balancing instances for the specified layers.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ElasticLoadBalancers — (Array<map>)

        A list of ElasticLoadBalancer objects that describe the specified Elastic Load Balancing instances.

        • ElasticLoadBalancerName — (String)

          The Elastic Load Balancing instance name.

        • Region — (String)

          The instance's Amazon Web Services Region.

        • DnsName — (String)

          The instance's public DNS name.

        • StackId — (String)

          The ID of the stack with which the instance is associated.

        • LayerId — (String)

          The ID of the layer to which the instance is attached.

        • VpcId — (String)

          The VPC ID.

        • AvailabilityZones — (Array<String>)

          A list of Availability Zones.

        • SubnetIds — (Array<String>)

          A list of subnet IDs, if the stack is running in a VPC.

        • Ec2InstanceIds — (Array<String>)

          A list of the EC2 instances for which the Elastic Load Balancing instance is managing traffic.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeInstances(params = {}, callback) ⇒ AWS.Request

Requests a description of a set of instances.

Note: This call accepts only one resource-identifying parameter.

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the describeInstances operation

var params = {
  InstanceIds: [
    'STRING_VALUE',
    /* more items */
  ],
  LayerId: 'STRING_VALUE',
  StackId: 'STRING_VALUE'
};
opsworks.describeInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      A stack ID. If you use this parameter, DescribeInstances returns descriptions of the instances associated with the specified stack.

    • LayerId — (String)

      A layer ID. If you use this parameter, DescribeInstances returns descriptions of the instances associated with the specified layer.

    • InstanceIds — (Array<String>)

      An array of instance IDs to be described. If you use this parameter, DescribeInstances returns a description of the specified instances. Otherwise, it returns a description of every instance.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Instances — (Array<map>)

        An array of Instance objects that describe the instances.

        • AgentVersion — (String)

          The agent version. This parameter is set to INHERIT if the instance inherits the default stack setting or to a a version number for a fixed agent version.

        • AmiId — (String)

          A custom AMI ID to be used to create the instance. For more information, see Instances

        • Architecture — (String)

          The instance architecture: "i386" or "x86_64".

          Possible values include:
          • "x86_64"
          • "i386"
        • Arn — (String)

          The instance's Amazon Resource Number (ARN).

        • AutoScalingType — (String)

          For load-based or time-based instances, the type.

          Possible values include:
          • "load"
          • "timer"
        • AvailabilityZone — (String)

          The instance Availability Zone. For more information, see Regions and Endpoints.

        • BlockDeviceMappings — (Array<map>)

          An array of BlockDeviceMapping objects that specify the instance's block device mappings.

          • DeviceName — (String)

            The device name that is exposed to the instance, such as /dev/sdh. For the root device, you can use the explicit device name or you can set this parameter to ROOT_DEVICE and OpsWorks Stacks will provide the correct device name.

          • NoDevice — (String)

            Suppresses the specified device included in the AMI's block device mapping.

          • VirtualName — (String)

            The virtual device name. For more information, see BlockDeviceMapping.

          • Ebs — (map)

            An EBSBlockDevice that defines how to configure an Amazon EBS volume when the instance is launched.

            • SnapshotId — (String)

              The snapshot ID.

            • Iops — (Integer)

              The number of I/O operations per second (IOPS) that the volume supports. For more information, see EbsBlockDevice.

            • VolumeSize — (Integer)

              The volume size, in GiB. For more information, see EbsBlockDevice.

            • VolumeType — (String)

              The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized hard disk drives (HDD), sc1 for Cold HDD,and standard for Magnetic volumes.

              If you specify the io1 volume type, you must also specify a value for the Iops attribute. The maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1. Amazon Web Services uses the default volume size (in GiB) specified in the AMI attributes to set IOPS to 50 x (volume size).

              Possible values include:
              • "gp2"
              • "io1"
              • "standard"
            • DeleteOnTermination — (Boolean)

              Whether the volume is deleted on instance termination.

        • CreatedAt — (String)

          The time that the instance was created.

        • EbsOptimized — (Boolean)

          Whether this is an Amazon EBS-optimized instance.

        • Ec2InstanceId — (String)

          The ID of the associated Amazon EC2 instance.

        • EcsClusterArn — (String)

          For container instances, the Amazon ECS cluster's ARN.

        • EcsContainerInstanceArn — (String)

          For container instances, the instance's ARN.

        • ElasticIp — (String)

          The instance Elastic IP address.

        • Hostname — (String)

          The instance host name. The following are character limits for instance host names.

          • Linux-based instances: 63 characters

          • Windows-based instances: 15 characters

        • InfrastructureClass — (String)

          For registered instances, the infrastructure class: ec2 or on-premises.

        • InstallUpdatesOnBoot — (Boolean)

          Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must update instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

          Note: We strongly recommend using the default value of true to ensure that your instances have the latest security updates.
        • InstanceId — (String)

          The instance ID.

        • InstanceProfileArn — (String)

          The ARN of the instance's IAM profile. For more information about IAM ARNs, see Using Identifiers.

        • InstanceType — (String)

          The instance type, such as t2.micro.

        • LastServiceErrorId — (String)

          The ID of the last service error. For more information, call DescribeServiceErrors.

        • LayerIds — (Array<String>)

          An array containing the instance layer IDs.

        • Os — (String)

          The instance's operating system.

        • Platform — (String)

          The instance's platform.

        • PrivateDns — (String)

          The instance's private DNS name.

        • PrivateIp — (String)

          The instance's private IP address.

        • PublicDns — (String)

          The instance public DNS name.

        • PublicIp — (String)

          The instance public IP address.

        • RegisteredBy — (String)

          For registered instances, who performed the registration.

        • ReportedAgentVersion — (String)

          The instance's reported OpsWorks Stacks agent version.

        • ReportedOs — (map)

          For registered instances, the reported operating system.

          • Family — (String)

            The operating system family.

          • Name — (String)

            The operating system name.

          • Version — (String)

            The operating system version.

        • RootDeviceType — (String)

          The instance's root device type. For more information, see Storage for the Root Device.

          Possible values include:
          • "ebs"
          • "instance-store"
        • RootDeviceVolumeId — (String)

          The root device volume ID.

        • SecurityGroupIds — (Array<String>)

          An array containing the instance security group IDs.

        • SshHostDsaKeyFingerprint — (String)

          The SSH key's Deep Security Agent (DSA) fingerprint.

        • SshHostRsaKeyFingerprint — (String)

          The SSH key's RSA fingerprint.

        • SshKeyName — (String)

          The instance's Amazon EC2 key-pair name.

        • StackId — (String)

          The stack ID.

        • Status — (String)

          The instance status:

          • booting

          • connection_lost

          • online

          • pending

          • rebooting

          • requested

          • running_setup

          • setup_failed

          • shutting_down

          • start_failed

          • stop_failed

          • stopped

          • stopping

          • terminated

          • terminating

        • SubnetId — (String)

          The instance's subnet ID; applicable only if the stack is running in a VPC.

        • Tenancy — (String)

          The instance's tenancy option, such as dedicated or host.

        • VirtualizationType — (String)

          The instance's virtualization type: paravirtual or hvm.

          Possible values include:
          • "paravirtual"
          • "hvm"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

describeLayers(params = {}, callback) ⇒ AWS.Request

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

Note: This call accepts only one resource-identifying parameter.

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the describeLayers operation

var params = {
  LayerIds: [
    'STRING_VALUE',
    /* more items */
  ],
  StackId: 'STRING_VALUE'
};
opsworks.describeLayers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The stack ID.

    • LayerIds — (Array<String>)

      An array of layer IDs that specify the layers to be described. If you omit this parameter, DescribeLayers returns a description of every layer in the specified stack.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Layers — (Array<map>)

        An array of Layer objects that describe the layers.

        • Arn — (String)

          The Amazon Resource Number (ARN) of a layer.

        • StackId — (String)

          The layer stack ID.

        • LayerId — (String)

          The layer ID.

        • Type — (String)

          The layer type.

          Possible values include:
          • "aws-flow-ruby"
          • "ecs-cluster"
          • "java-app"
          • "lb"
          • "web"
          • "php-app"
          • "rails-app"
          • "nodejs-app"
          • "memcached"
          • "db-master"
          • "monitoring-master"
          • "custom"
        • Name — (String)

          The layer name. Layer names can be a maximum of 32 characters.

        • Shortname — (String)

          The layer short name.

        • Attributes — (map<String>)

          The layer attributes.

          For the HaproxyStatsPassword, MysqlRootPassword, and GangliaPassword attributes, OpsWorks Stacks returns *****FILTERED***** instead of the actual value

          For an ECS Cluster layer, OpsWorks Stacks the EcsClusterArn attribute is set to the cluster's ARN.

        • CloudWatchLogsConfiguration — (map)

          The Amazon CloudWatch Logs configuration settings for the layer.

          • Enabled — (Boolean)

            Whether CloudWatch Logs is enabled for a layer.

          • LogStreams — (Array<map>)

            A list of configuration options for CloudWatch Logs.

            • LogGroupName — (String)

              Specifies the destination log group. A log group is created automatically if it doesn't already exist. Log group names can be between 1 and 512 characters long. Allowed characters include a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), '/' (forward slash), and '.' (period).

            • DatetimeFormat — (String)

              Specifies how the time stamp is extracted from logs. For more information, see the CloudWatch Logs Agent Reference.

            • TimeZone — (String)

              Specifies the time zone of log event time stamps.

              Possible values include:
              • "LOCAL"
              • "UTC"
            • File — (String)

              Specifies log files that you want to push to CloudWatch Logs.

              File can point to a specific file or multiple files (by using wild card characters such as /var/log/system.log*). Only the latest file is pushed to CloudWatch Logs, based on file modification time. We recommend that you use wild card characters to specify a series of files of the same type, such as access_log.2014-06-01-01, access_log.2014-06-01-02, and so on by using a pattern like access_log.*. Don't use a wildcard to match multiple file types, such as access_log_80 and access_log_443. To specify multiple, different file types, add another log stream entry to the configuration file, so that each log file type is stored in a different log group.

              Zipped files are not supported.

            • FileFingerprintLines — (String)

              Specifies the range of lines for identifying a file. The valid values are one number, or two dash-delimited numbers, such as '1', '2-5'. The default value is '1', meaning the first line is used to calculate the fingerprint. Fingerprint lines are not sent to CloudWatch Logs unless all specified lines are available.

            • MultiLineStartPattern — (String)

              Specifies the pattern for identifying the start of a log message.

            • InitialPosition — (String)

              Specifies where to start to read data (start_of_file or end_of_file). The default is start_of_file. This setting is only used if there is no state persisted for that log stream.

              Possible values include:
              • "start_of_file"
              • "end_of_file"
            • Encoding — (String)

              Specifies the encoding of the log file so that the file can be read correctly. The default is utf_8. Encodings supported by Python codecs.decode() can be used here.

              Possible values include:
              • "ascii"
              • "big5"
              • "big5hkscs"
              • "cp037"
              • "cp424"
              • "cp437"
              • "cp500"
              • "cp720"
              • "cp737"
              • "cp775"
              • "cp850"
              • "cp852"
              • "cp855"
              • "cp856"
              • "cp857"
              • "cp858"
              • "cp860"
              • "cp861"
              • "cp862"
              • "cp863"
              • "cp864"
              • "cp865"
              • "cp866"
              • "cp869"
              • "cp874"
              • "cp875"
              • "cp932"
              • "cp949"
              • "cp950"
              • "cp1006"
              • "cp1026"
              • "cp1140"
              • "cp1250"
              • "cp1251"
              • "cp1252"
              • "cp1253"
              • "cp1254"
              • "cp1255"
              • "cp1256"
              • "cp1257"
              • "cp1258"
              • "euc_jp"
              • "euc_jis_2004"
              • "euc_jisx0213"
              • "euc_kr"
              • "gb2312"
              • "gbk"
              • "gb18030"
              • "hz"
              • "iso2022_jp"
              • "iso2022_jp_1"
              • "iso2022_jp_2"
              • "iso2022_jp_2004"
              • "iso2022_jp_3"
              • "iso2022_jp_ext"
              • "iso2022_kr"
              • "latin_1"
              • "iso8859_2"
              • "iso8859_3"
              • "iso8859_4"
              • "iso8859_5"
              • "iso8859_6"
              • "iso8859_7"
              • "iso8859_8"
              • "iso8859_9"
              • "iso8859_10"
              • "iso8859_13"
              • "iso8859_14"
              • "iso8859_15"
              • "iso8859_16"
              • "johab"
              • "koi8_r"
              • "koi8_u"
              • "mac_cyrillic"
              • "mac_greek"
              • "mac_iceland"
              • "mac_latin2"
              • "mac_roman"
              • "mac_turkish"
              • "ptcp154"
              • "shift_jis"
              • "shift_jis_2004"
              • "shift_jisx0213"
              • "utf_32"
              • "utf_32_be"
              • "utf_32_le"
              • "utf_16"
              • "utf_16_be"
              • "utf_16_le"
              • "utf_7"
              • "utf_8"
              • "utf_8_sig"
            • BufferDuration — (Integer)

              Specifies the time duration for the batching of log events. The minimum value is 5000ms and default value is 5000ms.

            • BatchCount — (Integer)

              Specifies the max number of log events in a batch, up to 10000. The default value is 1000.

            • BatchSize — (Integer)

              Specifies the maximum size of log events in a batch, in bytes, up to 1048576 bytes. The default value is 32768 bytes. This size is calculated as the sum of all event messages in UTF-8, plus 26 bytes for each log event.

        • CustomInstanceProfileArn — (String)

          The ARN of the default IAM profile to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

        • CustomJson — (String)

          A JSON formatted string containing the layer's custom stack configuration and deployment attributes.

        • CustomSecurityGroupIds — (Array<String>)

          An array containing the layer's custom security group IDs.

        • DefaultSecurityGroupNames — (Array<String>)

          An array containing the layer's security group names.

        • Packages — (Array<String>)

          An array of Package objects that describe the layer's packages.

        • VolumeConfigurations — (Array<map>)

          A VolumeConfigurations object that describes the layer's Amazon EBS volumes.

          • MountPointrequired — (String)

            The volume mount point. For example "/dev/sdh".

          • RaidLevel — (Integer)

            The volume RAID level.

          • NumberOfDisksrequired — (Integer)

            The number of disks in the volume.

          • Sizerequired — (Integer)

            The volume size.

          • VolumeType — (String)

            The volume type. For more information, see Amazon EBS Volume Types.

            • standard - Magnetic. Magnetic volumes must have a minimum size of 1 GiB and a maximum size of 1024 GiB.

            • io1 - Provisioned IOPS (SSD). PIOPS volumes must have a minimum size of 4 GiB and a maximum size of 16384 GiB.

            • gp2 - General Purpose (SSD). General purpose volumes must have a minimum size of 1 GiB and a maximum size of 16384 GiB.

            • st1 - Throughput Optimized hard disk drive (HDD). Throughput optimized HDD volumes must have a minimum size of 125 GiB and a maximum size of 16384 GiB.

            • sc1 - Cold HDD. Cold HDD volumes must have a minimum size of 125 GiB and a maximum size of 16384 GiB.

          • Iops — (Integer)

            For PIOPS volumes, the IOPS per disk.

          • Encrypted — (Boolean)

            Specifies whether an Amazon EBS volume is encrypted. For more information, see Amazon EBS Encryption.

        • EnableAutoHealing — (Boolean)

          Whether auto healing is disabled for the layer.

        • AutoAssignElasticIps — (Boolean)

          Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer.

        • AutoAssignPublicIps — (Boolean)

          For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances. For more information, see How to Edit a Layer.

        • DefaultRecipes — (map)

          OpsWorks Stacks supports five lifecycle events: setup, configuration, deploy, undeploy, and shutdown. For each layer, OpsWorks Stacks runs a set of standard recipes for each event. You can also provide custom recipes for any or all layers and events. OpsWorks Stacks runs custom event recipes after the standard recipes. LayerCustomRecipes specifies the custom recipes for a particular layer to be run in response to each of the five events.

          To specify a recipe, use the cookbook's directory name in the repository followed by two colons and the recipe name, which is the recipe's file name without the .rb extension. For example: phpapp2::dbsetup specifies the dbsetup.rb recipe in the repository's phpapp2 folder.

          • Setup — (Array<String>)

            An array of custom recipe names to be run following a setup event.

          • Configure — (Array<String>)

            An array of custom recipe names to be run following a configure event.

          • Deploy — (Array<String>)

            An array of custom recipe names to be run following a deploy event.

          • Undeploy — (Array<String>)

            An array of custom recipe names to be run following a undeploy event.

          • Shutdown — (Array<String>)

            An array of custom recipe names to be run following a shutdown event.

        • CustomRecipes — (map)

          A LayerCustomRecipes object that specifies the layer's custom recipes.

          • Setup — (Array<String>)

            An array of custom recipe names to be run following a setup event.

          • Configure — (Array<String>)

            An array of custom recipe names to be run following a configure event.

          • Deploy — (Array<String>)

            An array of custom recipe names to be run following a deploy event.

          • Undeploy — (Array<String>)

            An array of custom recipe names to be run following a undeploy event.

          • Shutdown — (Array<String>)

            An array of custom recipe names to be run following a shutdown event.

        • CreatedAt — (String)

          Date when the layer was created.

        • InstallUpdatesOnBoot — (Boolean)

          Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

          Note: We strongly recommend using the default value of true, to ensure that your instances have the latest security updates.
        • UseEbsOptimizedInstances — (Boolean)

          Whether the layer uses Amazon EBS-optimized instances.

        • LifecycleEventConfiguration — (map)

          A LifeCycleEventConfiguration object that specifies the Shutdown event configuration.

          • Shutdown — (map)

            A ShutdownEventConfiguration object that specifies the Shutdown event configuration.

            • ExecutionTimeout — (Integer)

              The time, in seconds, that OpsWorks Stacks waits after triggering a Shutdown event before shutting down an instance.

            • DelayUntilElbConnectionsDrained — (Boolean)

              Whether to enable Elastic Load Balancing connection draining. For more information, see Connection Draining

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeLoadBasedAutoScaling(params = {}, callback) ⇒ AWS.Request

Describes load-based auto scaling configurations for specified layers.

Note: 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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the describeLoadBasedAutoScaling operation

var params = {
  LayerIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
opsworks.describeLoadBasedAutoScaling(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • LayerIds — (Array<String>)

      An array of layer IDs.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • LoadBasedAutoScalingConfigurations — (Array<map>)

        An array of LoadBasedAutoScalingConfiguration objects that describe each layer's configuration.

        • LayerId — (String)

          The layer ID.

        • Enable — (Boolean)

          Whether load-based auto scaling is enabled for the layer.

        • UpScaling — (map)

          An AutoScalingThresholds object that describes the upscaling configuration, which defines how and when OpsWorks Stacks increases the number of instances.

          • InstanceCount — (Integer)

            The number of instances to add or remove when the load exceeds a threshold.

          • ThresholdsWaitTime — (Integer)

            The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.

          • IgnoreMetricsTime — (Integer)

            The amount of time (in minutes) after a scaling event occurs that OpsWorks Stacks should ignore metrics and suppress additional scaling events. For example, OpsWorks Stacks adds new instances following an upscaling event but the instances won't start reducing the load until they have been booted and configured. There is no point in raising additional scaling events during that operation, which typically takes several minutes. IgnoreMetricsTime allows you to direct OpsWorks Stacks to suppress scaling events long enough to get the new instances online.

          • CpuThreshold — (Float)

            The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.

          • MemoryThreshold — (Float)

            The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.

          • LoadThreshold — (Float)

            The load threshold. A value of -1 disables the threshold. For more information about how load is computed, see Load (computing).

          • Alarms — (Array<String>)

            Custom CloudWatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.

            Note: To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms. You can either have OpsWorks Stacks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing OpsWorks Stacks to Act on Your Behalf.
        • DownScaling — (map)

          An AutoScalingThresholds object that describes the downscaling configuration, which defines how and when OpsWorks Stacks reduces the number of instances.

          • InstanceCount — (Integer)

            The number of instances to add or remove when the load exceeds a threshold.

          • ThresholdsWaitTime — (Integer)

            The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.

          • IgnoreMetricsTime — (Integer)

            The amount of time (in minutes) after a scaling event occurs that OpsWorks Stacks should ignore metrics and suppress additional scaling events. For example, OpsWorks Stacks adds new instances following an upscaling event but the instances won't start reducing the load until they have been booted and configured. There is no point in raising additional scaling events during that operation, which typically takes several minutes. IgnoreMetricsTime allows you to direct OpsWorks Stacks to suppress scaling events long enough to get the new instances online.

          • CpuThreshold — (Float)

            The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.

          • MemoryThreshold — (Float)

            The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.

          • LoadThreshold — (Float)

            The load threshold. A value of -1 disables the threshold. For more information about how load is computed, see Load (computing).

          • Alarms — (Array<String>)

            Custom CloudWatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.

            Note: To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms. You can either have OpsWorks Stacks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing OpsWorks Stacks to Act on Your Behalf.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeMyUserProfile(params = {}, callback) ⇒ AWS.Request

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the describeMyUserProfile operation

opsworks.describeMyUserProfile(function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • UserProfile — (map)

        A UserProfile object that describes the user's SSH information.

        • IamUserArn — (String)

          The user's IAM ARN.

        • Name — (String)

          The user's name.

        • SshUsername — (String)

          The user's SSH user name.

        • SshPublicKey — (String)

          The user's SSH public key.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeOperatingSystems(params = {}, callback) ⇒ AWS.Request

Describes the operating systems that are supported by OpsWorks Stacks.

Service Reference:

Examples:

Calling the describeOperatingSystems operation

opsworks.describeOperatingSystems(function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • OperatingSystems — (Array<map>)

        Contains information in response to a DescribeOperatingSystems request.

        • Name — (String)

          The name of the operating system, such as Amazon Linux 2.

        • Id — (String)

          The ID of a supported operating system, such as Amazon Linux 2.

        • Type — (String)

          The type of a supported operating system, either Linux or Windows.

        • ConfigurationManagers — (Array<map>)

          Supported configuration manager name and versions for an OpsWorks Stacks operating system.

          • Name — (String)

            The name of the configuration manager, which is Chef.

          • Version — (String)

            The versions of the configuration manager that are supported by an operating system.

        • ReportedName — (String)

          A short name for the operating system manufacturer.

        • ReportedVersion — (String)

          The version of the operating system, including the release and edition, if applicable.

        • Supported — (Boolean)

          Indicates that an operating system is not supported for new instances.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describePermissions(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the describePermissions operation

var params = {
  IamUserArn: 'STRING_VALUE',
  StackId: 'STRING_VALUE'
};
opsworks.describePermissions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • IamUserArn — (String)

      The user's IAM ARN. This can also be a federated user's ARN. For more information about IAM ARNs, see Using Identifiers.

    • StackId — (String)

      The stack ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Permissions — (Array<map>)

        An array of Permission objects that describe the stack permissions.

        • If the request object contains only a stack ID, the array contains a Permission object with permissions for each of the stack IAM ARNs.

        • If the request object contains only an IAM ARN, the array contains a Permission object with permissions for each of the user's stack IDs.

        • If the request contains a stack ID and an IAM ARN, the array contains a single Permission object with permissions for the specified stack and IAM ARN.

        • StackId — (String)

          A stack ID.

        • IamUserArn — (String)

          The Amazon Resource Name (ARN) for an Identity and Access Management (IAM) role. For more information about IAM ARNs, see Using Identifiers.

        • AllowSsh — (Boolean)

          Whether the user can use SSH.

        • AllowSudo — (Boolean)

          Whether the user can use sudo.

        • Level — (String)

          The user's permission level, which must be the following:

          • deny

          • show

          • deploy

          • manage

          • iam_only

          For more information on the permissions associated with these levels, see Managing User Permissions

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeRaidArrays(params = {}, callback) ⇒ AWS.Request

Describe an instance's RAID arrays.

Note: This call accepts only one resource-identifying parameter.

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the describeRaidArrays operation

var params = {
  InstanceId: 'STRING_VALUE',
  RaidArrayIds: [
    'STRING_VALUE',
    /* more items */
  ],
  StackId: 'STRING_VALUE'
};
opsworks.describeRaidArrays(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceId — (String)

      The instance ID. If you use this parameter, DescribeRaidArrays returns descriptions of the RAID arrays associated with the specified instance.

    • StackId — (String)

      The stack ID.

    • RaidArrayIds — (Array<String>)

      An array of RAID array IDs. If you use this parameter, DescribeRaidArrays returns descriptions of the specified arrays. Otherwise, it returns a description of every array.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • RaidArrays — (Array<map>)

        A RaidArrays object that describes the specified RAID arrays.

        • RaidArrayId — (String)

          The array ID.

        • InstanceId — (String)

          The instance ID.

        • Name — (String)

          The array name.

        • RaidLevel — (Integer)

          The RAID level.

        • NumberOfDisks — (Integer)

          The number of disks in the array.

        • Size — (Integer)

          The array's size.

        • Device — (String)

          The array's Linux device. For example /dev/mdadm0.

        • MountPoint — (String)

          The array's mount point.

        • AvailabilityZone — (String)

          The array's Availability Zone. For more information, see Regions and Endpoints.

        • CreatedAt — (String)

          When the RAID array was created.

        • StackId — (String)

          The stack ID.

        • VolumeType — (String)

          The volume type, standard or PIOPS.

        • Iops — (Integer)

          For PIOPS volumes, the IOPS per disk.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeRdsDbInstances(params = {}, callback) ⇒ AWS.Request

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 about user permissions, see Managing User Permissions.

This call accepts only one resource-identifying parameter.

Service Reference:

Examples:

Calling the describeRdsDbInstances operation

var params = {
  StackId: 'STRING_VALUE', /* required */
  RdsDbInstanceArns: [
    'STRING_VALUE',
    /* more items */
  ]
};
opsworks.describeRdsDbInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The ID of the stack with which the instances are registered. The operation returns descriptions of all registered Amazon RDS instances.

    • RdsDbInstanceArns — (Array<String>)

      An array containing the ARNs of the instances to be described.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • RdsDbInstances — (Array<map>)

        An a array of RdsDbInstance objects that describe the instances.

        • RdsDbInstanceArn — (String)

          The instance's ARN.

        • DbInstanceIdentifier — (String)

          The database instance identifier.

        • DbUser — (String)

          The master user name.

        • DbPassword — (String)

          OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

        • Region — (String)

          The instance's Amazon Web Services Region.

        • Address — (String)

          The instance's address.

        • Engine — (String)

          The instance's database engine.

        • StackId — (String)

          The ID of the stack with which the instance is registered.

        • MissingOnRds — (Boolean)

          Set to true if OpsWorks Stacks is unable to discover the Amazon RDS instance. OpsWorks Stacks attempts to discover the instance only once. If this value is set to true, you must deregister the instance, and then register it again.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeServiceErrors(params = {}, callback) ⇒ AWS.Request

Describes OpsWorks Stacks 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 about user permissions, see Managing User Permissions.

This call accepts only one resource-identifying parameter.

Service Reference:

Examples:

Calling the describeServiceErrors operation

var params = {
  InstanceId: 'STRING_VALUE',
  ServiceErrorIds: [
    'STRING_VALUE',
    /* more items */
  ],
  StackId: 'STRING_VALUE'
};
opsworks.describeServiceErrors(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The stack ID. If you use this parameter, DescribeServiceErrors returns descriptions of the errors associated with the specified stack.

    • InstanceId — (String)

      The instance ID. If you use this parameter, DescribeServiceErrors returns descriptions of the errors associated with the specified instance.

    • ServiceErrorIds — (Array<String>)

      An array of service error IDs. If you use this parameter, DescribeServiceErrors returns descriptions of the specified errors. Otherwise, it returns a description of every error.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ServiceErrors — (Array<map>)

        An array of ServiceError objects that describe the specified service errors.

        • ServiceErrorId — (String)

          The error ID.

        • StackId — (String)

          The stack ID.

        • InstanceId — (String)

          The instance ID.

        • Type — (String)

          The error type.

        • Message — (String)

          A message that describes the error.

        • CreatedAt — (String)

          When the error occurred.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeStackProvisioningParameters(params = {}, callback) ⇒ AWS.Request

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 about user permissions, see Managing User Permissions.

Examples:

Calling the describeStackProvisioningParameters operation

var params = {
  StackId: 'STRING_VALUE' /* required */
};
opsworks.describeStackProvisioningParameters(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The stack ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AgentInstallerUrl — (String)

        The OpsWorks Stacks agent installer's URL.

      • Parameters — (map<String>)

        An embedded object that contains the provisioning parameters.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeStacks(params = {}, callback) ⇒ AWS.Request

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the describeStacks operation

var params = {
  StackIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
opsworks.describeStacks(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackIds — (Array<String>)

      An array of stack IDs that specify the stacks to be described. If you omit this parameter, and have permissions to get information about all stacks, DescribeStacks returns a description of every stack. If the IAM policy that is attached to an IAM user limits the DescribeStacks action to specific stack ARNs, this parameter is required, and the user must specify a stack ARN that is allowed by the policy. Otherwise, DescribeStacks returns an AccessDenied error.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Stacks — (Array<map>)

        An array of Stack objects that describe the stacks.

        • StackId — (String)

          The stack ID.

        • Name — (String)

          The stack name. Stack names can be a maximum of 64 characters.

        • Arn — (String)

          The stack's ARN.

        • Region — (String)

          The stack Amazon Web Services Region, such as ap-northeast-2. For more information about Amazon Web Services Regions, see Regions and Endpoints.

        • VpcId — (String)

          The VPC ID; applicable only if the stack is running in a VPC.

        • Attributes — (map<String>)

          The stack's attributes.

        • ServiceRoleArn — (String)

          The stack Identity and Access Management (IAM) role.

        • DefaultInstanceProfileArn — (String)

          The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

        • DefaultOs — (String)

          The stack's default operating system.

        • HostnameTheme — (String)

          The stack host name theme, with spaces replaced by underscores.

        • DefaultAvailabilityZone — (String)

          The stack's default Availability Zone. For more information, see Regions and Endpoints.

        • DefaultSubnetId — (String)

          The default subnet ID; applicable only if the stack is running in a VPC.

        • CustomJson — (String)

          A JSON object that contains user-defined attributes to be added to the stack configuration and deployment attributes. You can use custom JSON to override the corresponding default stack configuration attribute values or to pass data to recipes. The string should be in the following format:

          "{\"key1\": \"value1\", \"key2\": \"value2\",...}"

          For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes.

        • ConfigurationManager — (map)

          The configuration manager.

          • Name — (String)

            The name. This parameter must be set to Chef.

          • Version — (String)

            The Chef version. This parameter must be set to 12, 11.10, or 11.4 for Linux stacks, and to 12.2 for Windows stacks. The default value for Linux stacks is 12.

        • ChefConfiguration — (map)

          A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version. For more information, see Create a New Stack.

          • ManageBerkshelf — (Boolean)

            Whether to enable Berkshelf.

          • BerkshelfVersion — (String)

            The Berkshelf version.

        • UseCustomCookbooks — (Boolean)

          Whether the stack uses custom cookbooks.

        • UseOpsworksSecurityGroups — (Boolean)

          Whether the stack automatically associates the OpsWorks Stacks built-in security groups with the stack's layers.

        • CustomCookbooksSource — (map)

          Contains the information required to retrieve an app or cookbook from a repository. For more information, see Adding Apps or Cookbooks and Recipes.

          • Type — (String)

            The repository type.

            Possible values include:
            • "git"
            • "svn"
            • "archive"
            • "s3"
          • Url — (String)

            The source URL. The following is an example of an Amazon S3 source URL: https://s3.amazonaws.com/opsworks-demo-bucket/opsworks&#95;cookbook&#95;demo.tar.gz.

          • Username — (String)

            This parameter depends on the repository type.

            • For Amazon S3 bundles, set Username to the appropriate IAM access key ID.

            • For HTTP bundles, Git repositories, and Subversion repositories, set Username to the user name.

          • Password — (String)

            When included in a request, the parameter depends on the repository type.

            • For Amazon S3 bundles, set Password to the appropriate IAM secret access key.

            • For HTTP bundles and Subversion repositories, set Password to the password.

            For more information on how to safely handle IAM credentials, see https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html.

            In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

          • SshKey — (String)

            In requests, the repository's SSH key.

            In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

          • Revision — (String)

            The application's version. OpsWorks Stacks enables you to easily deploy new versions of an application. One of the simplest approaches is to have branches or revisions in your repository that represent different versions that can potentially be deployed.

        • DefaultSshKeyName — (String)

          A default Amazon EC2 key pair for the stack's instances. You can override this value when you create or update an instance.

        • CreatedAt — (String)

          The date when the stack was created.

        • DefaultRootDeviceType — (String)

          The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.

          Possible values include:
          • "ebs"
          • "instance-store"
        • AgentVersion — (String)

          The agent version. This parameter is set to LATEST for auto-update. or a version number for a fixed agent version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeStackSummary(params = {}, callback) ⇒ AWS.Request

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the describeStackSummary operation

var params = {
  StackId: 'STRING_VALUE' /* required */
};
opsworks.describeStackSummary(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The stack ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • StackSummary — (map)

        A StackSummary object that contains the results.

        • StackId — (String)

          The stack ID.

        • Name — (String)

          The stack name.

        • Arn — (String)

          The stack's ARN.

        • LayersCount — (Integer)

          The number of layers.

        • AppsCount — (Integer)

          The number of apps.

        • InstancesCount — (map)

          An InstancesCount object with the number of instances in each status.

          • Assigning — (Integer)

            The number of instances in the Assigning state.

          • Booting — (Integer)

            The number of instances with booting status.

          • ConnectionLost — (Integer)

            The number of instances with connection_lost status.

          • Deregistering — (Integer)

            The number of instances in the Deregistering state.

          • Online — (Integer)

            The number of instances with online status.

          • Pending — (Integer)

            The number of instances with pending status.

          • Rebooting — (Integer)

            The number of instances with rebooting status.

          • Registered — (Integer)

            The number of instances in the Registered state.

          • Registering — (Integer)

            The number of instances in the Registering state.

          • Requested — (Integer)

            The number of instances with requested status.

          • RunningSetup — (Integer)

            The number of instances with running_setup status.

          • SetupFailed — (Integer)

            The number of instances with setup_failed status.

          • ShuttingDown — (Integer)

            The number of instances with shutting_down status.

          • StartFailed — (Integer)

            The number of instances with start_failed status.

          • StopFailed — (Integer)

            The number of instances with stop_failed status.

          • Stopped — (Integer)

            The number of instances with stopped status.

          • Stopping — (Integer)

            The number of instances with stopping status.

          • Terminated — (Integer)

            The number of instances with terminated status.

          • Terminating — (Integer)

            The number of instances with terminating status.

          • Unassigning — (Integer)

            The number of instances in the Unassigning state.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeTimeBasedAutoScaling(params = {}, callback) ⇒ AWS.Request

Describes time-based auto scaling configurations for specified instances.

Note: 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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the describeTimeBasedAutoScaling operation

var params = {
  InstanceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
opsworks.describeTimeBasedAutoScaling(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceIds — (Array<String>)

      An array of instance IDs.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • TimeBasedAutoScalingConfigurations — (Array<map>)

        An array of TimeBasedAutoScalingConfiguration objects that describe the configuration for the specified instances.

        • InstanceId — (String)

          The instance ID.

        • AutoScalingSchedule — (map)

          A WeeklyAutoScalingSchedule object with the instance schedule.

          • Monday — (map<String>)

            The schedule for Monday.

          • Tuesday — (map<String>)

            The schedule for Tuesday.

          • Wednesday — (map<String>)

            The schedule for Wednesday.

          • Thursday — (map<String>)

            The schedule for Thursday.

          • Friday — (map<String>)

            The schedule for Friday.

          • Saturday — (map<String>)

            The schedule for Saturday.

          • Sunday — (map<String>)

            The schedule for Sunday.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeUserProfiles(params = {}, callback) ⇒ AWS.Request

Describe specified users.

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

Service Reference:

Examples:

Calling the describeUserProfiles operation

var params = {
  IamUserArns: [
    'STRING_VALUE',
    /* more items */
  ]
};
opsworks.describeUserProfiles(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • IamUserArns — (Array<String>)

      An array of IAM or federated user ARNs that identify the users to be described.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • UserProfiles — (Array<map>)

        A Users object that describes the specified users.

        • IamUserArn — (String)

          The user's IAM ARN.

        • Name — (String)

          The user's name.

        • SshUsername — (String)

          The user's SSH user name.

        • SshPublicKey — (String)

          The user's SSH public key.

        • AllowSelfManagement — (Boolean)

          Whether users can specify their own SSH public key through the My Settings page. For more information, see Managing User Permissions.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeVolumes(params = {}, callback) ⇒ AWS.Request

Describes an instance's Amazon EBS volumes.

Note: This call accepts only one resource-identifying parameter.

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the describeVolumes operation

var params = {
  InstanceId: 'STRING_VALUE',
  RaidArrayId: 'STRING_VALUE',
  StackId: 'STRING_VALUE',
  VolumeIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
opsworks.describeVolumes(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceId — (String)

      The instance ID. If you use this parameter, DescribeVolumes returns descriptions of the volumes associated with the specified instance.

    • StackId — (String)

      A stack ID. The action describes the stack's registered Amazon EBS volumes.

    • RaidArrayId — (String)

      The RAID array ID. If you use this parameter, DescribeVolumes returns descriptions of the volumes associated with the specified RAID array.

    • VolumeIds — (Array<String>)

      Am array of volume IDs. If you use this parameter, DescribeVolumes returns descriptions of the specified volumes. Otherwise, it returns a description of every volume.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Volumes — (Array<map>)

        An array of volume IDs.

        • VolumeId — (String)

          The volume ID.

        • Ec2VolumeId — (String)

          The Amazon EC2 volume ID.

        • Name — (String)

          The volume name. Volume names are a maximum of 128 characters.

        • RaidArrayId — (String)

          The RAID array ID.

        • InstanceId — (String)

          The instance ID.

        • Status — (String)

          The value returned by DescribeVolumes.

        • Size — (Integer)

          The volume size.

        • Device — (String)

          The device name.

        • MountPoint — (String)

          The volume mount point. For example, "/mnt/disk1".

        • Region — (String)

          The Amazon Web Services Region. For more information about Amazon Web Services Regions, see Regions and Endpoints.

        • AvailabilityZone — (String)

          The volume Availability Zone. For more information, see Regions and Endpoints.

        • VolumeType — (String)

          The volume type. For more information, see Amazon EBS Volume Types.

          • standard - Magnetic. Magnetic volumes must have a minimum size of 1 GiB and a maximum size of 1024 GiB.

          • io1 - Provisioned IOPS (SSD). PIOPS volumes must have a minimum size of 4 GiB and a maximum size of 16384 GiB.

          • gp2 - General Purpose (SSD). General purpose volumes must have a minimum size of 1 GiB and a maximum size of 16384 GiB.

          • st1 - Throughput Optimized hard disk drive (HDD). Throughput optimized HDD volumes must have a minimum size of 125 GiB and a maximum size of 16384 GiB.

          • sc1 - Cold HDD. Cold HDD volumes must have a minimum size of 125 GiB and a maximum size of 16384 GiB.

        • Iops — (Integer)

          For PIOPS volumes, the IOPS per disk.

        • Encrypted — (Boolean)

          Specifies whether an Amazon EBS volume is encrypted. For more information, see Amazon EBS Encryption.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

detachElasticLoadBalancer(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the detachElasticLoadBalancer operation

var params = {
  ElasticLoadBalancerName: 'STRING_VALUE', /* required */
  LayerId: 'STRING_VALUE' /* required */
};
opsworks.detachElasticLoadBalancer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ElasticLoadBalancerName — (String)

      The Elastic Load Balancing instance's name.

    • LayerId — (String)

      The ID of the layer that the Elastic Load Balancing instance is attached to.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateElasticIp(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the disassociateElasticIp operation

var params = {
  ElasticIp: 'STRING_VALUE' /* required */
};
opsworks.disassociateElasticIp(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ElasticIp — (String)

      The Elastic IP address.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getHostnameSuggestion(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the getHostnameSuggestion operation

var params = {
  LayerId: 'STRING_VALUE' /* required */
};
opsworks.getHostnameSuggestion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • LayerId — (String)

      The layer ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • LayerId — (String)

        The layer ID.

      • Hostname — (String)

        The generated host name.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

grantAccess(params = {}, callback) ⇒ AWS.Request

Note: This action can be used only with Windows stacks.

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

Service Reference:

Examples:

Calling the grantAccess operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  ValidForInMinutes: 'NUMBER_VALUE'
};
opsworks.grantAccess(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceId — (String)

      The instance's OpsWorks Stacks ID.

    • ValidForInMinutes — (Integer)

      The length of time (in minutes) that the grant is valid. When the grant expires at the end of this period, the user will no longer be able to use the credentials to log in. If the user is logged in at the time, they are logged out.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • TemporaryCredential — (map)

        A TemporaryCredential object that contains the data needed to log in to the instance by RDP clients, such as the Microsoft Remote Desktop Connection.

        • Username — (String)

          The user name.

        • Password — (String)

          The password.

        • ValidForInMinutes — (Integer)

          The length of time (in minutes) that the grant is valid. When the grant expires, at the end of this period, the user will no longer be able to use the credentials to log in. If they are logged in at the time, they are automatically logged out.

        • InstanceId — (String)

          The instance's OpsWorks Stacks ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTags(params = {}, callback) ⇒ AWS.Request

Returns a list of tags that are applied to the specified stack or layer.

Service Reference:

Examples:

Calling the listTags operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
opsworks.listTags(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The stack or layer's Amazon Resource Number (ARN).

    • MaxResults — (Integer)

      Do not use. A validation exception occurs if you add a MaxResults parameter to a ListTagsRequest call.

    • NextToken — (String)

      Do not use. A validation exception occurs if you add a NextToken parameter to a ListTagsRequest call.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Tags — (map<String>)

        A set of key-value pairs that contain tag keys and tag values that are attached to a stack or layer.

      • NextToken — (String)

        If a paginated request does not return all of the remaining results, this parameter is set to a token that you can assign to the request object's NextToken parameter to get the next set of results. If the previous paginated request returned all of the remaining results, this parameter is set to null.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

rebootInstance(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the rebootInstance operation

var params = {
  InstanceId: 'STRING_VALUE' /* required */
};
opsworks.rebootInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceId — (String)

      The instance ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

registerEcsCluster(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the registerEcsCluster operation

var params = {
  EcsClusterArn: 'STRING_VALUE', /* required */
  StackId: 'STRING_VALUE' /* required */
};
opsworks.registerEcsCluster(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • EcsClusterArn — (String)

      The cluster's ARN.

    • StackId — (String)

      The stack ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EcsClusterArn — (String)

        The cluster's ARN.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

registerElasticIp(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the registerElasticIp operation

var params = {
  ElasticIp: 'STRING_VALUE', /* required */
  StackId: 'STRING_VALUE' /* required */
};
opsworks.registerElasticIp(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ElasticIp — (String)

      The Elastic IP address.

    • StackId — (String)

      The stack ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ElasticIp — (String)

        The Elastic IP address.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

registerInstance(params = {}, callback) ⇒ AWS.Request

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

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

Registered instances have the same requirements as instances that are created by using the CreateInstance API. For example, registered instances must be running a supported Linux-based operating system, and they must have a supported instance type. For more information about requirements for instances that you want to register, see Preparing the 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.

Service Reference:

Examples:

Calling the registerInstance operation

var params = {
  StackId: 'STRING_VALUE', /* required */
  Hostname: 'STRING_VALUE',
  InstanceIdentity: {
    Document: 'STRING_VALUE',
    Signature: 'STRING_VALUE'
  },
  PrivateIp: 'STRING_VALUE',
  PublicIp: 'STRING_VALUE',
  RsaPublicKey: 'STRING_VALUE',
  RsaPublicKeyFingerprint: 'STRING_VALUE'
};
opsworks.registerInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The ID of the stack that the instance is to be registered with.

    • Hostname — (String)

      The instance's host name. The following are character limits for instance host names.

      • Linux-based instances: 63 characters

      • Windows-based instances: 15 characters

    • PublicIp — (String)

      The instance's public IP address.

    • PrivateIp — (String)

      The instance's private IP address.

    • RsaPublicKey — (String)

      The instances public RSA key. This key is used to encrypt communication between the instance and the service.

    • RsaPublicKeyFingerprint — (String)

      The instances public RSA key fingerprint.

    • InstanceIdentity — (map)

      An InstanceIdentity object that contains the instance's identity.

      • Document — (String)

        A JSON document that contains the metadata.

      • Signature — (String)

        A signature that can be used to verify the document's accuracy and authenticity.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • InstanceId — (String)

        The registered instance's OpsWorks Stacks ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

registerRdsDbInstance(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the registerRdsDbInstance operation

var params = {
  DbPassword: 'STRING_VALUE', /* required */
  DbUser: 'STRING_VALUE', /* required */
  RdsDbInstanceArn: 'STRING_VALUE', /* required */
  StackId: 'STRING_VALUE' /* required */
};
opsworks.registerRdsDbInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The stack ID.

    • RdsDbInstanceArn — (String)

      The Amazon RDS instance's ARN.

    • DbUser — (String)

      The database's master user name.

    • DbPassword — (String)

      The database password.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

registerVolume(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the registerVolume operation

var params = {
  StackId: 'STRING_VALUE', /* required */
  Ec2VolumeId: 'STRING_VALUE'
};
opsworks.registerVolume(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Ec2VolumeId — (String)

      The Amazon EBS volume ID.

    • StackId — (String)

      The stack ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • VolumeId — (String)

        The volume ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

setLoadBasedAutoScaling(params = {}, callback) ⇒ AWS.Request

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

Note: 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.

Service Reference:

Examples:

Calling the setLoadBasedAutoScaling operation

var params = {
  LayerId: 'STRING_VALUE', /* required */
  DownScaling: {
    Alarms: [
      'STRING_VALUE',
      /* more items */
    ],
    CpuThreshold: 'NUMBER_VALUE',
    IgnoreMetricsTime: 'NUMBER_VALUE',
    InstanceCount: 'NUMBER_VALUE',
    LoadThreshold: 'NUMBER_VALUE',
    MemoryThreshold: 'NUMBER_VALUE',
    ThresholdsWaitTime: 'NUMBER_VALUE'
  },
  Enable: true || false,
  UpScaling: {
    Alarms: [
      'STRING_VALUE',
      /* more items */
    ],
    CpuThreshold: 'NUMBER_VALUE',
    IgnoreMetricsTime: 'NUMBER_VALUE',
    InstanceCount: 'NUMBER_VALUE',
    LoadThreshold: 'NUMBER_VALUE',
    MemoryThreshold: 'NUMBER_VALUE',
    ThresholdsWaitTime: 'NUMBER_VALUE'
  }
};
opsworks.setLoadBasedAutoScaling(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • LayerId — (String)

      The layer ID.

    • Enable — (Boolean)

      Enables load-based auto scaling for the layer.

    • UpScaling — (map)

      An AutoScalingThresholds object with the upscaling threshold configuration. If the load exceeds these thresholds for a specified amount of time, OpsWorks Stacks starts a specified number of instances.

      • InstanceCount — (Integer)

        The number of instances to add or remove when the load exceeds a threshold.

      • ThresholdsWaitTime — (Integer)

        The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.

      • IgnoreMetricsTime — (Integer)

        The amount of time (in minutes) after a scaling event occurs that OpsWorks Stacks should ignore metrics and suppress additional scaling events. For example, OpsWorks Stacks adds new instances following an upscaling event but the instances won't start reducing the load until they have been booted and configured. There is no point in raising additional scaling events during that operation, which typically takes several minutes. IgnoreMetricsTime allows you to direct OpsWorks Stacks to suppress scaling events long enough to get the new instances online.

      • CpuThreshold — (Float)

        The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.

      • MemoryThreshold — (Float)

        The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.

      • LoadThreshold — (Float)

        The load threshold. A value of -1 disables the threshold. For more information about how load is computed, see Load (computing).

      • Alarms — (Array<String>)

        Custom CloudWatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.

        Note: To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms. You can either have OpsWorks Stacks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing OpsWorks Stacks to Act on Your Behalf.
    • DownScaling — (map)

      An AutoScalingThresholds object with the downscaling threshold configuration. If the load falls below these thresholds for a specified amount of time, OpsWorks Stacks stops a specified number of instances.

      • InstanceCount — (Integer)

        The number of instances to add or remove when the load exceeds a threshold.

      • ThresholdsWaitTime — (Integer)

        The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.

      • IgnoreMetricsTime — (Integer)

        The amount of time (in minutes) after a scaling event occurs that OpsWorks Stacks should ignore metrics and suppress additional scaling events. For example, OpsWorks Stacks adds new instances following an upscaling event but the instances won't start reducing the load until they have been booted and configured. There is no point in raising additional scaling events during that operation, which typically takes several minutes. IgnoreMetricsTime allows you to direct OpsWorks Stacks to suppress scaling events long enough to get the new instances online.

      • CpuThreshold — (Float)

        The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.

      • MemoryThreshold — (Float)

        The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.

      • LoadThreshold — (Float)

        The load threshold. A value of -1 disables the threshold. For more information about how load is computed, see Load (computing).

      • Alarms — (Array<String>)

        Custom CloudWatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.

        Note: To use custom alarms, you must update your service role to allow cloudwatch:DescribeAlarms. You can either have OpsWorks Stacks update the role for you when you first use this feature or you can edit the role manually. For more information, see Allowing OpsWorks Stacks to Act on Your Behalf.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

setPermission(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the setPermission operation

var params = {
  IamUserArn: 'STRING_VALUE', /* required */
  StackId: 'STRING_VALUE', /* required */
  AllowSsh: true || false,
  AllowSudo: true || false,
  Level: 'STRING_VALUE'
};
opsworks.setPermission(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The stack ID.

    • IamUserArn — (String)

      The user's IAM ARN. This can also be a federated user's ARN.

    • AllowSsh — (Boolean)

      The user is allowed to use SSH to communicate with the instance.

    • AllowSudo — (Boolean)

      The user is allowed to use sudo to elevate privileges.

    • Level — (String)

      The user's permission level, which must be set to one of the following strings. You cannot set your own permissions level.

      • deny

      • show

      • deploy

      • manage

      • iam_only

      For more information about the permissions associated with these levels, see Managing User Permissions.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

setTimeBasedAutoScaling(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the setTimeBasedAutoScaling operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  AutoScalingSchedule: {
    Friday: {
      '<Hour>': 'STRING_VALUE',
      /* '<Hour>': ... */
    },
    Monday: {
      '<Hour>': 'STRING_VALUE',
      /* '<Hour>': ... */
    },
    Saturday: {
      '<Hour>': 'STRING_VALUE',
      /* '<Hour>': ... */
    },
    Sunday: {
      '<Hour>': 'STRING_VALUE',
      /* '<Hour>': ... */
    },
    Thursday: {
      '<Hour>': 'STRING_VALUE',
      /* '<Hour>': ... */
    },
    Tuesday: {
      '<Hour>': 'STRING_VALUE',
      /* '<Hour>': ... */
    },
    Wednesday: {
      '<Hour>': 'STRING_VALUE',
      /* '<Hour>': ... */
    }
  }
};
opsworks.setTimeBasedAutoScaling(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceId — (String)

      The instance ID.

    • AutoScalingSchedule — (map)

      An AutoScalingSchedule with the instance schedule.

      • Monday — (map<String>)

        The schedule for Monday.

      • Tuesday — (map<String>)

        The schedule for Tuesday.

      • Wednesday — (map<String>)

        The schedule for Wednesday.

      • Thursday — (map<String>)

        The schedule for Thursday.

      • Friday — (map<String>)

        The schedule for Friday.

      • Saturday — (map<String>)

        The schedule for Saturday.

      • Sunday — (map<String>)

        The schedule for Sunday.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startInstance(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the startInstance operation

var params = {
  InstanceId: 'STRING_VALUE' /* required */
};
opsworks.startInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceId — (String)

      The instance ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startStack(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the startStack operation

var params = {
  StackId: 'STRING_VALUE' /* required */
};
opsworks.startStack(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The stack ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

stopInstance(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the stopInstance operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  Force: true || false
};
opsworks.stopInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceId — (String)

      The instance ID.

    • Force — (Boolean)

      Specifies whether to force an instance to stop. If the instance's root device type is ebs, or EBS-backed, adding the Force parameter to the StopInstances API call disassociates the OpsWorks Stacks instance from EC2, and forces deletion of only the OpsWorks Stacks instance. You must also delete the formerly-associated instance in EC2 after troubleshooting and replacing the OpsWorks Stacks instance with a new one.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

stopStack(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the stopStack operation

var params = {
  StackId: 'STRING_VALUE' /* required */
};
opsworks.stopStack(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The stack ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Apply cost-allocation tags to a specified stack or layer in OpsWorks Stacks. For more information about how tagging works, see Tags in the OpsWorks User Guide.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  Tags: { /* required */
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
opsworks.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The stack or layer's Amazon Resource Number (ARN).

    • Tags — (map<String>)

      A map that contains tag keys and tag values that are attached to a stack or layer.

      • The key cannot be empty.

      • The key can be a maximum of 127 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

      • The value can be a maximum 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

      • Leading and trailing white spaces are trimmed from both the key and value.

      • A maximum of 40 tags is allowed for any resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

unassignInstance(params = {}, callback) ⇒ AWS.Request

Unassigns a registered instance from all layers that are using the instance. 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 OpsWorks Stacks.

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the unassignInstance operation

var params = {
  InstanceId: 'STRING_VALUE' /* required */
};
opsworks.unassignInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceId — (String)

      The instance ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

unassignVolume(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the unassignVolume operation

var params = {
  VolumeId: 'STRING_VALUE' /* required */
};
opsworks.unassignVolume(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • VolumeId — (String)

      The volume ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Removes tags from a specified stack or layer.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
opsworks.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The stack or layer's Amazon Resource Number (ARN).

    • TagKeys — (Array<String>)

      A list of the keys of tags to be removed from a stack or layer.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateApp(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateApp operation

var params = {
  AppId: 'STRING_VALUE', /* required */
  AppSource: {
    Password: 'STRING_VALUE',
    Revision: 'STRING_VALUE',
    SshKey: 'STRING_VALUE',
    Type: git | svn | archive | s3,
    Url: 'STRING_VALUE',
    Username: 'STRING_VALUE'
  },
  Attributes: {
    '<AppAttributesKeys>': 'STRING_VALUE',
    /* '<AppAttributesKeys>': ... */
  },
  DataSources: [
    {
      Arn: 'STRING_VALUE',
      DatabaseName: 'STRING_VALUE',
      Type: 'STRING_VALUE'
    },
    /* more items */
  ],
  Description: 'STRING_VALUE',
  Domains: [
    'STRING_VALUE',
    /* more items */
  ],
  EnableSsl: true || false,
  Environment: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE', /* required */
      Secure: true || false
    },
    /* more items */
  ],
  Name: 'STRING_VALUE',
  SslConfiguration: {
    Certificate: 'STRING_VALUE', /* required */
    PrivateKey: 'STRING_VALUE', /* required */
    Chain: 'STRING_VALUE'
  },
  Type: aws-flow-ruby | java | rails | php | nodejs | static | other
};
opsworks.updateApp(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AppId — (String)

      The app ID.

    • Name — (String)

      The app name.

    • Description — (String)

      A description of the app.

    • DataSources — (Array<map>)

      The app's data sources.

      • Type — (String)

        The data source's type, AutoSelectOpsworksMysqlInstance, OpsworksMysqlInstance, RdsDbInstance, or None.

      • Arn — (String)

        The data source's ARN.

      • DatabaseName — (String)

        The database name.

    • Type — (String)

      The app type.

      Possible values include:
      • "aws-flow-ruby"
      • "java"
      • "rails"
      • "php"
      • "nodejs"
      • "static"
      • "other"
    • AppSource — (map)

      A Source object that specifies the app repository.

      • Type — (String)

        The repository type.

        Possible values include:
        • "git"
        • "svn"
        • "archive"
        • "s3"
      • Url — (String)

        The source URL. The following is an example of an Amazon S3 source URL: https://s3.amazonaws.com/opsworks-demo-bucket/opsworks&#95;cookbook&#95;demo.tar.gz.

      • Username — (String)

        This parameter depends on the repository type.

        • For Amazon S3 bundles, set Username to the appropriate IAM access key ID.

        • For HTTP bundles, Git repositories, and Subversion repositories, set Username to the user name.

      • Password — (String)

        When included in a request, the parameter depends on the repository type.

        • For Amazon S3 bundles, set Password to the appropriate IAM secret access key.

        • For HTTP bundles and Subversion repositories, set Password to the password.

        For more information on how to safely handle IAM credentials, see https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html.

        In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

      • SshKey — (String)

        In requests, the repository's SSH key.

        In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

      • Revision — (String)

        The application's version. OpsWorks Stacks enables you to easily deploy new versions of an application. One of the simplest approaches is to have branches or revisions in your repository that represent different versions that can potentially be deployed.

    • Domains — (Array<String>)

      The app's virtual host settings, with multiple domains separated by commas. For example: 'www.example.com, example.com'

    • EnableSsl — (Boolean)

      Whether SSL is enabled for the app.

    • SslConfiguration — (map)

      An SslConfiguration object with the SSL configuration.

      • Certificaterequired — (String)

        The contents of the certificate's domain.crt file.

      • PrivateKeyrequired — (String)

        The private key; the contents of the certificate's domain.kex file.

      • Chain — (String)

        Optional. Can be used to specify an intermediate certificate authority key or client authentication.

    • Attributes — (map<String>)

      One or more user-defined key/value pairs to be added to the stack attributes.

    • Environment — (Array<map>)

      An array of EnvironmentVariable objects that specify environment variables to be associated with the app. After you deploy the app, these variables are defined on the associated app server instances.For more information, see Environment Variables.

      There is no specific limit on the number of environment variables. However, the size of the associated data structure - which includes the variables' names, values, and protected flag values - cannot exceed 20 KB. This limit should accommodate most if not all use cases. Exceeding it will cause an exception with the message, "Environment: is too large (maximum is 20 KB)."

      Note: If you have specified one or more environment variables, you cannot modify the stack's Chef version.
      • Keyrequired — (String)

        (Required) The environment variable's name, which can consist of up to 64 characters and must be specified. The name can contain upper- and lowercase letters, numbers, and underscores (_), but it must start with a letter or underscore.

      • Valuerequired — (String)

        (Optional) The environment variable's value, which can be left empty. If you specify a value, it can contain up to 256 characters, which must all be printable.

      • Secure — (Boolean)

        (Optional) Whether the variable's value is returned by the DescribeApps action. To hide an environment variable's value, set Secure to true. DescribeApps returns *****FILTERED***** instead of the actual value. The default value for Secure is false.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateElasticIp(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateElasticIp operation

var params = {
  ElasticIp: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE'
};
opsworks.updateElasticIp(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ElasticIp — (String)

      The IP address for which you want to update the name.

    • Name — (String)

      The new name, which can be a maximum of 32 characters.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateInstance(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateInstance operation

var params = {
  InstanceId: 'STRING_VALUE', /* required */
  AgentVersion: 'STRING_VALUE',
  AmiId: 'STRING_VALUE',
  Architecture: x86_64 | i386,
  AutoScalingType: load | timer,
  EbsOptimized: true || false,
  Hostname: 'STRING_VALUE',
  InstallUpdatesOnBoot: true || false,
  InstanceType: 'STRING_VALUE',
  LayerIds: [
    'STRING_VALUE',
    /* more items */
  ],
  Os: 'STRING_VALUE',
  SshKeyName: 'STRING_VALUE'
};
opsworks.updateInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceId — (String)

      The instance ID.

    • LayerIds — (Array<String>)

      The instance's layer IDs.

    • InstanceType — (String)

      The instance type, such as t2.micro. For a list of supported instance types, open the stack in the console, choose Instances, and choose + Instance. The Size list contains the currently supported types. For more information, see Instance Families and Types. The parameter values that you use to specify the various types are in the API Name column of the Available Instance Types table.

    • AutoScalingType — (String)

      For load-based or time-based instances, the type. Windows stacks can use only time-based instances.

      Possible values include:
      • "load"
      • "timer"
    • Hostname — (String)

      The instance host name. The following are character limits for instance host names.

      • Linux-based instances: 63 characters

      • Windows-based instances: 15 characters

    • Os — (String)

      The instance's operating system, which must be set to one of the following. You cannot update an instance that is using a custom AMI.

      • A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2, Amazon Linux 2018.03, Amazon Linux 2017.09, Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03.

      • A supported Ubuntu operating system, such as Ubuntu 18.04 LTS, Ubuntu 16.04 LTS, Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS.

      • CentOS Linux 7

      • Red Hat Enterprise Linux 7

      • A supported Windows operating system, such as Microsoft Windows Server 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft Windows Server 2012 R2 with SQL Server Web.

      Not all operating systems are supported with all versions of Chef. For more information about supported operating systems, see OpsWorks Stacks Operating Systems.

      The default option is the current Amazon Linux version. If you set this parameter to Custom, you must use the AmiId parameter to specify the custom AMI that you want to use. For more information about how to use custom AMIs with OpsWorks, see Using Custom AMIs.

      Note: You can specify a different Linux operating system for the updated stack, but you cannot change from Linux to Windows or Windows to Linux.
    • AmiId — (String)

      The ID of the AMI that was used to create the instance. The value of this parameter must be the same AMI ID that the instance is already using. You cannot apply a new AMI to an instance by running UpdateInstance. UpdateInstance does not work on instances that are using custom AMIs.

    • SshKeyName — (String)

      The instance's Amazon EC2 key name.

    • Architecture — (String)

      The instance architecture. Instance types do not necessarily support both architectures. For a list of the architectures that are supported by the different instance types, see Instance Families and Types.

      Possible values include:
      • "x86_64"
      • "i386"
    • InstallUpdatesOnBoot — (Boolean)

      Whether to install operating system and package updates when the instance boots. The default value is true. To control when updates are installed, set this value to false. You must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

      Note: We strongly recommend using the default value of true, to ensure that your instances have the latest security updates.
    • EbsOptimized — (Boolean)

      This property cannot be updated.

    • AgentVersion — (String)

      The default OpsWorks Stacks agent version. You have the following options:

      • INHERIT - Use the stack's default agent version setting.

      • version_number - Use the specified agent version. This value overrides the stack's default setting. To update the agent version, you must edit the instance configuration and specify a new version. OpsWorks Stacks installs that version on the instance.

      The default setting is INHERIT. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call DescribeAgentVersions.

      AgentVersion cannot be set to Chef 12.2.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateLayer(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateLayer operation

var params = {
  LayerId: 'STRING_VALUE', /* required */
  Attributes: {
    '<LayerAttributesKeys>': 'STRING_VALUE',
    /* '<LayerAttributesKeys>': ... */
  },
  AutoAssignElasticIps: true || false,
  AutoAssignPublicIps: true || false,
  CloudWatchLogsConfiguration: {
    Enabled: true || false,
    LogStreams: [
      {
        BatchCount: 'NUMBER_VALUE',
        BatchSize: 'NUMBER_VALUE',
        BufferDuration: 'NUMBER_VALUE',
        DatetimeFormat: 'STRING_VALUE',
        Encoding: ascii | big5 | big5hkscs | cp037 | cp424 | cp437 | cp500 | cp720 | cp737 | cp775 | cp850 | cp852 | cp855 | cp856 | cp857 | cp858 | cp860 | cp861 | cp862 | cp863 | cp864 | cp865 | cp866 | cp869 | cp874 | cp875 | cp932 | cp949 | cp950 | cp1006 | cp1026 | cp1140 | cp1250 | cp1251 | cp1252 | cp1253 | cp1254 | cp1255 | cp1256 | cp1257 | cp1258 | euc_jp | euc_jis_2004 | euc_jisx0213 | euc_kr | gb2312 | gbk | gb18030 | hz | iso2022_jp | iso2022_jp_1 | iso2022_jp_2 | iso2022_jp_2004 | iso2022_jp_3 | iso2022_jp_ext | iso2022_kr | latin_1 | iso8859_2 | iso8859_3 | iso8859_4 | iso8859_5 | iso8859_6 | iso8859_7 | iso8859_8 | iso8859_9 | iso8859_10 | iso8859_13 | iso8859_14 | iso8859_15 | iso8859_16 | johab | koi8_r | koi8_u | mac_cyrillic | mac_greek | mac_iceland | mac_latin2 | mac_roman | mac_turkish | ptcp154 | shift_jis | shift_jis_2004 | shift_jisx0213 | utf_32 | utf_32_be | utf_32_le | utf_16 | utf_16_be | utf_16_le | utf_7 | utf_8 | utf_8_sig,
        File: 'STRING_VALUE',
        FileFingerprintLines: 'STRING_VALUE',
        InitialPosition: start_of_file | end_of_file,
        LogGroupName: 'STRING_VALUE',
        MultiLineStartPattern: 'STRING_VALUE',
        TimeZone: LOCAL | UTC
      },
      /* more items */
    ]
  },
  CustomInstanceProfileArn: 'STRING_VALUE',
  CustomJson: 'STRING_VALUE',
  CustomRecipes: {
    Configure: [
      'STRING_VALUE',
      /* more items */
    ],
    Deploy: [
      'STRING_VALUE',
      /* more items */
    ],
    Setup: [
      'STRING_VALUE',
      /* more items */
    ],
    Shutdown: [
      'STRING_VALUE',
      /* more items */
    ],
    Undeploy: [
      'STRING_VALUE',
      /* more items */
    ]
  },
  CustomSecurityGroupIds: [
    'STRING_VALUE',
    /* more items */
  ],
  EnableAutoHealing: true || false,
  InstallUpdatesOnBoot: true || false,
  LifecycleEventConfiguration: {
    Shutdown: {
      DelayUntilElbConnectionsDrained: true || false,
      ExecutionTimeout: 'NUMBER_VALUE'
    }
  },
  Name: 'STRING_VALUE',
  Packages: [
    'STRING_VALUE',
    /* more items */
  ],
  Shortname: 'STRING_VALUE',
  UseEbsOptimizedInstances: true || false,
  VolumeConfigurations: [
    {
      MountPoint: 'STRING_VALUE', /* required */
      NumberOfDisks: 'NUMBER_VALUE', /* required */
      Size: 'NUMBER_VALUE', /* required */
      Encrypted: true || false,
      Iops: 'NUMBER_VALUE',
      RaidLevel: 'NUMBER_VALUE',
      VolumeType: 'STRING_VALUE'
    },
    /* more items */
  ]
};
opsworks.updateLayer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • LayerId — (String)

      The layer ID.

    • Name — (String)

      The layer name, which is used by the console. Layer names can be a maximum of 32 characters.

    • Shortname — (String)

      For custom layers only, use this parameter to specify the layer's short name, which is used internally by OpsWorks Stacks and by Chef. The short name is also used as the name for the directory where your app files are installed. It can have a maximum of 32 characters and must be in the following format: /\A[a-z0-9-_.]+\Z/.

      Built-in layer short names are defined by OpsWorks Stacks. For more information, see the Layer reference in the OpsWorks User Guide.

    • Attributes — (map<String>)

      One or more user-defined key/value pairs to be added to the stack attributes.

    • CloudWatchLogsConfiguration — (map)

      Specifies CloudWatch Logs configuration options for the layer. For more information, see CloudWatchLogsLogStream.

      • Enabled — (Boolean)

        Whether CloudWatch Logs is enabled for a layer.

      • LogStreams — (Array<map>)

        A list of configuration options for CloudWatch Logs.

        • LogGroupName — (String)

          Specifies the destination log group. A log group is created automatically if it doesn't already exist. Log group names can be between 1 and 512 characters long. Allowed characters include a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), '/' (forward slash), and '.' (period).

        • DatetimeFormat — (String)

          Specifies how the time stamp is extracted from logs. For more information, see the CloudWatch Logs Agent Reference.

        • TimeZone — (String)

          Specifies the time zone of log event time stamps.

          Possible values include:
          • "LOCAL"
          • "UTC"
        • File — (String)

          Specifies log files that you want to push to CloudWatch Logs.

          File can point to a specific file or multiple files (by using wild card characters such as /var/log/system.log*). Only the latest file is pushed to CloudWatch Logs, based on file modification time. We recommend that you use wild card characters to specify a series of files of the same type, such as access_log.2014-06-01-01, access_log.2014-06-01-02, and so on by using a pattern like access_log.*. Don't use a wildcard to match multiple file types, such as access_log_80 and access_log_443. To specify multiple, different file types, add another log stream entry to the configuration file, so that each log file type is stored in a different log group.

          Zipped files are not supported.

        • FileFingerprintLines — (String)

          Specifies the range of lines for identifying a file. The valid values are one number, or two dash-delimited numbers, such as '1', '2-5'. The default value is '1', meaning the first line is used to calculate the fingerprint. Fingerprint lines are not sent to CloudWatch Logs unless all specified lines are available.

        • MultiLineStartPattern — (String)

          Specifies the pattern for identifying the start of a log message.

        • InitialPosition — (String)

          Specifies where to start to read data (start_of_file or end_of_file). The default is start_of_file. This setting is only used if there is no state persisted for that log stream.

          Possible values include:
          • "start_of_file"
          • "end_of_file"
        • Encoding — (String)

          Specifies the encoding of the log file so that the file can be read correctly. The default is utf_8. Encodings supported by Python codecs.decode() can be used here.

          Possible values include:
          • "ascii"
          • "big5"
          • "big5hkscs"
          • "cp037"
          • "cp424"
          • "cp437"
          • "cp500"
          • "cp720"
          • "cp737"
          • "cp775"
          • "cp850"
          • "cp852"
          • "cp855"
          • "cp856"
          • "cp857"
          • "cp858"
          • "cp860"
          • "cp861"
          • "cp862"
          • "cp863"
          • "cp864"
          • "cp865"
          • "cp866"
          • "cp869"
          • "cp874"
          • "cp875"
          • "cp932"
          • "cp949"
          • "cp950"
          • "cp1006"
          • "cp1026"
          • "cp1140"
          • "cp1250"
          • "cp1251"
          • "cp1252"
          • "cp1253"
          • "cp1254"
          • "cp1255"
          • "cp1256"
          • "cp1257"
          • "cp1258"
          • "euc_jp"
          • "euc_jis_2004"
          • "euc_jisx0213"
          • "euc_kr"
          • "gb2312"
          • "gbk"
          • "gb18030"
          • "hz"
          • "iso2022_jp"
          • "iso2022_jp_1"
          • "iso2022_jp_2"
          • "iso2022_jp_2004"
          • "iso2022_jp_3"
          • "iso2022_jp_ext"
          • "iso2022_kr"
          • "latin_1"
          • "iso8859_2"
          • "iso8859_3"
          • "iso8859_4"
          • "iso8859_5"
          • "iso8859_6"
          • "iso8859_7"
          • "iso8859_8"
          • "iso8859_9"
          • "iso8859_10"
          • "iso8859_13"
          • "iso8859_14"
          • "iso8859_15"
          • "iso8859_16"
          • "johab"
          • "koi8_r"
          • "koi8_u"
          • "mac_cyrillic"
          • "mac_greek"
          • "mac_iceland"
          • "mac_latin2"
          • "mac_roman"
          • "mac_turkish"
          • "ptcp154"
          • "shift_jis"
          • "shift_jis_2004"
          • "shift_jisx0213"
          • "utf_32"
          • "utf_32_be"
          • "utf_32_le"
          • "utf_16"
          • "utf_16_be"
          • "utf_16_le"
          • "utf_7"
          • "utf_8"
          • "utf_8_sig"
        • BufferDuration — (Integer)

          Specifies the time duration for the batching of log events. The minimum value is 5000ms and default value is 5000ms.

        • BatchCount — (Integer)

          Specifies the max number of log events in a batch, up to 10000. The default value is 1000.

        • BatchSize — (Integer)

          Specifies the maximum size of log events in a batch, in bytes, up to 1048576 bytes. The default value is 32768 bytes. This size is calculated as the sum of all event messages in UTF-8, plus 26 bytes for each log event.

    • CustomInstanceProfileArn — (String)

      The ARN of an IAM profile to be used for all of the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

    • CustomJson — (String)

      A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances. For more information, see Using Custom JSON.

    • CustomSecurityGroupIds — (Array<String>)

      An array containing the layer's custom security group IDs.

    • Packages — (Array<String>)

      An array of Package objects that describe the layer's packages.

    • VolumeConfigurations — (Array<map>)

      A VolumeConfigurations object that describes the layer's Amazon EBS volumes.

      • MountPointrequired — (String)

        The volume mount point. For example "/dev/sdh".

      • RaidLevel — (Integer)

        The volume RAID level.

      • NumberOfDisksrequired — (Integer)

        The number of disks in the volume.

      • Sizerequired — (Integer)

        The volume size.

      • VolumeType — (String)

        The volume type. For more information, see Amazon EBS Volume Types.

        • standard - Magnetic. Magnetic volumes must have a minimum size of 1 GiB and a maximum size of 1024 GiB.

        • io1 - Provisioned IOPS (SSD). PIOPS volumes must have a minimum size of 4 GiB and a maximum size of 16384 GiB.

        • gp2 - General Purpose (SSD). General purpose volumes must have a minimum size of 1 GiB and a maximum size of 16384 GiB.

        • st1 - Throughput Optimized hard disk drive (HDD). Throughput optimized HDD volumes must have a minimum size of 125 GiB and a maximum size of 16384 GiB.

        • sc1 - Cold HDD. Cold HDD volumes must have a minimum size of 125 GiB and a maximum size of 16384 GiB.

      • Iops — (Integer)

        For PIOPS volumes, the IOPS per disk.

      • Encrypted — (Boolean)

        Specifies whether an Amazon EBS volume is encrypted. For more information, see Amazon EBS Encryption.

    • EnableAutoHealing — (Boolean)

      Whether to disable auto healing for the layer.

    • AutoAssignElasticIps — (Boolean)

      Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer.

    • AutoAssignPublicIps — (Boolean)

      For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances. For more information, see How to Edit a Layer.

    • CustomRecipes — (map)

      A LayerCustomRecipes object that specifies the layer's custom recipes.

      • Setup — (Array<String>)

        An array of custom recipe names to be run following a setup event.

      • Configure — (Array<String>)

        An array of custom recipe names to be run following a configure event.

      • Deploy — (Array<String>)

        An array of custom recipe names to be run following a deploy event.

      • Undeploy — (Array<String>)

        An array of custom recipe names to be run following a undeploy event.

      • Shutdown — (Array<String>)

        An array of custom recipe names to be run following a shutdown event.

    • InstallUpdatesOnBoot — (Boolean)

      Whether to install operating system and package updates when the instance boots. The default value is true. To control when updates are installed, set this value to false. You must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

      Note: We strongly recommend using the default value of true, to ensure that your instances have the latest security updates.
    • UseEbsOptimizedInstances — (Boolean)

      Whether to use Amazon EBS-optimized instances.

    • LifecycleEventConfiguration — (map)

      • Shutdown — (map)

        A ShutdownEventConfiguration object that specifies the Shutdown event configuration.

        • ExecutionTimeout — (Integer)

          The time, in seconds, that OpsWorks Stacks waits after triggering a Shutdown event before shutting down an instance.

        • DelayUntilElbConnectionsDrained — (Boolean)

          Whether to enable Elastic Load Balancing connection draining. For more information, see Connection Draining

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateMyUserProfile(params = {}, callback) ⇒ AWS.Request

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the updateMyUserProfile operation

var params = {
  SshPublicKey: 'STRING_VALUE'
};
opsworks.updateMyUserProfile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • SshPublicKey — (String)

      The user's SSH public key.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateRdsDbInstance(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateRdsDbInstance operation

var params = {
  RdsDbInstanceArn: 'STRING_VALUE', /* required */
  DbPassword: 'STRING_VALUE',
  DbUser: 'STRING_VALUE'
};
opsworks.updateRdsDbInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • RdsDbInstanceArn — (String)

      The Amazon RDS instance's ARN.

    • DbUser — (String)

      The master user name.

    • DbPassword — (String)

      The database password.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateStack(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateStack operation

var params = {
  StackId: 'STRING_VALUE', /* required */
  AgentVersion: 'STRING_VALUE',
  Attributes: {
    '<StackAttributesKeys>': 'STRING_VALUE',
    /* '<StackAttributesKeys>': ... */
  },
  ChefConfiguration: {
    BerkshelfVersion: 'STRING_VALUE',
    ManageBerkshelf: true || false
  },
  ConfigurationManager: {
    Name: 'STRING_VALUE',
    Version: 'STRING_VALUE'
  },
  CustomCookbooksSource: {
    Password: 'STRING_VALUE',
    Revision: 'STRING_VALUE',
    SshKey: 'STRING_VALUE',
    Type: git | svn | archive | s3,
    Url: 'STRING_VALUE',
    Username: 'STRING_VALUE'
  },
  CustomJson: 'STRING_VALUE',
  DefaultAvailabilityZone: 'STRING_VALUE',
  DefaultInstanceProfileArn: 'STRING_VALUE',
  DefaultOs: 'STRING_VALUE',
  DefaultRootDeviceType: ebs | instance-store,
  DefaultSshKeyName: 'STRING_VALUE',
  DefaultSubnetId: 'STRING_VALUE',
  HostnameTheme: 'STRING_VALUE',
  Name: 'STRING_VALUE',
  ServiceRoleArn: 'STRING_VALUE',
  UseCustomCookbooks: true || false,
  UseOpsworksSecurityGroups: true || false
};
opsworks.updateStack(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StackId — (String)

      The stack ID.

    • Name — (String)

      The stack's new name. Stack names can be a maximum of 64 characters.

    • Attributes — (map<String>)

      One or more user-defined key-value pairs to be added to the stack attributes.

    • ServiceRoleArn — (String)

      Do not use this parameter. You cannot update a stack's service role.

    • DefaultInstanceProfileArn — (String)

      The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

    • DefaultOs — (String)

      The stack's operating system, which must be set to one of the following:

      • A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2, Amazon Linux 2018.03, Amazon Linux 2017.09, Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03.

      • A supported Ubuntu operating system, such as Ubuntu 18.04 LTS, Ubuntu 16.04 LTS, Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS.

      • CentOS Linux 7

      • Red Hat Enterprise Linux 7

      • A supported Windows operating system, such as Microsoft Windows Server 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft Windows Server 2012 R2 with SQL Server Web.

      • A custom AMI: Custom. You specify the custom AMI you want to use when you create instances. For more information about how to use custom AMIs with OpsWorks, see Using Custom AMIs.

      The default option is the stack's current operating system. Not all operating systems are supported with all versions of Chef. For more information about supported operating systems, see OpsWorks Stacks Operating Systems.

    • HostnameTheme — (String)

      The stack's new host name theme, with spaces replaced by underscores. The theme is used to generate host names for the stack's instances. By default, HostnameTheme is set to Layer_Dependent, which creates host names by appending integers to the layer's short name. The other themes are:

      • Baked_Goods

      • Clouds

      • Europe_Cities

      • Fruits

      • Greek_Deities_and_Titans

      • Legendary_creatures_from_Japan

      • Planets_and_Moons

      • Roman_Deities

      • Scottish_Islands

      • US_Cities

      • Wild_Cats

      To obtain a generated host name, call GetHostNameSuggestion, which returns a host name based on the current theme.

    • DefaultAvailabilityZone — (String)

      The stack's default Availability Zone, which must be in the stack's region. For more information, see Regions and Endpoints. If you also specify a value for DefaultSubnetId, the subnet must be in the same zone. For more information, see CreateStack.

    • DefaultSubnetId — (String)

      The stack's default VPC subnet ID. This parameter is required if you specify a value for the VpcId parameter. All instances are launched into this subnet unless you specify otherwise when you create the instance. If you also specify a value for DefaultAvailabilityZone, the subnet must be in that zone. For information on default values and when this parameter is required, see the VpcId parameter description.

    • CustomJson — (String)

      A string that contains user-defined, custom JSON. It can be used to override the corresponding default stack configuration JSON values or to pass data to recipes. The string should be in the following format:

      "{\"key1\": \"value1\", \"key2\": \"value2\",...}"

      For more information about custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes.

    • ConfigurationManager — (map)

      The configuration manager. When you update a stack, we recommend that you use the configuration manager to specify the Chef version: 12, 11.10, or 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for Linux stacks is currently 12.

      • Name — (String)

        The name. This parameter must be set to Chef.

      • Version — (String)

        The Chef version. This parameter must be set to 12, 11.10, or 11.4 for Linux stacks, and to 12.2 for Windows stacks. The default value for Linux stacks is 12.

    • ChefConfiguration — (map)

      A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version on Chef 11.10 stacks. For more information, see Create a New Stack.

      • ManageBerkshelf — (Boolean)

        Whether to enable Berkshelf.

      • BerkshelfVersion — (String)

        The Berkshelf version.

    • UseCustomCookbooks — (Boolean)

      Whether the stack uses custom cookbooks.

    • CustomCookbooksSource — (map)

      Contains the information required to retrieve an app or cookbook from a repository. For more information, see Adding Apps or Cookbooks and Recipes.

      • Type — (String)

        The repository type.

        Possible values include:
        • "git"
        • "svn"
        • "archive"
        • "s3"
      • Url — (String)

        The source URL. The following is an example of an Amazon S3 source URL: https://s3.amazonaws.com/opsworks-demo-bucket/opsworks&#95;cookbook&#95;demo.tar.gz.

      • Username — (String)

        This parameter depends on the repository type.

        • For Amazon S3 bundles, set Username to the appropriate IAM access key ID.

        • For HTTP bundles, Git repositories, and Subversion repositories, set Username to the user name.

      • Password — (String)

        When included in a request, the parameter depends on the repository type.

        • For Amazon S3 bundles, set Password to the appropriate IAM secret access key.

        • For HTTP bundles and Subversion repositories, set Password to the password.

        For more information on how to safely handle IAM credentials, see https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html.

        In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

      • SshKey — (String)

        In requests, the repository's SSH key.

        In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

      • Revision — (String)

        The application's version. OpsWorks Stacks enables you to easily deploy new versions of an application. One of the simplest approaches is to have branches or revisions in your repository that represent different versions that can potentially be deployed.

    • DefaultSshKeyName — (String)

      A default Amazon EC2 key-pair name. The default value is none. If you specify a key-pair name, OpsWorks Stacks installs the public key on the instance and you can use the private key with an SSH client to log in to the instance. For more information, see Using SSH to Communicate with an Instance and Managing SSH Access. You can override this setting by specifying a different key pair, or no key pair, when you create an instance.

    • DefaultRootDeviceType — (String)

      The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.

      Possible values include:
      • "ebs"
      • "instance-store"
    • UseOpsworksSecurityGroups — (Boolean)

      Whether to associate the OpsWorks Stacks built-in security groups with the stack's layers.

      OpsWorks Stacks provides a standard set of built-in security groups, one for each layer, which are associated with layers by default. UseOpsworksSecurityGroups allows you to provide your own custom security groups instead of using the built-in groups. UseOpsworksSecurityGroups has the following settings:

      • True - OpsWorks Stacks automatically associates the appropriate built-in security group with each layer (default setting). You can associate additional security groups with a layer after you create it, but you cannot delete the built-in security group.

      • False - OpsWorks Stacks does not associate built-in security groups with layers. You must create appropriate EC2 security groups and associate a security group with each layer that you create. However, you can still manually associate a built-in security group with a layer on. Custom security groups are required only for those layers that need custom settings.

      For more information, see Create a New Stack.

    • AgentVersion — (String)

      The default OpsWorks Stacks agent version. You have the following options:

      • Auto-update - Set this parameter to LATEST. OpsWorks Stacks automatically installs new agent versions on the stack's instances as soon as they are available.

      • Fixed version - Set this parameter to your preferred agent version. To update the agent version, you must edit the stack configuration and specify a new version. OpsWorks Stacks installs that version on the stack's instances.

      The default setting is LATEST. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2.

      Note: You can also specify an agent version when you create or update an instance, which overrides the stack's default setting.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateUserProfile(params = {}, callback) ⇒ AWS.Request

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 about user permissions, see Managing User Permissions.

Service Reference:

Examples:

Calling the updateUserProfile operation

var params = {
  IamUserArn: 'STRING_VALUE', /* required */
  AllowSelfManagement: true || false,
  SshPublicKey: 'STRING_VALUE',
  SshUsername: 'STRING_VALUE'
};
opsworks.updateUserProfile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • IamUserArn — (String)

      The user IAM ARN. This can also be a federated user's ARN.

    • SshUsername — (String)

      The user's SSH user name. The allowable characters are [a-z], [A-Z], [0-9], '-', and '_'. If the specified name includes other punctuation marks, OpsWorks Stacks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, OpsWorks Stacks generates one from the IAM user name.

    • SshPublicKey — (String)

      The user's new SSH public key.

    • AllowSelfManagement — (Boolean)

      Whether users can specify their own SSH public key through the My Settings page. For more information, see Managing User Permissions.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateVolume(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateVolume operation

var params = {
  VolumeId: 'STRING_VALUE', /* required */
  MountPoint: 'STRING_VALUE',
  Name: 'STRING_VALUE'
};
opsworks.updateVolume(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • VolumeId — (String)

      The volume ID.

    • Name — (String)

      The new name. Volume names can be a maximum of 128 characters.

    • MountPoint — (String)

      The new mount point.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

waitFor(state, params = {}, callback) ⇒ AWS.Request

Waits for a given OpsWorks resource. The final callback or 'complete' event will be fired only when the resource is either in its final state or the waiter has timed out and stopped polling for the final state.

Examples:

Waiting for the appExists state

var params = {
  // ... input parameters ...
};
opsworks.waitFor('appExists', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • state (String)

    the resource state to wait for. Available states for this service are listed in "Waiter Resource States" below.

  • params (map) (defaults to: {})

    a list of parameters for the given state. See each waiter resource state for required parameters.

Callback (callback):

  • function(err, data) { ... }

    Callback containing error and data information. See the respective resource state for the expected error or data information.

    If the waiter times out its requests, it will return a ResourceNotReady error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

Waiter Resource Details

opsworks.waitFor('appExists', params = {}, [callback]) ⇒ AWS.Request

Waits for the appExists state by periodically calling the underlying OpsWorks.describeApps() operation every 1 seconds (at most 40 times).

Examples:

Waiting for the appExists state

var params = {
  // ... input parameters ...
};
opsworks.waitFor('appExists', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • StackId — (String)

      The app stack ID. If you use this parameter, DescribeApps returns a description of the apps in the specified stack.

    • AppIds — (Array<String>)

      An array of app IDs for the apps to be described. If you use this parameter, DescribeApps returns a description of the specified apps. Otherwise, it returns a description of every app.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Apps — (Array<map>)

        An array of App objects that describe the specified apps.

        • AppId — (String)

          The app ID.

        • StackId — (String)

          The app stack ID.

        • Shortname — (String)

          The app's short name.

        • Name — (String)

          The app name.

        • Description — (String)

          A description of the app.

        • DataSources — (Array<map>)

          The app's data sources.

          • Type — (String)

            The data source's type, AutoSelectOpsworksMysqlInstance, OpsworksMysqlInstance, RdsDbInstance, or None.

          • Arn — (String)

            The data source's ARN.

          • DatabaseName — (String)

            The database name.

        • Type — (String)

          The app type.

          Possible values include:
          • "aws-flow-ruby"
          • "java"
          • "rails"
          • "php"
          • "nodejs"
          • "static"
          • "other"
        • AppSource — (map)

          A Source object that describes the app repository.

          • Type — (String)

            The repository type.

            Possible values include:
            • "git"
            • "svn"
            • "archive"
            • "s3"
          • Url — (String)

            The source URL. The following is an example of an Amazon S3 source URL: https://s3.amazonaws.com/opsworks-demo-bucket/opsworks&#95;cookbook&#95;demo.tar.gz.

          • Username — (String)

            This parameter depends on the repository type.

            • For Amazon S3 bundles, set Username to the appropriate IAM access key ID.

            • For HTTP bundles, Git repositories, and Subversion repositories, set Username to the user name.

          • Password — (String)

            When included in a request, the parameter depends on the repository type.

            • For Amazon S3 bundles, set Password to the appropriate IAM secret access key.

            • For HTTP bundles and Subversion repositories, set Password to the password.

            For more information on how to safely handle IAM credentials, see https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html.

            In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

          • SshKey — (String)

            In requests, the repository's SSH key.

            In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

          • Revision — (String)

            The application's version. OpsWorks Stacks enables you to easily deploy new versions of an application. One of the simplest approaches is to have branches or revisions in your repository that represent different versions that can potentially be deployed.

        • Domains — (Array<String>)

          The app vhost settings with multiple domains separated by commas. For example: 'www.example.com, example.com'

        • EnableSsl — (Boolean)

          Whether to enable SSL for the app.

        • SslConfiguration — (map)

          An SslConfiguration object with the SSL configuration.

          • Certificaterequired — (String)

            The contents of the certificate's domain.crt file.

          • PrivateKeyrequired — (String)

            The private key; the contents of the certificate's domain.kex file.

          • Chain — (String)

            Optional. Can be used to specify an intermediate certificate authority key or client authentication.

        • Attributes — (map<String>)

          The stack attributes.

        • CreatedAt — (String)

          When the app was created.

        • Environment — (Array<map>)

          An array of EnvironmentVariable objects that specify environment variables to be associated with the app. After you deploy the app, these variables are defined on the associated app server instances. For more information, see Environment Variables.

          Note: There is no specific limit on the number of environment variables. However, the size of the associated data structure - which includes the variable names, values, and protected flag values - cannot exceed 20 KB. This limit should accommodate most if not all use cases, but if you do exceed it, you will cause an exception (API) with an "Environment: is too large (maximum is 20 KB)" message.
          • Keyrequired — (String)

            (Required) The environment variable's name, which can consist of up to 64 characters and must be specified. The name can contain upper- and lowercase letters, numbers, and underscores (_), but it must start with a letter or underscore.

          • Valuerequired — (String)

            (Optional) The environment variable's value, which can be left empty. If you specify a value, it can contain up to 256 characters, which must all be printable.

          • Secure — (Boolean)

            (Optional) Whether the variable's value is returned by the DescribeApps action. To hide an environment variable's value, set Secure to true. DescribeApps returns *****FILTERED***** instead of the actual value. The default value for Secure is false.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

opsworks.waitFor('deploymentSuccessful', params = {}, [callback]) ⇒ AWS.Request

Waits for the deploymentSuccessful state by periodically calling the underlying OpsWorks.describeDeployments() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the deploymentSuccessful state

var params = {
  // ... input parameters ...
};
opsworks.waitFor('deploymentSuccessful', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • StackId — (String)

      The stack ID. If you include this parameter, the command returns a description of the commands associated with the specified stack.

    • AppId — (String)

      The app ID. If you include this parameter, the command returns a description of the commands associated with the specified app.

    • DeploymentIds — (Array<String>)

      An array of deployment IDs to be described. If you include this parameter, the command returns a description of the specified deployments. Otherwise, it returns a description of every deployment.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Deployments — (Array<map>)

        An array of Deployment objects that describe the deployments.

        • DeploymentId — (String)

          The deployment ID.

        • StackId — (String)

          The stack ID.

        • AppId — (String)

          The app ID.

        • CreatedAt — (String)

          Date when the deployment was created.

        • CompletedAt — (String)

          Date when the deployment completed.

        • Duration — (Integer)

          The deployment duration.

        • IamUserArn — (String)

          The user's IAM ARN.

        • Comment — (String)

          A user-defined comment.

        • Command — (map)

          Used to specify a stack or deployment command.

          • Namerequired — (String)

            Specifies the operation. You can specify only one command.

            For stacks, the following commands are available:

            • execute_recipes: Execute one or more recipes. To specify the recipes, set an Args parameter named recipes to the list of recipes to be executed. For example, to execute phpapp::appsetup, set Args to {"recipes":["phpapp::appsetup"]}.

            • install_dependencies: Install the stack's dependencies.

            • update_custom_cookbooks: Update the stack's custom cookbooks.

            • update_dependencies: Update the stack's dependencies.

            Note: The update_dependencies and install_dependencies commands are supported only for Linux instances. You can run the commands successfully on Windows instances, but they do nothing.

            For apps, the following commands are available:

            • deploy: Deploy an app. Ruby on Rails apps have an optional Args parameter named migrate. Set Args to {"migrate":["true"]} to migrate the database. The default setting is {"migrate":["false"]}.

            • rollback Roll the app back to the previous version. When you update an app, OpsWorks Stacks stores the previous version, up to a maximum of five versions. You can use this command to roll an app back as many as four versions.

            • start: Start the app's web or application server.

            • stop: Stop the app's web or application server.

            • restart: Restart the app's web or application server.

            • undeploy: Undeploy the app.

            Possible values include:
            • "install_dependencies"
            • "update_dependencies"
            • "update_custom_cookbooks"
            • "execute_recipes"
            • "configure"
            • "setup"
            • "deploy"
            • "rollback"
            • "start"
            • "stop"
            • "restart"
            • "undeploy"
          • Args — (map<Array<String>>)

            The arguments of those commands that take arguments. It should be set to a JSON object with the following format:

            {"arg_name1" : ["value1", "value2", ...], "arg_name2" : ["value1", "value2", ...], ...}

            The update_dependencies command takes two arguments:

            • upgrade_os_to - Specifies the Amazon Linux version that you want instances to run, such as Amazon Linux 2. You must also set the allow_reboot argument to true.

            • allow_reboot - Specifies whether to allow OpsWorks Stacks to reboot the instances if necessary, after installing the updates. This argument can be set to either true or false. The default value is false.

            For example, to upgrade an instance to Amazon Linux 2018.03, set Args to the following.

            { "upgrade_os_to":["Amazon Linux 2018.03"], "allow_reboot":["true"] }

        • Status — (String)

          The deployment status:

          • running

          • successful

          • failed

        • CustomJson — (String)

          A string that contains user-defined custom JSON. It can be used to override the corresponding default stack configuration attribute values for stack or to pass data to recipes. The string should be in the following format:

          "{\"key1\": \"value1\", \"key2\": \"value2\",...}"

          For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes.

        • InstanceIds — (Array<String>)

          The IDs of the target instances.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

opsworks.waitFor('instanceOnline', params = {}, [callback]) ⇒ AWS.Request

Waits for the instanceOnline state by periodically calling the underlying OpsWorks.describeInstances() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the instanceOnline state

var params = {
  // ... input parameters ...
};
opsworks.waitFor('instanceOnline', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • StackId — (String)

      A stack ID. If you use this parameter, DescribeInstances returns descriptions of the instances associated with the specified stack.

    • LayerId — (String)

      A layer ID. If you use this parameter, DescribeInstances returns descriptions of the instances associated with the specified layer.

    • InstanceIds — (Array<String>)

      An array of instance IDs to be described. If you use this parameter, DescribeInstances returns a description of the specified instances. Otherwise, it returns a description of every instance.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Instances — (Array<map>)

        An array of Instance objects that describe the instances.

        • AgentVersion — (String)

          The agent version. This parameter is set to INHERIT if the instance inherits the default stack setting or to a a version number for a fixed agent version.

        • AmiId — (String)

          A custom AMI ID to be used to create the instance. For more information, see Instances

        • Architecture — (String)

          The instance architecture: "i386" or "x86_64".

          Possible values include:
          • "x86_64"
          • "i386"
        • Arn — (String)

          The instance's Amazon Resource Number (ARN).

        • AutoScalingType — (String)

          For load-based or time-based instances, the type.

          Possible values include:
          • "load"
          • "timer"
        • AvailabilityZone — (String)

          The instance Availability Zone. For more information, see Regions and Endpoints.

        • BlockDeviceMappings — (Array<map>)

          An array of BlockDeviceMapping objects that specify the instance's block device mappings.

          • DeviceName — (String)

            The device name that is exposed to the instance, such as /dev/sdh. For the root device, you can use the explicit device name or you can set this parameter to ROOT_DEVICE and OpsWorks Stacks will provide the correct device name.

          • NoDevice — (String)

            Suppresses the specified device included in the AMI's block device mapping.

          • VirtualName — (String)

            The virtual device name. For more information, see BlockDeviceMapping.

          • Ebs — (map)

            An EBSBlockDevice that defines how to configure an Amazon EBS volume when the instance is launched.

            • SnapshotId — (String)

              The snapshot ID.

            • Iops — (Integer)

              The number of I/O operations per second (IOPS) that the volume supports. For more information, see EbsBlockDevice.

            • VolumeSize — (Integer)

              The volume size, in GiB. For more information, see EbsBlockDevice.

            • VolumeType — (String)

              The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized hard disk drives (HDD), sc1 for Cold HDD,and standard for Magnetic volumes.

              If you specify the io1 volume type, you must also specify a value for the Iops attribute. The maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1. Amazon Web Services uses the default volume size (in GiB) specified in the AMI attributes to set IOPS to 50 x (volume size).

              Possible values include:
              • "gp2"
              • "io1"
              • "standard"
            • DeleteOnTermination — (Boolean)

              Whether the volume is deleted on instance termination.

        • CreatedAt — (String)

          The time that the instance was created.

        • EbsOptimized — (Boolean)

          Whether this is an Amazon EBS-optimized instance.

        • Ec2InstanceId — (String)

          The ID of the associated Amazon EC2 instance.

        • EcsClusterArn — (String)

          For container instances, the Amazon ECS cluster's ARN.

        • EcsContainerInstanceArn — (String)

          For container instances, the instance's ARN.

        • ElasticIp — (String)

          The instance Elastic IP address.

        • Hostname — (String)

          The instance host name. The following are character limits for instance host names.

          • Linux-based instances: 63 characters

          • Windows-based instances: 15 characters

        • InfrastructureClass — (String)

          For registered instances, the infrastructure class: ec2 or on-premises.

        • InstallUpdatesOnBoot — (Boolean)

          Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must update instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

          Note: We strongly recommend using the default value of true to ensure that your instances have the latest security updates.
        • InstanceId — (String)

          The instance ID.

        • InstanceProfileArn — (String)

          The ARN of the instance's IAM profile. For more information about IAM ARNs, see Using Identifiers.

        • InstanceType — (String)

          The instance type, such as t2.micro.

        • LastServiceErrorId — (String)

          The ID of the last service error. For more information, call DescribeServiceErrors.

        • LayerIds — (Array<String>)

          An array containing the instance layer IDs.

        • Os — (String)

          The instance's operating system.

        • Platform — (String)

          The instance's platform.

        • PrivateDns — (String)

          The instance's private DNS name.

        • PrivateIp — (String)

          The instance's private IP address.

        • PublicDns — (String)

          The instance public DNS name.

        • PublicIp — (String)

          The instance public IP address.

        • RegisteredBy — (String)

          For registered instances, who performed the registration.

        • ReportedAgentVersion — (String)

          The instance's reported OpsWorks Stacks agent version.

        • ReportedOs — (map)

          For registered instances, the reported operating system.

          • Family — (String)

            The operating system family.

          • Name — (String)

            The operating system name.

          • Version — (String)

            The operating system version.

        • RootDeviceType — (String)

          The instance's root device type. For more information, see Storage for the Root Device.

          Possible values include:
          • "ebs"
          • "instance-store"
        • RootDeviceVolumeId — (String)

          The root device volume ID.

        • SecurityGroupIds — (Array<String>)

          An array containing the instance security group IDs.

        • SshHostDsaKeyFingerprint — (String)

          The SSH key's Deep Security Agent (DSA) fingerprint.

        • SshHostRsaKeyFingerprint — (String)

          The SSH key's RSA fingerprint.

        • SshKeyName — (String)

          The instance's Amazon EC2 key-pair name.

        • StackId — (String)

          The stack ID.

        • Status — (String)

          The instance status:

          • booting

          • connection_lost

          • online

          • pending

          • rebooting

          • requested

          • running_setup

          • setup_failed

          • shutting_down

          • start_failed

          • stop_failed

          • stopped

          • stopping

          • terminated

          • terminating

        • SubnetId — (String)

          The instance's subnet ID; applicable only if the stack is running in a VPC.

        • Tenancy — (String)

          The instance's tenancy option, such as dedicated or host.

        • VirtualizationType — (String)

          The instance's virtualization type: paravirtual or hvm.

          Possible values include:
          • "paravirtual"
          • "hvm"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

opsworks.waitFor('instanceRegistered', params = {}, [callback]) ⇒ AWS.Request

Waits for the instanceRegistered state by periodically calling the underlying OpsWorks.describeInstances() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the instanceRegistered state

var params = {
  // ... input parameters ...
};
opsworks.waitFor('instanceRegistered', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • StackId — (String)

      A stack ID. If you use this parameter, DescribeInstances returns descriptions of the instances associated with the specified stack.

    • LayerId — (String)

      A layer ID. If you use this parameter, DescribeInstances returns descriptions of the instances associated with the specified layer.

    • InstanceIds — (Array<String>)

      An array of instance IDs to be described. If you use this parameter, DescribeInstances returns a description of the specified instances. Otherwise, it returns a description of every instance.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Instances — (Array<map>)

        An array of Instance objects that describe the instances.

        • AgentVersion — (String)

          The agent version. This parameter is set to INHERIT if the instance inherits the default stack setting or to a a version number for a fixed agent version.

        • AmiId — (String)

          A custom AMI ID to be used to create the instance. For more information, see Instances

        • Architecture — (String)

          The instance architecture: "i386" or "x86_64".

          Possible values include:
          • "x86_64"
          • "i386"
        • Arn — (String)

          The instance's Amazon Resource Number (ARN).

        • AutoScalingType — (String)

          For load-based or time-based instances, the type.

          Possible values include:
          • "load"
          • "timer"
        • AvailabilityZone — (String)

          The instance Availability Zone. For more information, see Regions and Endpoints.

        • BlockDeviceMappings — (Array<map>)

          An array of BlockDeviceMapping objects that specify the instance's block device mappings.

          • DeviceName — (String)

            The device name that is exposed to the instance, such as /dev/sdh. For the root device, you can use the explicit device name or you can set this parameter to ROOT_DEVICE and OpsWorks Stacks will provide the correct device name.

          • NoDevice — (String)

            Suppresses the specified device included in the AMI's block device mapping.

          • VirtualName — (String)

            The virtual device name. For more information, see BlockDeviceMapping.

          • Ebs — (map)

            An EBSBlockDevice that defines how to configure an Amazon EBS volume when the instance is launched.

            • SnapshotId — (String)

              The snapshot ID.

            • Iops — (Integer)

              The number of I/O operations per second (IOPS) that the volume supports. For more information, see EbsBlockDevice.

            • VolumeSize — (Integer)

              The volume size, in GiB. For more information, see EbsBlockDevice.

            • VolumeType — (String)

              The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized hard disk drives (HDD), sc1 for Cold HDD,and standard for Magnetic volumes.

              If you specify the io1 volume type, you must also specify a value for the Iops attribute. The maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1. Amazon Web Services uses the default volume size (in GiB) specified in the AMI attributes to set IOPS to 50 x (volume size).

              Possible values include:
              • "gp2"
              • "io1"
              • "standard"
            • DeleteOnTermination — (Boolean)

              Whether the volume is deleted on instance termination.

        • CreatedAt — (String)

          The time that the instance was created.

        • EbsOptimized — (Boolean)

          Whether this is an Amazon EBS-optimized instance.

        • Ec2InstanceId — (String)

          The ID of the associated Amazon EC2 instance.

        • EcsClusterArn — (String)

          For container instances, the Amazon ECS cluster's ARN.

        • EcsContainerInstanceArn — (String)

          For container instances, the instance's ARN.

        • ElasticIp — (String)

          The instance Elastic IP address.

        • Hostname — (String)

          The instance host name. The following are character limits for instance host names.

          • Linux-based instances: 63 characters

          • Windows-based instances: 15 characters

        • InfrastructureClass — (String)

          For registered instances, the infrastructure class: ec2 or on-premises.

        • InstallUpdatesOnBoot — (Boolean)

          Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must update instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

          Note: We strongly recommend using the default value of true to ensure that your instances have the latest security updates.
        • InstanceId — (String)

          The instance ID.

        • InstanceProfileArn — (String)

          The ARN of the instance's IAM profile. For more information about IAM ARNs, see Using Identifiers.

        • InstanceType — (String)

          The instance type, such as t2.micro.

        • LastServiceErrorId — (String)

          The ID of the last service error. For more information, call DescribeServiceErrors.

        • LayerIds — (Array<String>)

          An array containing the instance layer IDs.

        • Os — (String)

          The instance's operating system.

        • Platform — (String)

          The instance's platform.

        • PrivateDns — (String)

          The instance's private DNS name.

        • PrivateIp — (String)

          The instance's private IP address.

        • PublicDns — (String)

          The instance public DNS name.

        • PublicIp — (String)

          The instance public IP address.

        • RegisteredBy — (String)

          For registered instances, who performed the registration.

        • ReportedAgentVersion — (String)

          The instance's reported OpsWorks Stacks agent version.

        • ReportedOs — (map)

          For registered instances, the reported operating system.

          • Family — (String)

            The operating system family.

          • Name — (String)

            The operating system name.

          • Version — (String)

            The operating system version.

        • RootDeviceType — (String)

          The instance's root device type. For more information, see Storage for the Root Device.

          Possible values include:
          • "ebs"
          • "instance-store"
        • RootDeviceVolumeId — (String)

          The root device volume ID.

        • SecurityGroupIds — (Array<String>)

          An array containing the instance security group IDs.

        • SshHostDsaKeyFingerprint — (String)

          The SSH key's Deep Security Agent (DSA) fingerprint.

        • SshHostRsaKeyFingerprint — (String)

          The SSH key's RSA fingerprint.

        • SshKeyName — (String)

          The instance's Amazon EC2 key-pair name.

        • StackId — (String)

          The stack ID.

        • Status — (String)

          The instance status:

          • booting

          • connection_lost

          • online

          • pending

          • rebooting

          • requested

          • running_setup

          • setup_failed

          • shutting_down

          • start_failed

          • stop_failed

          • stopped

          • stopping

          • terminated

          • terminating

        • SubnetId — (String)

          The instance's subnet ID; applicable only if the stack is running in a VPC.

        • Tenancy — (String)

          The instance's tenancy option, such as dedicated or host.

        • VirtualizationType — (String)

          The instance's virtualization type: paravirtual or hvm.

          Possible values include:
          • "paravirtual"
          • "hvm"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

opsworks.waitFor('instanceStopped', params = {}, [callback]) ⇒ AWS.Request

Waits for the instanceStopped state by periodically calling the underlying OpsWorks.describeInstances() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the instanceStopped state

var params = {
  // ... input parameters ...
};
opsworks.waitFor('instanceStopped', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • StackId — (String)

      A stack ID. If you use this parameter, DescribeInstances returns descriptions of the instances associated with the specified stack.

    • LayerId — (String)

      A layer ID. If you use this parameter, DescribeInstances returns descriptions of the instances associated with the specified layer.

    • InstanceIds — (Array<String>)

      An array of instance IDs to be described. If you use this parameter, DescribeInstances returns a description of the specified instances. Otherwise, it returns a description of every instance.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Instances — (Array<map>)

        An array of Instance objects that describe the instances.

        • AgentVersion — (String)

          The agent version. This parameter is set to INHERIT if the instance inherits the default stack setting or to a a version number for a fixed agent version.

        • AmiId — (String)

          A custom AMI ID to be used to create the instance. For more information, see Instances

        • Architecture — (String)

          The instance architecture: "i386" or "x86_64".

          Possible values include:
          • "x86_64"
          • "i386"
        • Arn — (String)

          The instance's Amazon Resource Number (ARN).

        • AutoScalingType — (String)

          For load-based or time-based instances, the type.

          Possible values include:
          • "load"
          • "timer"
        • AvailabilityZone — (String)

          The instance Availability Zone. For more information, see Regions and Endpoints.

        • BlockDeviceMappings — (Array<map>)

          An array of BlockDeviceMapping objects that specify the instance's block device mappings.

          • DeviceName — (String)

            The device name that is exposed to the instance, such as /dev/sdh. For the root device, you can use the explicit device name or you can set this parameter to ROOT_DEVICE and OpsWorks Stacks will provide the correct device name.

          • NoDevice — (String)

            Suppresses the specified device included in the AMI's block device mapping.

          • VirtualName — (String)

            The virtual device name. For more information, see BlockDeviceMapping.

          • Ebs — (map)

            An EBSBlockDevice that defines how to configure an Amazon EBS volume when the instance is launched.

            • SnapshotId — (String)

              The snapshot ID.

            • Iops — (Integer)

              The number of I/O operations per second (IOPS) that the volume supports. For more information, see EbsBlockDevice.

            • VolumeSize — (Integer)

              The volume size, in GiB. For more information, see EbsBlockDevice.

            • VolumeType — (String)

              The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized hard disk drives (HDD), sc1 for Cold HDD,and standard for Magnetic volumes.

              If you specify the io1 volume type, you must also specify a value for the Iops attribute. The maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1. Amazon Web Services uses the default volume size (in GiB) specified in the AMI attributes to set IOPS to 50 x (volume size).

              Possible values include:
              • "gp2"
              • "io1"
              • "standard"
            • DeleteOnTermination — (Boolean)

              Whether the volume is deleted on instance termination.

        • CreatedAt — (String)

          The time that the instance was created.

        • EbsOptimized — (Boolean)

          Whether this is an Amazon EBS-optimized instance.

        • Ec2InstanceId — (String)

          The ID of the associated Amazon EC2 instance.

        • EcsClusterArn — (String)

          For container instances, the Amazon ECS cluster's ARN.

        • EcsContainerInstanceArn — (String)

          For container instances, the instance's ARN.

        • ElasticIp — (String)

          The instance Elastic IP address.

        • Hostname — (String)

          The instance host name. The following are character limits for instance host names.

          • Linux-based instances: 63 characters

          • Windows-based instances: 15 characters

        • InfrastructureClass — (String)

          For registered instances, the infrastructure class: ec2 or on-premises.

        • InstallUpdatesOnBoot — (Boolean)

          Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must update instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

          Note: We strongly recommend using the default value of true to ensure that your instances have the latest security updates.
        • InstanceId — (String)

          The instance ID.

        • InstanceProfileArn — (String)

          The ARN of the instance's IAM profile. For more information about IAM ARNs, see Using Identifiers.

        • InstanceType — (String)

          The instance type, such as t2.micro.

        • LastServiceErrorId — (String)

          The ID of the last service error. For more information, call DescribeServiceErrors.

        • LayerIds — (Array<String>)

          An array containing the instance layer IDs.

        • Os — (String)

          The instance's operating system.

        • Platform — (String)

          The instance's platform.

        • PrivateDns — (String)

          The instance's private DNS name.

        • PrivateIp — (String)

          The instance's private IP address.

        • PublicDns — (String)

          The instance public DNS name.

        • PublicIp — (String)

          The instance public IP address.

        • RegisteredBy — (String)

          For registered instances, who performed the registration.

        • ReportedAgentVersion — (String)

          The instance's reported OpsWorks Stacks agent version.

        • ReportedOs — (map)

          For registered instances, the reported operating system.

          • Family — (String)

            The operating system family.

          • Name — (String)

            The operating system name.

          • Version — (String)

            The operating system version.

        • RootDeviceType — (String)

          The instance's root device type. For more information, see Storage for the Root Device.

          Possible values include:
          • "ebs"
          • "instance-store"
        • RootDeviceVolumeId — (String)

          The root device volume ID.

        • SecurityGroupIds — (Array<String>)

          An array containing the instance security group IDs.

        • SshHostDsaKeyFingerprint — (String)

          The SSH key's Deep Security Agent (DSA) fingerprint.

        • SshHostRsaKeyFingerprint — (String)

          The SSH key's RSA fingerprint.

        • SshKeyName — (String)

          The instance's Amazon EC2 key-pair name.

        • StackId — (String)

          The stack ID.

        • Status — (String)

          The instance status:

          • booting

          • connection_lost

          • online

          • pending

          • rebooting

          • requested

          • running_setup

          • setup_failed

          • shutting_down

          • start_failed

          • stop_failed

          • stopped

          • stopping

          • terminated

          • terminating

        • SubnetId — (String)

          The instance's subnet ID; applicable only if the stack is running in a VPC.

        • Tenancy — (String)

          The instance's tenancy option, such as dedicated or host.

        • VirtualizationType — (String)

          The instance's virtualization type: paravirtual or hvm.

          Possible values include:
          • "paravirtual"
          • "hvm"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

opsworks.waitFor('instanceTerminated', params = {}, [callback]) ⇒ AWS.Request

Waits for the instanceTerminated state by periodically calling the underlying OpsWorks.describeInstances() operation every 15 seconds (at most 40 times).

Examples:

Waiting for the instanceTerminated state

var params = {
  // ... input parameters ...
};
opsworks.waitFor('instanceTerminated', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • StackId — (String)

      A stack ID. If you use this parameter, DescribeInstances returns descriptions of the instances associated with the specified stack.

    • LayerId — (String)

      A layer ID. If you use this parameter, DescribeInstances returns descriptions of the instances associated with the specified layer.

    • InstanceIds — (Array<String>)

      An array of instance IDs to be described. If you use this parameter, DescribeInstances returns a description of the specified instances. Otherwise, it returns a description of every instance.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Instances — (Array<map>)

        An array of Instance objects that describe the instances.

        • AgentVersion — (String)

          The agent version. This parameter is set to INHERIT if the instance inherits the default stack setting or to a a version number for a fixed agent version.

        • AmiId — (String)

          A custom AMI ID to be used to create the instance. For more information, see Instances

        • Architecture — (String)

          The instance architecture: "i386" or "x86_64".

          Possible values include:
          • "x86_64"
          • "i386"
        • Arn — (String)

          The instance's Amazon Resource Number (ARN).

        • AutoScalingType — (String)

          For load-based or time-based instances, the type.

          Possible values include:
          • "load"
          • "timer"
        • AvailabilityZone — (String)

          The instance Availability Zone. For more information, see Regions and Endpoints.

        • BlockDeviceMappings — (Array<map>)

          An array of BlockDeviceMapping objects that specify the instance's block device mappings.

          • DeviceName — (String)

            The device name that is exposed to the instance, such as /dev/sdh. For the root device, you can use the explicit device name or you can set this parameter to ROOT_DEVICE and OpsWorks Stacks will provide the correct device name.

          • NoDevice — (String)

            Suppresses the specified device included in the AMI's block device mapping.

          • VirtualName — (String)

            The virtual device name. For more information, see BlockDeviceMapping.

          • Ebs — (map)

            An EBSBlockDevice that defines how to configure an Amazon EBS volume when the instance is launched.

            • SnapshotId — (String)

              The snapshot ID.

            • Iops — (Integer)

              The number of I/O operations per second (IOPS) that the volume supports. For more information, see EbsBlockDevice.

            • VolumeSize — (Integer)

              The volume size, in GiB. For more information, see EbsBlockDevice.

            • VolumeType — (String)

              The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized hard disk drives (HDD), sc1 for Cold HDD,and standard for Magnetic volumes.

              If you specify the io1 volume type, you must also specify a value for the Iops attribute. The maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1. Amazon Web Services uses the default volume size (in GiB) specified in the AMI attributes to set IOPS to 50 x (volume size).

              Possible values include:
              • "gp2"
              • "io1"
              • "standard"
            • DeleteOnTermination — (Boolean)

              Whether the volume is deleted on instance termination.

        • CreatedAt — (String)

          The time that the instance was created.

        • EbsOptimized — (Boolean)

          Whether this is an Amazon EBS-optimized instance.

        • Ec2InstanceId — (String)

          The ID of the associated Amazon EC2 instance.

        • EcsClusterArn — (String)

          For container instances, the Amazon ECS cluster's ARN.

        • EcsContainerInstanceArn — (String)

          For container instances, the instance's ARN.

        • ElasticIp — (String)

          The instance Elastic IP address.

        • Hostname — (String)

          The instance host name. The following are character limits for instance host names.

          • Linux-based instances: 63 characters

          • Windows-based instances: 15 characters

        • InfrastructureClass — (String)

          For registered instances, the infrastructure class: ec2 or on-premises.

        • InstallUpdatesOnBoot — (Boolean)

          Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set to false, you must update instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

          Note: We strongly recommend using the default value of true to ensure that your instances have the latest security updates.
        • InstanceId — (String)

          The instance ID.

        • InstanceProfileArn — (String)

          The ARN of the instance's IAM profile. For more information about IAM ARNs, see Using Identifiers.

        • InstanceType — (String)

          The instance type, such as t2.micro.

        • LastServiceErrorId — (String)

          The ID of the last service error. For more information, call DescribeServiceErrors.

        • LayerIds — (Array<String>)

          An array containing the instance layer IDs.

        • Os — (String)

          The instance's operating system.

        • Platform — (String)

          The instance's platform.

        • PrivateDns — (String)

          The instance's private DNS name.

        • PrivateIp — (String)

          The instance's private IP address.

        • PublicDns — (String)

          The instance public DNS name.

        • PublicIp — (String)

          The instance public IP address.

        • RegisteredBy — (String)

          For registered instances, who performed the registration.

        • ReportedAgentVersion — (String)

          The instance's reported OpsWorks Stacks agent version.

        • ReportedOs — (map)

          For registered instances, the reported operating system.

          • Family — (String)

            The operating system family.

          • Name — (String)

            The operating system name.

          • Version — (String)

            The operating system version.

        • RootDeviceType — (String)

          The instance's root device type. For more information, see Storage for the Root Device.

          Possible values include:
          • "ebs"
          • "instance-store"
        • RootDeviceVolumeId — (String)

          The root device volume ID.

        • SecurityGroupIds — (Array<String>)

          An array containing the instance security group IDs.

        • SshHostDsaKeyFingerprint — (String)

          The SSH key's Deep Security Agent (DSA) fingerprint.

        • SshHostRsaKeyFingerprint — (String)

          The SSH key's RSA fingerprint.

        • SshKeyName — (String)

          The instance's Amazon EC2 key-pair name.

        • StackId — (String)

          The stack ID.

        • Status — (String)

          The instance status:

          • booting

          • connection_lost

          • online

          • pending

          • rebooting

          • requested

          • running_setup

          • setup_failed

          • shutting_down

          • start_failed

          • stop_failed

          • stopped

          • stopping

          • terminated

          • terminating

        • SubnetId — (String)

          The instance's subnet ID; applicable only if the stack is running in a VPC.

        • Tenancy — (String)

          The instance's tenancy option, such as dedicated or host.

        • VirtualizationType — (String)

          The instance's virtualization type: paravirtual or hvm.

          Possible values include:
          • "paravirtual"
          • "hvm"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also: