AWS OpsWorks

2015/07/30 - AWS OpsWorks - 3 new7 updated api methods

DeregisterEcsCluster (new) Link ¶

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

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

Request Syntax

client.deregister_ecs_cluster(
    EcsClusterArn='string'
)
type EcsClusterArn:

string

param EcsClusterArn:

[REQUIRED]

The cluster's ARN.

returns:

None

DescribeEcsClusters (new) Link ¶

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

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

Request Syntax

client.describe_ecs_clusters(
    EcsClusterArns=[
        'string',
    ],
    StackId='string',
    NextToken='string',
    MaxResults=123
)
type EcsClusterArns:

list

param EcsClusterArns:

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

  • (string) --

type StackId:

string

param StackId:

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

type NextToken:

string

param NextToken:

If the previous paginated request did not return all of the remaining results, the response object's NextToken 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.

type MaxResults:

integer

param MaxResults:

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.

rtype:

dict

returns:

Response Syntax

{
    'EcsClusters': [
        {
            'EcsClusterArn': 'string',
            'EcsClusterName': 'string',
            'StackId': 'string',
            'RegisteredAt': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Contains the response to a DescribeEcsClusters request.

    • EcsClusters (list) --

      A list of EcsCluster objects containing the cluster descriptions.

      • (dict) --

        Describes a registered Amazon ECS cluster.

        • 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.

RegisterEcsCluster (new) Link ¶

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.

Request Syntax

client.register_ecs_cluster(
    EcsClusterArn='string',
    StackId='string'
)
type EcsClusterArn:

string

param EcsClusterArn:

[REQUIRED]

The cluster's ARN.

type StackId:

string

param StackId:

[REQUIRED]

The stack ID.

rtype:

dict

returns:

Response Syntax

{
    'EcsClusterArn': 'string'
}

Response Structure

  • (dict) --

    Contains the response to a RegisterEcsCluster request.

    • EcsClusterArn (string) --

      The cluster's ARN.

CreateApp (updated) Link ¶
Changes (request)
{'Type': {'aws-flow-ruby'}}

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.

Request Syntax

client.create_app(
    StackId='string',
    Shortname='string',
    Name='string',
    Description='string',
    DataSources=[
        {
            'Type': 'string',
            'Arn': 'string',
            'DatabaseName': 'string'
        },
    ],
    Type='aws-flow-ruby'|'java'|'rails'|'php'|'nodejs'|'static'|'other',
    AppSource={
        'Type': 'git'|'svn'|'archive'|'s3',
        'Url': 'string',
        'Username': 'string',
        'Password': 'string',
        'SshKey': 'string',
        'Revision': 'string'
    },
    Domains=[
        'string',
    ],
    EnableSsl=True|False,
    SslConfiguration={
        'Certificate': 'string',
        'PrivateKey': 'string',
        'Chain': 'string'
    },
    Attributes={
        'string': 'string'
    },
    Environment=[
        {
            'Key': 'string',
            'Value': 'string',
            'Secure': True|False
        },
    ]
)
type StackId:

string

param StackId:

[REQUIRED]

The stack ID.

type Shortname:

string

param Shortname:

The app's short name.

type Name:

string

param Name:

[REQUIRED]

The app name.

type Description:

string

param Description:

A description of the app.

type DataSources:

list

param DataSources:

The app's data source.

  • (dict) --

    Describes an app's data source.

    • Type (string) --

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

    • Arn (string) --

      The data source's ARN.

    • DatabaseName (string) --

      The database name.

type Type:

string

param Type:

[REQUIRED]

The app type. Each supported type is associated with a particular layer. For example, PHP applications are associated with a PHP layer. AWS OpsWorks 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.

type AppSource:

dict

param AppSource:

A Source object that specifies the app repository.

  • Type (string) --

    The repository type.

  • Url (string) --

    The source URL.

  • 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 http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html.

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

  • SshKey (string) --

    In requests, the repository's SSH key.

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

  • Revision (string) --

    The application's version. AWS OpsWorks 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.

type Domains:

list

param Domains:

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

  • (string) --

type EnableSsl:

boolean

param EnableSsl:

Whether to enable SSL for the app.

type SslConfiguration:

dict

param SslConfiguration:

An SslConfiguration object with the SSL configuration.

  • Certificate (string) -- [REQUIRED]

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

  • PrivateKey (string) -- [REQUIRED]

    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.

type Attributes:

dict

param Attributes:

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

  • (string) --

    • (string) --

type Environment:

list

param Environment:

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 10 KB (10240 Bytes). 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 10KB)."

  • (dict) --

    Represents an app's environment variable.

    • Key (string) -- [REQUIRED]

      (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.

    • Value (string) -- [REQUIRED]

      (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 will be returned by the DescribeApps action. To conceal an environment variable's value, set Secure to true. DescribeApps then returns *****FILTERED***** instead of the actual value. The default value for Secure is false.

rtype:

dict

returns:

Response Syntax

{
    'AppId': 'string'
}

Response Structure

  • (dict) --

    Contains the response to a CreateApp request.

    • AppId (string) --

      The app ID.

CreateLayer (updated) Link ¶
Changes (request)
{'CustomJson': 'string', 'Type': {'aws-flow-ruby', 'ecs-cluster'}}

Creates a layer. For more information, see How to Create 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.

Request Syntax

client.create_layer(
    StackId='string',
    Type='aws-flow-ruby'|'ecs-cluster'|'java-app'|'lb'|'web'|'php-app'|'rails-app'|'nodejs-app'|'memcached'|'db-master'|'monitoring-master'|'custom',
    Name='string',
    Shortname='string',
    Attributes={
        'string': 'string'
    },
    CustomInstanceProfileArn='string',
    CustomJson='string',
    CustomSecurityGroupIds=[
        'string',
    ],
    Packages=[
        'string',
    ],
    VolumeConfigurations=[
        {
            'MountPoint': 'string',
            'RaidLevel': 123,
            'NumberOfDisks': 123,
            'Size': 123,
            'VolumeType': 'string',
            'Iops': 123
        },
    ],
    EnableAutoHealing=True|False,
    AutoAssignElasticIps=True|False,
    AutoAssignPublicIps=True|False,
    CustomRecipes={
        'Setup': [
            'string',
        ],
        'Configure': [
            'string',
        ],
        'Deploy': [
            'string',
        ],
        'Undeploy': [
            'string',
        ],
        'Shutdown': [
            'string',
        ]
    },
    InstallUpdatesOnBoot=True|False,
    UseEbsOptimizedInstances=True|False,
    LifecycleEventConfiguration={
        'Shutdown': {
            'ExecutionTimeout': 123,
            'DelayUntilElbConnectionsDrained': True|False
        }
    }
)
type StackId:

string

param StackId:

[REQUIRED]

The layer stack ID.

type Type:

string

param Type:

[REQUIRED]

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.

type Name:

string

param Name:

[REQUIRED]

The layer name, which is used by the console.

type Shortname:

string

param Shortname:

[REQUIRED]

For custom layers only, use this parameter to specify the layer's short name, which is used internally by AWS OpsWorks 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 200 characters, which are limited to the alphanumeric characters, '-', '_', and '.'.

The built-in layers' short names are defined by AWS OpsWorks. For more information, see the Layer Reference.

type Attributes:

dict

param Attributes:

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.

  • (string) --

    • (string) --

type CustomInstanceProfileArn:

string

param CustomInstanceProfileArn:

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

type CustomJson:

string

param CustomJson:

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.

type CustomSecurityGroupIds:

list

param CustomSecurityGroupIds:

An array containing the layer custom security group IDs.

  • (string) --

type Packages:

list

param Packages:

An array of Package objects that describes the layer packages.

  • (string) --

type VolumeConfigurations:

list

param VolumeConfigurations:

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

  • (dict) --

    Describes an Amazon EBS volume configuration.

    • MountPoint (string) -- [REQUIRED]

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

    • RaidLevel (integer) --

      The volume RAID level.

    • NumberOfDisks (integer) -- [REQUIRED]

      The number of disks in the volume.

    • Size (integer) -- [REQUIRED]

      The volume size.

    • VolumeType (string) --

      The volume type:

      • standard - Magnetic

      • io1 - Provisioned IOPS (SSD)

      • gp2 - General Purpose (SSD)

    • Iops (integer) --

      For PIOPS volumes, the IOPS per disk.

type EnableAutoHealing:

boolean

param EnableAutoHealing:

Whether to disable auto healing for the layer.

type AutoAssignElasticIps:

boolean

param AutoAssignElasticIps:

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

type AutoAssignPublicIps:

boolean

param AutoAssignPublicIps:

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.

type CustomRecipes:

dict

param CustomRecipes:

A LayerCustomRecipes object that specifies the layer custom recipes.

  • Setup (list) --

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

    • (string) --

  • Configure (list) --

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

    • (string) --

  • Deploy (list) --

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

    • (string) --

  • Undeploy (list) --

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

    • (string) --

  • Shutdown (list) --

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

    • (string) --

type InstallUpdatesOnBoot:

boolean

param InstallUpdatesOnBoot:

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.

type UseEbsOptimizedInstances:

boolean

param UseEbsOptimizedInstances:

Whether to use Amazon EBS-optimized instances.

type LifecycleEventConfiguration:

dict

param LifecycleEventConfiguration:

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 (dict) --

    A ShutdownEventConfiguration object that specifies the Shutdown event configuration.

    • ExecutionTimeout (integer) --

      The time, in seconds, that AWS OpsWorks will wait 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

rtype:

dict

returns:

Response Syntax

{
    'LayerId': 'string'
}

Response Structure

  • (dict) --

    Contains the response to a CreateLayer request.

    • LayerId (string) --

      The layer ID.

DescribeApps (updated) Link ¶
Changes (response)
{'Apps': {'Type': {'aws-flow-ruby'}}}

Requests a description of a specified set of apps.

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

Request Syntax

client.describe_apps(
    StackId='string',
    AppIds=[
        'string',
    ]
)
type StackId:

string

param StackId:

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

type AppIds:

list

param AppIds:

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.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'Apps': [
        {
            'AppId': 'string',
            'StackId': 'string',
            'Shortname': 'string',
            'Name': 'string',
            'Description': 'string',
            'DataSources': [
                {
                    'Type': 'string',
                    'Arn': 'string',
                    'DatabaseName': 'string'
                },
            ],
            'Type': 'aws-flow-ruby'|'java'|'rails'|'php'|'nodejs'|'static'|'other',
            'AppSource': {
                'Type': 'git'|'svn'|'archive'|'s3',
                'Url': 'string',
                'Username': 'string',
                'Password': 'string',
                'SshKey': 'string',
                'Revision': 'string'
            },
            'Domains': [
                'string',
            ],
            'EnableSsl': True|False,
            'SslConfiguration': {
                'Certificate': 'string',
                'PrivateKey': 'string',
                'Chain': 'string'
            },
            'Attributes': {
                'string': 'string'
            },
            'CreatedAt': 'string',
            'Environment': [
                {
                    'Key': 'string',
                    'Value': 'string',
                    'Secure': True|False
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    Contains the response to a DescribeApps request.

    • Apps (list) --

      An array of App objects that describe the specified apps.

      • (dict) --

        A description of the app.

        • 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 (list) --

          The app's data sources.

          • (dict) --

            Describes an app's data source.

            • Type (string) --

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

            • Arn (string) --

              The data source's ARN.

            • DatabaseName (string) --

              The database name.

        • Type (string) --

          The app type.

        • AppSource (dict) --

          A Source object that describes the app repository.

          • Type (string) --

            The repository type.

          • Url (string) --

            The source URL.

          • 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 http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html.

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

          • SshKey (string) --

            In requests, the repository's SSH key.

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

          • Revision (string) --

            The application's version. AWS OpsWorks 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 (list) --

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

          • (string) --

        • EnableSsl (boolean) --

          Whether to enable SSL for the app.

        • SslConfiguration (dict) --

          An SslConfiguration object with the SSL configuration.

          • Certificate (string) --

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

          • PrivateKey (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 (dict) --

          The stack attributes.

          • (string) --

            • (string) --

        • CreatedAt (string) --

          When the app was created.

        • Environment (list) --

          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.

          • (dict) --

            Represents an app's environment variable.

            • Key (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.

            • Value (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 will be returned by the DescribeApps action. To conceal an environment variable's value, set Secure to true. DescribeApps then returns *****FILTERED***** instead of the actual value. The default value for Secure is false.

DescribeInstances (updated) Link ¶
Changes (response)
{'Instances': {'EcsClusterArn': 'string', 'EcsContainerInstanceArn': 'string'}}

Requests a description of a set of instances.

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

Request Syntax

client.describe_instances(
    StackId='string',
    LayerId='string',
    InstanceIds=[
        'string',
    ]
)
type StackId:

string

param StackId:

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

type LayerId:

string

param LayerId:

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

type InstanceIds:

list

param InstanceIds:

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.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'Instances': [
        {
            'AgentVersion': 'string',
            'AmiId': 'string',
            'Architecture': 'x86_64'|'i386',
            'AutoScalingType': 'load'|'timer',
            'AvailabilityZone': 'string',
            'BlockDeviceMappings': [
                {
                    'DeviceName': 'string',
                    'NoDevice': 'string',
                    'VirtualName': 'string',
                    'Ebs': {
                        'SnapshotId': 'string',
                        'Iops': 123,
                        'VolumeSize': 123,
                        'VolumeType': 'gp2'|'io1'|'standard',
                        'DeleteOnTermination': True|False
                    }
                },
            ],
            'CreatedAt': 'string',
            'EbsOptimized': True|False,
            'Ec2InstanceId': 'string',
            'EcsClusterArn': 'string',
            'EcsContainerInstanceArn': 'string',
            'ElasticIp': 'string',
            'Hostname': 'string',
            'InfrastructureClass': 'string',
            'InstallUpdatesOnBoot': True|False,
            'InstanceId': 'string',
            'InstanceProfileArn': 'string',
            'InstanceType': 'string',
            'LastServiceErrorId': 'string',
            'LayerIds': [
                'string',
            ],
            'Os': 'string',
            'Platform': 'string',
            'PrivateDns': 'string',
            'PrivateIp': 'string',
            'PublicDns': 'string',
            'PublicIp': 'string',
            'RegisteredBy': 'string',
            'ReportedAgentVersion': 'string',
            'ReportedOs': {
                'Family': 'string',
                'Name': 'string',
                'Version': 'string'
            },
            'RootDeviceType': 'ebs'|'instance-store',
            'RootDeviceVolumeId': 'string',
            'SecurityGroupIds': [
                'string',
            ],
            'SshHostDsaKeyFingerprint': 'string',
            'SshHostRsaKeyFingerprint': 'string',
            'SshKeyName': 'string',
            'StackId': 'string',
            'Status': 'string',
            'SubnetId': 'string',
            'VirtualizationType': 'paravirtual'|'hvm'
        },
    ]
}

Response Structure

  • (dict) --

    Contains the response to a DescribeInstances request.

    • Instances (list) --

      An array of Instance objects that describe the instances.

      • (dict) --

        Describes an instance.

        • 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".

        • AutoScalingType (string) --

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

        • AvailabilityZone (string) --

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

        • BlockDeviceMappings (list) --

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

          • (dict) --

            Describes a block device mapping. This data type maps directly to the Amazon EC2 BlockDeviceMapping data type.

            • 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 AWS OpsWorks 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 (dict) --

              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, and standard for Magnetic volumes.

              • 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.

        • 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 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.

        • 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 (list) --

          An array containing the instance layer IDs.

          • (string) --

        • Os (string) --

          The instance's operating system.

        • Platform (string) --

          The instance's platform.

        • PrivateDns (string) --

          The 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 AWS OpsWorks agent version.

        • ReportedOs (dict) --

          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.

        • RootDeviceVolumeId (string) --

          The root device volume ID.

        • SecurityGroupIds (list) --

          An array containing the instance security group IDs.

          • (string) --

        • 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

          • stopped

          • stopping

          • terminated

          • terminating

        • SubnetId (string) --

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

        • VirtualizationType (string) --

          The instance's virtualization type: paravirtual or hvm.

DescribeLayers (updated) Link ¶
Changes (response)
{'Layers': {'CustomJson': 'string', 'Type': {'aws-flow-ruby', 'ecs-cluster'}}}

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

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

Request Syntax

client.describe_layers(
    StackId='string',
    LayerIds=[
        'string',
    ]
)
type StackId:

string

param StackId:

The stack ID.

type LayerIds:

list

param LayerIds:

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.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'Layers': [
        {
            'StackId': 'string',
            'LayerId': 'string',
            'Type': 'aws-flow-ruby'|'ecs-cluster'|'java-app'|'lb'|'web'|'php-app'|'rails-app'|'nodejs-app'|'memcached'|'db-master'|'monitoring-master'|'custom',
            'Name': 'string',
            'Shortname': 'string',
            'Attributes': {
                'string': 'string'
            },
            'CustomInstanceProfileArn': 'string',
            'CustomJson': 'string',
            'CustomSecurityGroupIds': [
                'string',
            ],
            'DefaultSecurityGroupNames': [
                'string',
            ],
            'Packages': [
                'string',
            ],
            'VolumeConfigurations': [
                {
                    'MountPoint': 'string',
                    'RaidLevel': 123,
                    'NumberOfDisks': 123,
                    'Size': 123,
                    'VolumeType': 'string',
                    'Iops': 123
                },
            ],
            'EnableAutoHealing': True|False,
            'AutoAssignElasticIps': True|False,
            'AutoAssignPublicIps': True|False,
            'DefaultRecipes': {
                'Setup': [
                    'string',
                ],
                'Configure': [
                    'string',
                ],
                'Deploy': [
                    'string',
                ],
                'Undeploy': [
                    'string',
                ],
                'Shutdown': [
                    'string',
                ]
            },
            'CustomRecipes': {
                'Setup': [
                    'string',
                ],
                'Configure': [
                    'string',
                ],
                'Deploy': [
                    'string',
                ],
                'Undeploy': [
                    'string',
                ],
                'Shutdown': [
                    'string',
                ]
            },
            'CreatedAt': 'string',
            'InstallUpdatesOnBoot': True|False,
            'UseEbsOptimizedInstances': True|False,
            'LifecycleEventConfiguration': {
                'Shutdown': {
                    'ExecutionTimeout': 123,
                    'DelayUntilElbConnectionsDrained': True|False
                }
            }
        },
    ]
}

Response Structure

  • (dict) --

    Contains the response to a DescribeLayers request.

    • Layers (list) --

      An array of Layer objects that describe the layers.

      • (dict) --

        Describes a layer.

        • StackId (string) --

          The layer stack ID.

        • LayerId (string) --

          The layer ID.

        • Type (string) --

          The layer type.

        • Name (string) --

          The layer name.

        • Shortname (string) --

          The layer short name.

        • Attributes (dict) --

          The layer attributes.

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

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

          • (string) --

            • (string) --

        • 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 (list) --

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

          • (string) --

        • DefaultSecurityGroupNames (list) --

          An array containing the layer's security group names.

          • (string) --

        • Packages (list) --

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

          • (string) --

        • VolumeConfigurations (list) --

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

          • (dict) --

            Describes an Amazon EBS volume configuration.

            • MountPoint (string) --

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

            • RaidLevel (integer) --

              The volume RAID level.

            • NumberOfDisks (integer) --

              The number of disks in the volume.

            • Size (integer) --

              The volume size.

            • VolumeType (string) --

              The volume type:

              • standard - Magnetic

              • io1 - Provisioned IOPS (SSD)

              • gp2 - General Purpose (SSD)

            • Iops (integer) --

              For PIOPS volumes, the IOPS per disk.

        • 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 (dict) --

          AWS OpsWorks supports five lifecycle events: setup, configuration, deploy, undeploy, and shutdown. For each layer, AWS OpsWorks runs a set of standard recipes for each event. In addition, you can provide custom recipes for any or all layers and events. AWS OpsWorks 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 (list) --

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

            • (string) --

          • Configure (list) --

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

            • (string) --

          • Deploy (list) --

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

            • (string) --

          • Undeploy (list) --

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

            • (string) --

          • Shutdown (list) --

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

            • (string) --

        • CustomRecipes (dict) --

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

          • Setup (list) --

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

            • (string) --

          • Configure (list) --

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

            • (string) --

          • Deploy (list) --

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

            • (string) --

          • Undeploy (list) --

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

            • (string) --

          • Shutdown (list) --

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

            • (string) --

        • 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.

        • UseEbsOptimizedInstances (boolean) --

          Whether the layer uses Amazon EBS-optimized instances.

        • LifecycleEventConfiguration (dict) --

          A LifeCycleEventConfiguration object that specifies the Shutdown event configuration.

          • Shutdown (dict) --

            A ShutdownEventConfiguration object that specifies the Shutdown event configuration.

            • ExecutionTimeout (integer) --

              The time, in seconds, that AWS OpsWorks will wait 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

UpdateApp (updated) Link ¶
Changes (request)
{'Type': {'aws-flow-ruby'}}

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.

Request Syntax

client.update_app(
    AppId='string',
    Name='string',
    Description='string',
    DataSources=[
        {
            'Type': 'string',
            'Arn': 'string',
            'DatabaseName': 'string'
        },
    ],
    Type='aws-flow-ruby'|'java'|'rails'|'php'|'nodejs'|'static'|'other',
    AppSource={
        'Type': 'git'|'svn'|'archive'|'s3',
        'Url': 'string',
        'Username': 'string',
        'Password': 'string',
        'SshKey': 'string',
        'Revision': 'string'
    },
    Domains=[
        'string',
    ],
    EnableSsl=True|False,
    SslConfiguration={
        'Certificate': 'string',
        'PrivateKey': 'string',
        'Chain': 'string'
    },
    Attributes={
        'string': 'string'
    },
    Environment=[
        {
            'Key': 'string',
            'Value': 'string',
            'Secure': True|False
        },
    ]
)
type AppId:

string

param AppId:

[REQUIRED]

The app ID.

type Name:

string

param Name:

The app name.

type Description:

string

param Description:

A description of the app.

type DataSources:

list

param DataSources:

The app's data sources.

  • (dict) --

    Describes an app's data source.

    • Type (string) --

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

    • Arn (string) --

      The data source's ARN.

    • DatabaseName (string) --

      The database name.

type Type:

string

param Type:

The app type.

type AppSource:

dict

param AppSource:

A Source object that specifies the app repository.

  • Type (string) --

    The repository type.

  • Url (string) --

    The source URL.

  • 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 http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html.

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

  • SshKey (string) --

    In requests, the repository's SSH key.

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

  • Revision (string) --

    The application's version. AWS OpsWorks 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.

type Domains:

list

param Domains:

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

  • (string) --

type EnableSsl:

boolean

param EnableSsl:

Whether SSL is enabled for the app.

type SslConfiguration:

dict

param SslConfiguration:

An SslConfiguration object with the SSL configuration.

  • Certificate (string) -- [REQUIRED]

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

  • PrivateKey (string) -- [REQUIRED]

    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.

type Attributes:

dict

param Attributes:

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

  • (string) --

    • (string) --

type Environment:

list

param Environment:

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 10 KB (10240 Bytes). 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 10KB)."

  • (dict) --

    Represents an app's environment variable.

    • Key (string) -- [REQUIRED]

      (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.

    • Value (string) -- [REQUIRED]

      (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 will be returned by the DescribeApps action. To conceal an environment variable's value, set Secure to true. DescribeApps then returns *****FILTERED***** instead of the actual value. The default value for Secure is false.

returns:

None

UpdateLayer (updated) Link ¶
Changes (request)
{'CustomJson': 'string'}

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.

Request Syntax

client.update_layer(
    LayerId='string',
    Name='string',
    Shortname='string',
    Attributes={
        'string': 'string'
    },
    CustomInstanceProfileArn='string',
    CustomJson='string',
    CustomSecurityGroupIds=[
        'string',
    ],
    Packages=[
        'string',
    ],
    VolumeConfigurations=[
        {
            'MountPoint': 'string',
            'RaidLevel': 123,
            'NumberOfDisks': 123,
            'Size': 123,
            'VolumeType': 'string',
            'Iops': 123
        },
    ],
    EnableAutoHealing=True|False,
    AutoAssignElasticIps=True|False,
    AutoAssignPublicIps=True|False,
    CustomRecipes={
        'Setup': [
            'string',
        ],
        'Configure': [
            'string',
        ],
        'Deploy': [
            'string',
        ],
        'Undeploy': [
            'string',
        ],
        'Shutdown': [
            'string',
        ]
    },
    InstallUpdatesOnBoot=True|False,
    UseEbsOptimizedInstances=True|False,
    LifecycleEventConfiguration={
        'Shutdown': {
            'ExecutionTimeout': 123,
            'DelayUntilElbConnectionsDrained': True|False
        }
    }
)
type LayerId:

string

param LayerId:

[REQUIRED]

The layer ID.

type Name:

string

param Name:

The layer name, which is used by the console.

type Shortname:

string

param Shortname:

For custom layers only, use this parameter to specify the layer's short name, which is used internally by AWS OpsWorksand 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 200 characters and must be in the following format: /A[a-z0-9-_.]+Z/.

The built-in layers' short names are defined by AWS OpsWorks. For more information, see the Layer Reference

type Attributes:

dict

param Attributes:

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

  • (string) --

    • (string) --

type CustomInstanceProfileArn:

string

param CustomInstanceProfileArn:

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.

type CustomJson:

string

param CustomJson:

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.

type CustomSecurityGroupIds:

list

param CustomSecurityGroupIds:

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

  • (string) --

type Packages:

list

param Packages:

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

  • (string) --

type VolumeConfigurations:

list

param VolumeConfigurations:

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

  • (dict) --

    Describes an Amazon EBS volume configuration.

    • MountPoint (string) -- [REQUIRED]

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

    • RaidLevel (integer) --

      The volume RAID level.

    • NumberOfDisks (integer) -- [REQUIRED]

      The number of disks in the volume.

    • Size (integer) -- [REQUIRED]

      The volume size.

    • VolumeType (string) --

      The volume type:

      • standard - Magnetic

      • io1 - Provisioned IOPS (SSD)

      • gp2 - General Purpose (SSD)

    • Iops (integer) --

      For PIOPS volumes, the IOPS per disk.

type EnableAutoHealing:

boolean

param EnableAutoHealing:

Whether to disable auto healing for the layer.

type AutoAssignElasticIps:

boolean

param AutoAssignElasticIps:

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

type AutoAssignPublicIps:

boolean

param AutoAssignPublicIps:

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.

type CustomRecipes:

dict

param CustomRecipes:

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

  • Setup (list) --

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

    • (string) --

  • Configure (list) --

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

    • (string) --

  • Deploy (list) --

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

    • (string) --

  • Undeploy (list) --

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

    • (string) --

  • Shutdown (list) --

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

    • (string) --

type InstallUpdatesOnBoot:

boolean

param InstallUpdatesOnBoot:

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.

type UseEbsOptimizedInstances:

boolean

param UseEbsOptimizedInstances:

Whether to use Amazon EBS-optimized instances.

type LifecycleEventConfiguration:

dict

param LifecycleEventConfiguration:
  • Shutdown (dict) --

    A ShutdownEventConfiguration object that specifies the Shutdown event configuration.

    • ExecutionTimeout (integer) --

      The time, in seconds, that AWS OpsWorks will wait 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:

None