SDK for PHP 3.x

Client: Aws\OpsWorks\OpsWorksClient
Service ID: opsworks
Version: 2013-02-18

This page describes the parameters and results for the operations of the AWS OpsWorks (2013-02-18), and shows how to use the Aws\OpsWorks\OpsWorksClient object to call the described operations. This documentation is specific to the 2013-02-18 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

AssignInstance ( array $params = [] )
Assign a registered instance to a layer.
AssignVolume ( array $params = [] )
Assigns one of the stack's registered Amazon EBS volumes to a specified instance.
AssociateElasticIp ( array $params = [] )
Associates one of the stack's registered Elastic IP addresses with a specified instance.
AttachElasticLoadBalancer ( array $params = [] )
Attaches an Elastic Load Balancing load balancer to a specified layer.
CloneStack ( array $params = [] )
Creates a clone of a specified stack.
CreateApp ( array $params = [] )
Creates an app for a specified stack.
CreateDeployment ( array $params = [] )
Runs deployment or stack commands.
CreateInstance ( array $params = [] )
Creates an instance in a specified stack.
CreateLayer ( array $params = [] )
Creates a layer.
CreateStack ( array $params = [] )
Creates a new stack.
CreateUserProfile ( array $params = [] )
Creates a new user profile.
DeleteApp ( array $params = [] )
Deletes a specified app.
DeleteInstance ( array $params = [] )
Deletes a specified instance, which terminates the associated Amazon EC2 instance.
DeleteLayer ( array $params = [] )
Deletes a specified layer.
DeleteStack ( array $params = [] )
Deletes a specified stack.
DeleteUserProfile ( array $params = [] )
Deletes a user profile.
DeregisterEcsCluster ( array $params = [] )
Deregisters a specified Amazon ECS cluster from a stack.
DeregisterElasticIp ( array $params = [] )
Deregisters a specified Elastic IP address.
DeregisterInstance ( array $params = [] )
Deregister an instance from OpsWorks Stacks.
DeregisterRdsDbInstance ( array $params = [] )
Deregisters an Amazon RDS instance.
DeregisterVolume ( array $params = [] )
Deregisters an Amazon EBS volume.
DescribeAgentVersions ( array $params = [] )
Describes the available OpsWorks Stacks agent versions.
DescribeApps ( array $params = [] )
Requests a description of a specified set of apps.
DescribeCommands ( array $params = [] )
Describes the results of specified commands.
DescribeDeployments ( array $params = [] )
Requests a description of a specified set of deployments.
DescribeEcsClusters ( array $params = [] )
Describes Amazon ECS clusters that are registered with a stack.
DescribeElasticIps ( array $params = [] )
Describes Elastic IP addresses.
DescribeElasticLoadBalancers ( array $params = [] )
Describes a stack's Elastic Load Balancing instances.
DescribeInstances ( array $params = [] )
Requests a description of a set of instances.
DescribeLayers ( array $params = [] )
Requests a description of one or more layers in a specified stack.
DescribeLoadBasedAutoScaling ( array $params = [] )
Describes load-based auto scaling configurations for specified layers.
DescribeMyUserProfile ( array $params = [] )
Describes a user's SSH information.
DescribeOperatingSystems ( array $params = [] )
Describes the operating systems that are supported by OpsWorks Stacks.
DescribePermissions ( array $params = [] )
Describes the permissions for a specified stack.
DescribeRaidArrays ( array $params = [] )
Describe an instance's RAID arrays.
DescribeRdsDbInstances ( array $params = [] )
Describes Amazon RDS instances.
DescribeServiceErrors ( array $params = [] )
Describes OpsWorks Stacks service errors.
DescribeStackProvisioningParameters ( array $params = [] )
Requests a description of a stack's provisioning parameters.
DescribeStackSummary ( array $params = [] )
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.
DescribeStacks ( array $params = [] )
Requests a description of one or more stacks.
DescribeTimeBasedAutoScaling ( array $params = [] )
Describes time-based auto scaling configurations for specified instances.
DescribeUserProfiles ( array $params = [] )
Describe specified users.
DescribeVolumes ( array $params = [] )
Describes an instance's Amazon EBS volumes.
DetachElasticLoadBalancer ( array $params = [] )
Detaches a specified Elastic Load Balancing instance from its layer.
DisassociateElasticIp ( array $params = [] )
Disassociates an Elastic IP address from its instance.
GetHostnameSuggestion ( array $params = [] )
Gets a generated host name for the specified layer, based on the current host name theme.
GrantAccess ( array $params = [] )
This action can be used only with Windows stacks.
ListTags ( array $params = [] )
Returns a list of tags that are applied to the specified stack or layer.
RebootInstance ( array $params = [] )
Reboots a specified instance.
RegisterEcsCluster ( array $params = [] )
Registers a specified Amazon ECS cluster with a stack.
RegisterElasticIp ( array $params = [] )
Registers an Elastic IP address with a specified stack.
RegisterInstance ( array $params = [] )
Registers instances that were created outside of OpsWorks Stacks with a specified stack.
RegisterRdsDbInstance ( array $params = [] )
Registers an Amazon RDS instance with a stack.
RegisterVolume ( array $params = [] )
Registers an Amazon EBS volume with a specified stack.
SetLoadBasedAutoScaling ( array $params = [] )
Specify the load-based auto scaling configuration for a specified layer.
SetPermission ( array $params = [] )
Specifies a user's permissions.
SetTimeBasedAutoScaling ( array $params = [] )
Specify the time-based auto scaling configuration for a specified instance.
StartInstance ( array $params = [] )
Starts a specified instance.
StartStack ( array $params = [] )
Starts a stack's instances.
StopInstance ( array $params = [] )
Stops a specified instance.
StopStack ( array $params = [] )
Stops a specified stack.
TagResource ( array $params = [] )
Apply cost-allocation tags to a specified stack or layer in OpsWorks Stacks.
UnassignInstance ( array $params = [] )
Unassigns a registered instance from all layers that are using the instance.
UnassignVolume ( array $params = [] )
Unassigns an assigned Amazon EBS volume.
UntagResource ( array $params = [] )
Removes tags from a specified stack or layer.
UpdateApp ( array $params = [] )
Updates a specified app.
UpdateElasticIp ( array $params = [] )
Updates a registered Elastic IP address's name.
UpdateInstance ( array $params = [] )
Updates a specified instance.
UpdateLayer ( array $params = [] )
Updates a specified layer.
UpdateMyUserProfile ( array $params = [] )
Updates a user's SSH public key.
UpdateRdsDbInstance ( array $params = [] )
Updates an Amazon RDS instance.
UpdateStack ( array $params = [] )
Updates a specified stack.
UpdateUserProfile ( array $params = [] )
Updates a specified user profile.
UpdateVolume ( array $params = [] )
Updates an Amazon EBS volume's name or mount point.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

DescribeApps
DescribeCommands
DescribeDeployments
DescribeEcsClusters
DescribeElasticIps
DescribeElasticLoadBalancers
DescribeInstances
DescribeLayers
DescribeLoadBasedAutoScaling
DescribePermissions
DescribeRaidArrays
DescribeServiceErrors
DescribeStacks
DescribeTimeBasedAutoScaling
DescribeUserProfiles
DescribeVolumes

Waiters

Waiters allow you to poll a resource until it enters into a desired state. A waiter has a name used to describe what it does, and is associated with an API operation. When creating a waiter, you can provide the API operation parameters associated with the corresponding operation. Waiters can be accessed using the getWaiter($waiterName, $operationParameters) method of a client object. This client supports the following waiters:

Waiter name API Operation Delay Max Attempts
AppExists DescribeApps 1 40
DeploymentSuccessful DescribeDeployments 15 40
InstanceOnline DescribeInstances 15 40
InstanceRegistered DescribeInstances 15 40
InstanceStopped DescribeInstances 15 40
InstanceTerminated DescribeInstances 15 40

Operations

AssignInstance

$result = $client->assignInstance([/* ... */]);
$promise = $client->assignInstanceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->assignInstance([
    'InstanceId' => '<string>', // REQUIRED
    'LayerIds' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
InstanceId
Required: Yes
Type: string

The instance ID.

LayerIds
Required: Yes
Type: Array of strings

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

AssignVolume

$result = $client->assignVolume([/* ... */]);
$promise = $client->assignVolumeAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->assignVolume([
    'InstanceId' => '<string>',
    'VolumeId' => '<string>', // REQUIRED
]);

Parameter Details

Members
InstanceId
Type: string

The instance ID.

VolumeId
Required: Yes
Type: string

The volume ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

AssociateElasticIp

$result = $client->associateElasticIp([/* ... */]);
$promise = $client->associateElasticIpAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->associateElasticIp([
    'ElasticIp' => '<string>', // REQUIRED
    'InstanceId' => '<string>',
]);

Parameter Details

Members
ElasticIp
Required: Yes
Type: string

The Elastic IP address.

InstanceId
Type: string

The instance ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

AttachElasticLoadBalancer

$result = $client->attachElasticLoadBalancer([/* ... */]);
$promise = $client->attachElasticLoadBalancerAsync([/* ... */]);

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.

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.

Parameter Syntax

$result = $client->attachElasticLoadBalancer([
    'ElasticLoadBalancerName' => '<string>', // REQUIRED
    'LayerId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ElasticLoadBalancerName
Required: Yes
Type: string

The Elastic Load Balancing instance's name.

LayerId
Required: Yes
Type: string

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

CloneStack

$result = $client->cloneStack([/* ... */]);
$promise = $client->cloneStackAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->cloneStack([
    'AgentVersion' => '<string>',
    'Attributes' => ['<string>', ...],
    'ChefConfiguration' => [
        'BerkshelfVersion' => '<string>',
        'ManageBerkshelf' => true || false,
    ],
    'CloneAppIds' => ['<string>', ...],
    'ClonePermissions' => true || false,
    'ConfigurationManager' => [
        'Name' => '<string>',
        'Version' => '<string>',
    ],
    'CustomCookbooksSource' => [
        'Password' => '<string>',
        'Revision' => '<string>',
        'SshKey' => '<string>',
        'Type' => 'git|svn|archive|s3',
        'Url' => '<string>',
        'Username' => '<string>',
    ],
    'CustomJson' => '<string>',
    'DefaultAvailabilityZone' => '<string>',
    'DefaultInstanceProfileArn' => '<string>',
    'DefaultOs' => '<string>',
    'DefaultRootDeviceType' => 'ebs|instance-store',
    'DefaultSshKeyName' => '<string>',
    'DefaultSubnetId' => '<string>',
    'HostnameTheme' => '<string>',
    'Name' => '<string>',
    'Region' => '<string>',
    'ServiceRoleArn' => '<string>', // REQUIRED
    'SourceStackId' => '<string>', // REQUIRED
    'UseCustomCookbooks' => true || false,
    'UseOpsworksSecurityGroups' => true || false,
    'VpcId' => '<string>',
]);

Parameter Details

Members
AgentVersion
Type: 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.

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

Attributes
Type: Associative array of custom strings keys (StackAttributesKeys) to strings

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

ChefConfiguration
Type: ChefConfiguration structure

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.

CloneAppIds
Type: Array of strings

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

ClonePermissions
Type: boolean

Whether to clone the source stack's permissions.

ConfigurationManager
Type: StackConfigurationManager structure

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.

CustomCookbooksSource
Type: Source structure

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

CustomJson
Type: 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

DefaultAvailabilityZone
Type: 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.

DefaultInstanceProfileArn
Type: 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
Type: 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.

You can specify a different Linux operating system for the cloned stack, but you cannot change from Linux to Windows or Windows to Linux.

DefaultRootDeviceType
Type: 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.

DefaultSshKeyName
Type: 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.

DefaultSubnetId
Type: 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.

HostnameTheme
Type: 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.

Name
Type: string

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

Region
Type: 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.

ServiceRoleArn
Required: Yes
Type: 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.

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.

SourceStackId
Required: Yes
Type: string

The source stack ID.

UseCustomCookbooks
Type: boolean

Whether to use custom cookbooks.

UseOpsworksSecurityGroups
Type: 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.

VpcId
Type: 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.

Result Syntax

[
    'StackId' => '<string>',
]

Result Details

Members
StackId
Type: string

The cloned stack ID.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

CreateApp

$result = $client->createApp([/* ... */]);
$promise = $client->createAppAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createApp([
    'AppSource' => [
        'Password' => '<string>',
        'Revision' => '<string>',
        'SshKey' => '<string>',
        'Type' => 'git|svn|archive|s3',
        'Url' => '<string>',
        'Username' => '<string>',
    ],
    'Attributes' => ['<string>', ...],
    'DataSources' => [
        [
            'Arn' => '<string>',
            'DatabaseName' => '<string>',
            'Type' => '<string>',
        ],
        // ...
    ],
    'Description' => '<string>',
    'Domains' => ['<string>', ...],
    'EnableSsl' => true || false,
    'Environment' => [
        [
            'Key' => '<string>', // REQUIRED
            'Secure' => true || false,
            'Value' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'Name' => '<string>', // REQUIRED
    'Shortname' => '<string>',
    'SslConfiguration' => [
        'Certificate' => '<string>', // REQUIRED
        'Chain' => '<string>',
        'PrivateKey' => '<string>', // REQUIRED
    ],
    'StackId' => '<string>', // REQUIRED
    'Type' => 'aws-flow-ruby|java|rails|php|nodejs|static|other', // REQUIRED
]);

Parameter Details

Members
AppSource
Type: Source structure

A Source object that specifies the app repository.

Attributes
Type: Associative array of custom strings keys (AppAttributesKeys) to strings

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

DataSources
Type: Array of DataSource structures

The app's data source.

Description
Type: string

A description of the app.

Domains
Type: Array of strings

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

EnableSsl
Type: boolean

Whether to enable SSL for the app.

Environment
Type: Array of EnvironmentVariable structures

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

If you have specified one or more environment variables, you cannot modify the stack's Chef version.

Name
Required: Yes
Type: string

The app name.

Shortname
Type: string

The app's short name.

SslConfiguration
Type: SslConfiguration structure

An SslConfiguration object with the SSL configuration.

StackId
Required: Yes
Type: string

The stack ID.

Type
Required: Yes
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.

Result Syntax

[
    'AppId' => '<string>',
]

Result Details

Members
AppId
Type: string

The app ID.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

CreateDeployment

$result = $client->createDeployment([/* ... */]);
$promise = $client->createDeploymentAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createDeployment([
    'AppId' => '<string>',
    'Command' => [ // REQUIRED
        'Args' => [
            '<String>' => ['<string>', ...],
            // ...
        ],
        'Name' => 'install_dependencies|update_dependencies|update_custom_cookbooks|execute_recipes|configure|setup|deploy|rollback|start|stop|restart|undeploy', // REQUIRED
    ],
    'Comment' => '<string>',
    'CustomJson' => '<string>',
    'InstanceIds' => ['<string>', ...],
    'LayerIds' => ['<string>', ...],
    'StackId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AppId
Type: string

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

Command
Required: Yes
Type: DeploymentCommand structure

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

Comment
Type: string

A user-defined comment.

CustomJson
Type: 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.

InstanceIds
Type: Array of strings

The instance IDs for the deployment targets.

LayerIds
Type: Array of strings

The layer IDs for the deployment targets.

StackId
Required: Yes
Type: string

The stack ID.

Result Syntax

[
    'DeploymentId' => '<string>',
]

Result Details

Members
DeploymentId
Type: string

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

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

CreateInstance

$result = $client->createInstance([/* ... */]);
$promise = $client->createInstanceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createInstance([
    'AgentVersion' => '<string>',
    'AmiId' => '<string>',
    'Architecture' => 'x86_64|i386',
    'AutoScalingType' => 'load|timer',
    'AvailabilityZone' => '<string>',
    'BlockDeviceMappings' => [
        [
            'DeviceName' => '<string>',
            'Ebs' => [
                'DeleteOnTermination' => true || false,
                'Iops' => <integer>,
                'SnapshotId' => '<string>',
                'VolumeSize' => <integer>,
                'VolumeType' => 'gp2|io1|standard',
            ],
            'NoDevice' => '<string>',
            'VirtualName' => '<string>',
        ],
        // ...
    ],
    'EbsOptimized' => true || false,
    'Hostname' => '<string>',
    'InstallUpdatesOnBoot' => true || false,
    'InstanceType' => '<string>', // REQUIRED
    'LayerIds' => ['<string>', ...], // REQUIRED
    'Os' => '<string>',
    'RootDeviceType' => 'ebs|instance-store',
    'SshKeyName' => '<string>',
    'StackId' => '<string>', // REQUIRED
    'SubnetId' => '<string>',
    'Tenancy' => '<string>',
    'VirtualizationType' => '<string>',
]);

Parameter Details

Members
AgentVersion
Type: 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.

AmiId
Type: 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.

If you specify a custom AMI, you must set Os to Custom.

Architecture
Type: 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.

AutoScalingType
Type: string

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

AvailabilityZone
Type: string

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

BlockDeviceMappings
Type: Array of BlockDeviceMapping structures

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.

EbsOptimized
Type: boolean

Whether to create an Amazon EBS-optimized instance.

Hostname
Type: string

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

  • Linux-based instances: 63 characters

  • Windows-based instances: 15 characters

InstallUpdatesOnBoot
Type: 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.

We strongly recommend using the default value of true to ensure that your instances have the latest security updates.

InstanceType
Required: Yes
Type: 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.

LayerIds
Required: Yes
Type: Array of strings

An array that contains the instance's layer IDs.

Os
Type: 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.

RootDeviceType
Type: string

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

SshKeyName
Type: string

The instance's Amazon EC2 key-pair name.

StackId
Required: Yes
Type: string

The stack ID.

SubnetId
Type: 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.

Tenancy
Type: 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.

VirtualizationType
Type: string

The instance's virtualization type, paravirtual or hvm.

Result Syntax

[
    'InstanceId' => '<string>',
]

Result Details

Members
InstanceId
Type: string

The instance ID.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

CreateLayer

$result = $client->createLayer([/* ... */]);
$promise = $client->createLayerAsync([/* ... */]);

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

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

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

Parameter Syntax

$result = $client->createLayer([
    'Attributes' => ['<string>', ...],
    'AutoAssignElasticIps' => true || false,
    'AutoAssignPublicIps' => true || false,
    'CloudWatchLogsConfiguration' => [
        'Enabled' => true || false,
        'LogStreams' => [
            [
                'BatchCount' => <integer>,
                'BatchSize' => <integer>,
                'BufferDuration' => <integer>,
                'DatetimeFormat' => '<string>',
                '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>',
                'FileFingerprintLines' => '<string>',
                'InitialPosition' => 'start_of_file|end_of_file',
                'LogGroupName' => '<string>',
                'MultiLineStartPattern' => '<string>',
                'TimeZone' => 'LOCAL|UTC',
            ],
            // ...
        ],
    ],
    'CustomInstanceProfileArn' => '<string>',
    'CustomJson' => '<string>',
    'CustomRecipes' => [
        'Configure' => ['<string>', ...],
        'Deploy' => ['<string>', ...],
        'Setup' => ['<string>', ...],
        'Shutdown' => ['<string>', ...],
        'Undeploy' => ['<string>', ...],
    ],
    'CustomSecurityGroupIds' => ['<string>', ...],
    'EnableAutoHealing' => true || false,
    'InstallUpdatesOnBoot' => true || false,
    'LifecycleEventConfiguration' => [
        'Shutdown' => [
            'DelayUntilElbConnectionsDrained' => true || false,
            'ExecutionTimeout' => <integer>,
        ],
    ],
    'Name' => '<string>', // REQUIRED
    'Packages' => ['<string>', ...],
    'Shortname' => '<string>', // REQUIRED
    'StackId' => '<string>', // REQUIRED
    'Type' => 'aws-flow-ruby|ecs-cluster|java-app|lb|web|php-app|rails-app|nodejs-app|memcached|db-master|monitoring-master|custom', // REQUIRED
    'UseEbsOptimizedInstances' => true || false,
    'VolumeConfigurations' => [
        [
            'Encrypted' => true || false,
            'Iops' => <integer>,
            'MountPoint' => '<string>', // REQUIRED
            'NumberOfDisks' => <integer>, // REQUIRED
            'RaidLevel' => <integer>,
            'Size' => <integer>, // REQUIRED
            'VolumeType' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
Attributes
Type: Associative array of custom strings keys (LayerAttributesKeys) to strings

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.

AutoAssignElasticIps
Type: boolean

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

AutoAssignPublicIps
Type: 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.

CloudWatchLogsConfiguration
Type: CloudWatchLogsConfiguration structure

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

CustomInstanceProfileArn
Type: 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
Type: 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.

CustomRecipes
Type: Recipes structure

A LayerCustomRecipes object that specifies the layer custom recipes.

CustomSecurityGroupIds
Type: Array of strings

An array containing the layer custom security group IDs.

EnableAutoHealing
Type: boolean

Whether to disable auto healing for the layer.

InstallUpdatesOnBoot
Type: 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.

To ensure that your instances have the latest security updates, we strongly recommend using the default value of true.

LifecycleEventConfiguration
Type: LifecycleEventConfiguration structure

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.

Name
Required: Yes
Type: string

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

Packages
Type: Array of strings

An array of Package objects that describes the layer packages.

Shortname
Required: Yes
Type: 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.

StackId
Required: Yes
Type: string

The layer stack ID.

Type
Required: Yes
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.

UseEbsOptimizedInstances
Type: boolean

Whether to use Amazon EBS-optimized instances.

VolumeConfigurations
Type: Array of VolumeConfiguration structures

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

Result Syntax

[
    'LayerId' => '<string>',
]

Result Details

Members
LayerId
Type: string

The layer ID.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

CreateStack

$result = $client->createStack([/* ... */]);
$promise = $client->createStackAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createStack([
    'AgentVersion' => '<string>',
    'Attributes' => ['<string>', ...],
    'ChefConfiguration' => [
        'BerkshelfVersion' => '<string>',
        'ManageBerkshelf' => true || false,
    ],
    'ConfigurationManager' => [
        'Name' => '<string>',
        'Version' => '<string>',
    ],
    'CustomCookbooksSource' => [
        'Password' => '<string>',
        'Revision' => '<string>',
        'SshKey' => '<string>',
        'Type' => 'git|svn|archive|s3',
        'Url' => '<string>',
        'Username' => '<string>',
    ],
    'CustomJson' => '<string>',
    'DefaultAvailabilityZone' => '<string>',
    'DefaultInstanceProfileArn' => '<string>', // REQUIRED
    'DefaultOs' => '<string>',
    'DefaultRootDeviceType' => 'ebs|instance-store',
    'DefaultSshKeyName' => '<string>',
    'DefaultSubnetId' => '<string>',
    'HostnameTheme' => '<string>',
    'Name' => '<string>', // REQUIRED
    'Region' => '<string>', // REQUIRED
    'ServiceRoleArn' => '<string>', // REQUIRED
    'UseCustomCookbooks' => true || false,
    'UseOpsworksSecurityGroups' => true || false,
    'VpcId' => '<string>',
]);

Parameter Details

Members
AgentVersion
Type: 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.

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

Attributes
Type: Associative array of custom strings keys (StackAttributesKeys) to strings

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

ChefConfiguration
Type: ChefConfiguration structure

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.

ConfigurationManager
Type: StackConfigurationManager structure

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.

CustomCookbooksSource
Type: Source structure

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

CustomJson
Type: 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.

DefaultAvailabilityZone
Type: 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.

DefaultInstanceProfileArn
Required: Yes
Type: 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
Type: 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.

DefaultRootDeviceType
Type: 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.

DefaultSshKeyName
Type: 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.

DefaultSubnetId
Type: 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.

HostnameTheme
Type: 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.

Name
Required: Yes
Type: string

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

Region
Required: Yes
Type: 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.

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.

ServiceRoleArn
Required: Yes
Type: 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.

UseCustomCookbooks
Type: boolean

Whether the stack uses custom cookbooks.

UseOpsworksSecurityGroups
Type: 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.

VpcId
Type: 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.

Result Syntax

[
    'StackId' => '<string>',
]

Result Details

Members
StackId
Type: string

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

Errors

ValidationException:

Indicates that a request was not valid.

CreateUserProfile

$result = $client->createUserProfile([/* ... */]);
$promise = $client->createUserProfileAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createUserProfile([
    'AllowSelfManagement' => true || false,
    'IamUserArn' => '<string>', // REQUIRED
    'SshPublicKey' => '<string>',
    'SshUsername' => '<string>',
]);

Parameter Details

Members
AllowSelfManagement
Type: 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.

IamUserArn
Required: Yes
Type: string

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

SshPublicKey
Type: string

The user's public SSH key.

SshUsername
Type: 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.

Result Syntax

[
    'IamUserArn' => '<string>',
]

Result Details

Members
IamUserArn
Type: string

The user's IAM ARN.

Errors

ValidationException:

Indicates that a request was not valid.

DeleteApp

$result = $client->deleteApp([/* ... */]);
$promise = $client->deleteAppAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deleteApp([
    'AppId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AppId
Required: Yes
Type: string

The app ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DeleteInstance

$result = $client->deleteInstance([/* ... */]);
$promise = $client->deleteInstanceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deleteInstance([
    'DeleteElasticIp' => true || false,
    'DeleteVolumes' => true || false,
    'InstanceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
DeleteElasticIp
Type: boolean

Whether to delete the instance Elastic IP address.

DeleteVolumes
Type: boolean

Whether to delete the instance's Amazon EBS volumes.

InstanceId
Required: Yes
Type: string

The instance ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DeleteLayer

$result = $client->deleteLayer([/* ... */]);
$promise = $client->deleteLayerAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deleteLayer([
    'LayerId' => '<string>', // REQUIRED
]);

Parameter Details

Members
LayerId
Required: Yes
Type: string

The layer ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DeleteStack

$result = $client->deleteStack([/* ... */]);
$promise = $client->deleteStackAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deleteStack([
    'StackId' => '<string>', // REQUIRED
]);

Parameter Details

Members
StackId
Required: Yes
Type: string

The stack ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DeleteUserProfile

$result = $client->deleteUserProfile([/* ... */]);
$promise = $client->deleteUserProfileAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deleteUserProfile([
    'IamUserArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
IamUserArn
Required: Yes
Type: string

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DeregisterEcsCluster

$result = $client->deregisterEcsCluster([/* ... */]);
$promise = $client->deregisterEcsClusterAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deregisterEcsCluster([
    'EcsClusterArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
EcsClusterArn
Required: Yes
Type: string

The cluster's Amazon Resource Number (ARN).

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DeregisterElasticIp

$result = $client->deregisterElasticIp([/* ... */]);
$promise = $client->deregisterElasticIpAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deregisterElasticIp([
    'ElasticIp' => '<string>', // REQUIRED
]);

Parameter Details

Members
ElasticIp
Required: Yes
Type: string

The Elastic IP address.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DeregisterInstance

$result = $client->deregisterInstance([/* ... */]);
$promise = $client->deregisterInstanceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deregisterInstance([
    'InstanceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
InstanceId
Required: Yes
Type: string

The instance ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DeregisterRdsDbInstance

$result = $client->deregisterRdsDbInstance([/* ... */]);
$promise = $client->deregisterRdsDbInstanceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deregisterRdsDbInstance([
    'RdsDbInstanceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
RdsDbInstanceArn
Required: Yes
Type: string

The Amazon RDS instance's ARN.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DeregisterVolume

$result = $client->deregisterVolume([/* ... */]);
$promise = $client->deregisterVolumeAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deregisterVolume([
    'VolumeId' => '<string>', // REQUIRED
]);

Parameter Details

Members
VolumeId
Required: Yes
Type: 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.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeAgentVersions

$result = $client->describeAgentVersions([/* ... */]);
$promise = $client->describeAgentVersionsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->describeAgentVersions([
    'ConfigurationManager' => [
        'Name' => '<string>',
        'Version' => '<string>',
    ],
    'StackId' => '<string>',
]);

Parameter Details

Members
ConfigurationManager
Type: StackConfigurationManager structure

The configuration manager.

StackId
Type: string

The stack ID.

Result Syntax

[
    'AgentVersions' => [
        [
            'ConfigurationManager' => [
                'Name' => '<string>',
                'Version' => '<string>',
            ],
            'Version' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
AgentVersions
Type: Array of AgentVersion structures

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.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeApps

$result = $client->describeApps([/* ... */]);
$promise = $client->describeAppsAsync([/* ... */]);

Requests a description of a specified set of apps.

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.

Parameter Syntax

$result = $client->describeApps([
    'AppIds' => ['<string>', ...],
    'StackId' => '<string>',
]);

Parameter Details

Members
AppIds
Type: Array of strings

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.

StackId
Type: string

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

Result Syntax

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

Result Details

Members
Apps
Type: Array of App structures

An array of App objects that describe the specified apps.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeCommands

$result = $client->describeCommands([/* ... */]);
$promise = $client->describeCommandsAsync([/* ... */]);

Describes the results of specified commands.

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.

Parameter Syntax

$result = $client->describeCommands([
    'CommandIds' => ['<string>', ...],
    'DeploymentId' => '<string>',
    'InstanceId' => '<string>',
]);

Parameter Details

Members
CommandIds
Type: Array of strings

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.

DeploymentId
Type: string

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

InstanceId
Type: string

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

Result Syntax

[
    'Commands' => [
        [
            'AcknowledgedAt' => '<string>',
            'CommandId' => '<string>',
            'CompletedAt' => '<string>',
            'CreatedAt' => '<string>',
            'DeploymentId' => '<string>',
            'ExitCode' => <integer>,
            'InstanceId' => '<string>',
            'LogUrl' => '<string>',
            'Status' => '<string>',
            'Type' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Commands
Type: Array of Command structures

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

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeDeployments

$result = $client->describeDeployments([/* ... */]);
$promise = $client->describeDeploymentsAsync([/* ... */]);

Requests a description of a specified set of deployments.

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.

Parameter Syntax

$result = $client->describeDeployments([
    'AppId' => '<string>',
    'DeploymentIds' => ['<string>', ...],
    'StackId' => '<string>',
]);

Parameter Details

Members
AppId
Type: string

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

DeploymentIds
Type: Array of strings

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.

StackId
Type: string

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

Result Syntax

[
    'Deployments' => [
        [
            'AppId' => '<string>',
            'Command' => [
                'Args' => [
                    '<String>' => ['<string>', ...],
                    // ...
                ],
                'Name' => 'install_dependencies|update_dependencies|update_custom_cookbooks|execute_recipes|configure|setup|deploy|rollback|start|stop|restart|undeploy',
            ],
            'Comment' => '<string>',
            'CompletedAt' => '<string>',
            'CreatedAt' => '<string>',
            'CustomJson' => '<string>',
            'DeploymentId' => '<string>',
            'Duration' => <integer>,
            'IamUserArn' => '<string>',
            'InstanceIds' => ['<string>', ...],
            'StackId' => '<string>',
            'Status' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Deployments
Type: Array of Deployment structures

An array of Deployment objects that describe the deployments.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeEcsClusters

$result = $client->describeEcsClusters([/* ... */]);
$promise = $client->describeEcsClustersAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->describeEcsClusters([
    'EcsClusterArns' => ['<string>', ...],
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'StackId' => '<string>',
]);

Parameter Details

Members
EcsClusterArns
Type: Array of strings

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

MaxResults
Type: int

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.

NextToken
Type: 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.

StackId
Type: string

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

Result Syntax

[
    'EcsClusters' => [
        [
            'EcsClusterArn' => '<string>',
            'EcsClusterName' => '<string>',
            'RegisteredAt' => '<string>',
            'StackId' => '<string>',
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
EcsClusters
Type: Array of EcsCluster structures

A list of EcsCluster objects containing the cluster descriptions.

NextToken
Type: 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.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeElasticIps

$result = $client->describeElasticIps([/* ... */]);
$promise = $client->describeElasticIpsAsync([/* ... */]);

Describes Elastic IP addresses.

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.

Parameter Syntax

$result = $client->describeElasticIps([
    'InstanceId' => '<string>',
    'Ips' => ['<string>', ...],
    'StackId' => '<string>',
]);

Parameter Details

Members
InstanceId
Type: string

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

Ips
Type: Array of strings

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.

StackId
Type: 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.

Result Syntax

[
    'ElasticIps' => [
        [
            'Domain' => '<string>',
            'InstanceId' => '<string>',
            'Ip' => '<string>',
            'Name' => '<string>',
            'Region' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
ElasticIps
Type: Array of ElasticIp structures

An ElasticIps object that describes the specified Elastic IP addresses.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeElasticLoadBalancers

$result = $client->describeElasticLoadBalancers([/* ... */]);
$promise = $client->describeElasticLoadBalancersAsync([/* ... */]);

Describes a stack's Elastic Load Balancing instances.

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.

Parameter Syntax

$result = $client->describeElasticLoadBalancers([
    'LayerIds' => ['<string>', ...],
    'StackId' => '<string>',
]);

Parameter Details

Members
LayerIds
Type: Array of strings

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

StackId
Type: string

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

Result Syntax

[
    'ElasticLoadBalancers' => [
        [
            'AvailabilityZones' => ['<string>', ...],
            'DnsName' => '<string>',
            'Ec2InstanceIds' => ['<string>', ...],
            'ElasticLoadBalancerName' => '<string>',
            'LayerId' => '<string>',
            'Region' => '<string>',
            'StackId' => '<string>',
            'SubnetIds' => ['<string>', ...],
            'VpcId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
ElasticLoadBalancers
Type: Array of ElasticLoadBalancer structures

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

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeInstances

$result = $client->describeInstances([/* ... */]);
$promise = $client->describeInstancesAsync([/* ... */]);

Requests a description of a set of instances.

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.

Parameter Syntax

$result = $client->describeInstances([
    'InstanceIds' => ['<string>', ...],
    'LayerId' => '<string>',
    'StackId' => '<string>',
]);

Parameter Details

Members
InstanceIds
Type: Array of strings

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.

LayerId
Type: string

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

StackId
Type: string

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

Result Syntax

[
    'Instances' => [
        [
            'AgentVersion' => '<string>',
            'AmiId' => '<string>',
            'Architecture' => 'x86_64|i386',
            'Arn' => '<string>',
            'AutoScalingType' => 'load|timer',
            'AvailabilityZone' => '<string>',
            'BlockDeviceMappings' => [
                [
                    'DeviceName' => '<string>',
                    'Ebs' => [
                        'DeleteOnTermination' => true || false,
                        'Iops' => <integer>,
                        'SnapshotId' => '<string>',
                        'VolumeSize' => <integer>,
                        'VolumeType' => 'gp2|io1|standard',
                    ],
                    'NoDevice' => '<string>',
                    'VirtualName' => '<string>',
                ],
                // ...
            ],
            '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>',
            'Tenancy' => '<string>',
            'VirtualizationType' => 'paravirtual|hvm',
        ],
        // ...
    ],
]

Result Details

Members
Instances
Type: Array of Instance structures

An array of Instance objects that describe the instances.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeLayers

$result = $client->describeLayers([/* ... */]);
$promise = $client->describeLayersAsync([/* ... */]);

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

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.

Parameter Syntax

$result = $client->describeLayers([
    'LayerIds' => ['<string>', ...],
    'StackId' => '<string>',
]);

Parameter Details

Members
LayerIds
Type: Array of strings

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.

StackId
Type: string

The stack ID.

Result Syntax

[
    'Layers' => [
        [
            'Arn' => '<string>',
            'Attributes' => ['<string>', ...],
            'AutoAssignElasticIps' => true || false,
            'AutoAssignPublicIps' => true || false,
            'CloudWatchLogsConfiguration' => [
                'Enabled' => true || false,
                'LogStreams' => [
                    [
                        'BatchCount' => <integer>,
                        'BatchSize' => <integer>,
                        'BufferDuration' => <integer>,
                        'DatetimeFormat' => '<string>',
                        '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>',
                        'FileFingerprintLines' => '<string>',
                        'InitialPosition' => 'start_of_file|end_of_file',
                        'LogGroupName' => '<string>',
                        'MultiLineStartPattern' => '<string>',
                        'TimeZone' => 'LOCAL|UTC',
                    ],
                    // ...
                ],
            ],
            'CreatedAt' => '<string>',
            'CustomInstanceProfileArn' => '<string>',
            'CustomJson' => '<string>',
            'CustomRecipes' => [
                'Configure' => ['<string>', ...],
                'Deploy' => ['<string>', ...],
                'Setup' => ['<string>', ...],
                'Shutdown' => ['<string>', ...],
                'Undeploy' => ['<string>', ...],
            ],
            'CustomSecurityGroupIds' => ['<string>', ...],
            'DefaultRecipes' => [
                'Configure' => ['<string>', ...],
                'Deploy' => ['<string>', ...],
                'Setup' => ['<string>', ...],
                'Shutdown' => ['<string>', ...],
                'Undeploy' => ['<string>', ...],
            ],
            'DefaultSecurityGroupNames' => ['<string>', ...],
            'EnableAutoHealing' => true || false,
            'InstallUpdatesOnBoot' => true || false,
            'LayerId' => '<string>',
            'LifecycleEventConfiguration' => [
                'Shutdown' => [
                    'DelayUntilElbConnectionsDrained' => true || false,
                    'ExecutionTimeout' => <integer>,
                ],
            ],
            'Name' => '<string>',
            'Packages' => ['<string>', ...],
            'Shortname' => '<string>',
            'StackId' => '<string>',
            'Type' => 'aws-flow-ruby|ecs-cluster|java-app|lb|web|php-app|rails-app|nodejs-app|memcached|db-master|monitoring-master|custom',
            'UseEbsOptimizedInstances' => true || false,
            'VolumeConfigurations' => [
                [
                    'Encrypted' => true || false,
                    'Iops' => <integer>,
                    'MountPoint' => '<string>',
                    'NumberOfDisks' => <integer>,
                    'RaidLevel' => <integer>,
                    'Size' => <integer>,
                    'VolumeType' => '<string>',
                ],
                // ...
            ],
        ],
        // ...
    ],
]

Result Details

Members
Layers
Type: Array of Layer structures

An array of Layer objects that describe the layers.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeLoadBasedAutoScaling

$result = $client->describeLoadBasedAutoScaling([/* ... */]);
$promise = $client->describeLoadBasedAutoScalingAsync([/* ... */]);

Describes load-based auto scaling configurations for specified layers.

You must specify at least one of the parameters.

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

Parameter Syntax

$result = $client->describeLoadBasedAutoScaling([
    'LayerIds' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
LayerIds
Required: Yes
Type: Array of strings

An array of layer IDs.

Result Syntax

[
    'LoadBasedAutoScalingConfigurations' => [
        [
            'DownScaling' => [
                'Alarms' => ['<string>', ...],
                'CpuThreshold' => <float>,
                'IgnoreMetricsTime' => <integer>,
                'InstanceCount' => <integer>,
                'LoadThreshold' => <float>,
                'MemoryThreshold' => <float>,
                'ThresholdsWaitTime' => <integer>,
            ],
            'Enable' => true || false,
            'LayerId' => '<string>',
            'UpScaling' => [
                'Alarms' => ['<string>', ...],
                'CpuThreshold' => <float>,
                'IgnoreMetricsTime' => <integer>,
                'InstanceCount' => <integer>,
                'LoadThreshold' => <float>,
                'MemoryThreshold' => <float>,
                'ThresholdsWaitTime' => <integer>,
            ],
        ],
        // ...
    ],
]

Result Details

Members
LoadBasedAutoScalingConfigurations
Type: Array of LoadBasedAutoScalingConfiguration structures

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

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeMyUserProfile

$result = $client->describeMyUserProfile([/* ... */]);
$promise = $client->describeMyUserProfileAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->describeMyUserProfile([
]);

Parameter Details

Members

Result Syntax

[
    'UserProfile' => [
        'IamUserArn' => '<string>',
        'Name' => '<string>',
        'SshPublicKey' => '<string>',
        'SshUsername' => '<string>',
    ],
]

Result Details

Members
UserProfile
Type: SelfUserProfile structure

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

Errors

There are no errors described for this operation.

DescribeOperatingSystems

$result = $client->describeOperatingSystems([/* ... */]);
$promise = $client->describeOperatingSystemsAsync([/* ... */]);

Describes the operating systems that are supported by OpsWorks Stacks.

Parameter Syntax

$result = $client->describeOperatingSystems([
]);

Parameter Details

Members

Result Syntax

[
    'OperatingSystems' => [
        [
            'ConfigurationManagers' => [
                [
                    'Name' => '<string>',
                    'Version' => '<string>',
                ],
                // ...
            ],
            'Id' => '<string>',
            'Name' => '<string>',
            'ReportedName' => '<string>',
            'ReportedVersion' => '<string>',
            'Supported' => true || false,
            'Type' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
OperatingSystems
Type: Array of OperatingSystem structures

Contains information in response to a DescribeOperatingSystems request.

Errors

There are no errors described for this operation.

DescribePermissions

$result = $client->describePermissions([/* ... */]);
$promise = $client->describePermissionsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->describePermissions([
    'IamUserArn' => '<string>',
    'StackId' => '<string>',
]);

Parameter Details

Members
IamUserArn
Type: 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
Type: string

The stack ID.

Result Syntax

[
    'Permissions' => [
        [
            'AllowSsh' => true || false,
            'AllowSudo' => true || false,
            'IamUserArn' => '<string>',
            'Level' => '<string>',
            'StackId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Permissions
Type: Array of Permission structures

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.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeRaidArrays

$result = $client->describeRaidArrays([/* ... */]);
$promise = $client->describeRaidArraysAsync([/* ... */]);

Describe an instance's RAID arrays.

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.

Parameter Syntax

$result = $client->describeRaidArrays([
    'InstanceId' => '<string>',
    'RaidArrayIds' => ['<string>', ...],
    'StackId' => '<string>',
]);

Parameter Details

Members
InstanceId
Type: string

The instance ID. If you use this parameter, DescribeRaidArrays returns descriptions of the RAID arrays associated with the specified instance.

RaidArrayIds
Type: Array of strings

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.

StackId
Type: string

The stack ID.

Result Syntax

[
    'RaidArrays' => [
        [
            'AvailabilityZone' => '<string>',
            'CreatedAt' => '<string>',
            'Device' => '<string>',
            'InstanceId' => '<string>',
            'Iops' => <integer>,
            'MountPoint' => '<string>',
            'Name' => '<string>',
            'NumberOfDisks' => <integer>,
            'RaidArrayId' => '<string>',
            'RaidLevel' => <integer>,
            'Size' => <integer>,
            'StackId' => '<string>',
            'VolumeType' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
RaidArrays
Type: Array of RaidArray structures

A RaidArrays object that describes the specified RAID arrays.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeRdsDbInstances

$result = $client->describeRdsDbInstances([/* ... */]);
$promise = $client->describeRdsDbInstancesAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->describeRdsDbInstances([
    'RdsDbInstanceArns' => ['<string>', ...],
    'StackId' => '<string>', // REQUIRED
]);

Parameter Details

Members
RdsDbInstanceArns
Type: Array of strings

An array containing the ARNs of the instances to be described.

StackId
Required: Yes
Type: string

The ID of the stack with which the instances are registered. The operation returns descriptions of all registered Amazon RDS instances.

Result Syntax

[
    'RdsDbInstances' => [
        [
            'Address' => '<string>',
            'DbInstanceIdentifier' => '<string>',
            'DbPassword' => '<string>',
            'DbUser' => '<string>',
            'Engine' => '<string>',
            'MissingOnRds' => true || false,
            'RdsDbInstanceArn' => '<string>',
            'Region' => '<string>',
            'StackId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
RdsDbInstances
Type: Array of RdsDbInstance structures

An a array of RdsDbInstance objects that describe the instances.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeServiceErrors

$result = $client->describeServiceErrors([/* ... */]);
$promise = $client->describeServiceErrorsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->describeServiceErrors([
    'InstanceId' => '<string>',
    'ServiceErrorIds' => ['<string>', ...],
    'StackId' => '<string>',
]);

Parameter Details

Members
InstanceId
Type: string

The instance ID. If you use this parameter, DescribeServiceErrors returns descriptions of the errors associated with the specified instance.

ServiceErrorIds
Type: Array of strings

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.

StackId
Type: string

The stack ID. If you use this parameter, DescribeServiceErrors returns descriptions of the errors associated with the specified stack.

Result Syntax

[
    'ServiceErrors' => [
        [
            'CreatedAt' => '<string>',
            'InstanceId' => '<string>',
            'Message' => '<string>',
            'ServiceErrorId' => '<string>',
            'StackId' => '<string>',
            'Type' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
ServiceErrors
Type: Array of ServiceError structures

An array of ServiceError objects that describe the specified service errors.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeStackProvisioningParameters

$result = $client->describeStackProvisioningParameters([/* ... */]);
$promise = $client->describeStackProvisioningParametersAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->describeStackProvisioningParameters([
    'StackId' => '<string>', // REQUIRED
]);

Parameter Details

Members
StackId
Required: Yes
Type: string

The stack ID.

Result Syntax

[
    'AgentInstallerUrl' => '<string>',
    'Parameters' => ['<string>', ...],
]

Result Details

Members
AgentInstallerUrl
Type: string

The OpsWorks Stacks agent installer's URL.

Parameters
Type: Associative array of custom strings keys (String) to strings

An embedded object that contains the provisioning parameters.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeStackSummary

$result = $client->describeStackSummary([/* ... */]);
$promise = $client->describeStackSummaryAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->describeStackSummary([
    'StackId' => '<string>', // REQUIRED
]);

Parameter Details

Members
StackId
Required: Yes
Type: string

The stack ID.

Result Syntax

[
    'StackSummary' => [
        'AppsCount' => <integer>,
        'Arn' => '<string>',
        'InstancesCount' => [
            'Assigning' => <integer>,
            'Booting' => <integer>,
            'ConnectionLost' => <integer>,
            'Deregistering' => <integer>,
            'Online' => <integer>,
            'Pending' => <integer>,
            'Rebooting' => <integer>,
            'Registered' => <integer>,
            'Registering' => <integer>,
            'Requested' => <integer>,
            'RunningSetup' => <integer>,
            'SetupFailed' => <integer>,
            'ShuttingDown' => <integer>,
            'StartFailed' => <integer>,
            'StopFailed' => <integer>,
            'Stopped' => <integer>,
            'Stopping' => <integer>,
            'Terminated' => <integer>,
            'Terminating' => <integer>,
            'Unassigning' => <integer>,
        ],
        'LayersCount' => <integer>,
        'Name' => '<string>',
        'StackId' => '<string>',
    ],
]

Result Details

Members
StackSummary
Type: StackSummary structure

A StackSummary object that contains the results.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeStacks

$result = $client->describeStacks([/* ... */]);
$promise = $client->describeStacksAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->describeStacks([
    'StackIds' => ['<string>', ...],
]);

Parameter Details

Members
StackIds
Type: Array of strings

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.

Result Syntax

[
    'Stacks' => [
        [
            'AgentVersion' => '<string>',
            'Arn' => '<string>',
            'Attributes' => ['<string>', ...],
            'ChefConfiguration' => [
                'BerkshelfVersion' => '<string>',
                'ManageBerkshelf' => true || false,
            ],
            'ConfigurationManager' => [
                'Name' => '<string>',
                'Version' => '<string>',
            ],
            'CreatedAt' => '<string>',
            'CustomCookbooksSource' => [
                'Password' => '<string>',
                'Revision' => '<string>',
                'SshKey' => '<string>',
                'Type' => 'git|svn|archive|s3',
                'Url' => '<string>',
                'Username' => '<string>',
            ],
            'CustomJson' => '<string>',
            'DefaultAvailabilityZone' => '<string>',
            'DefaultInstanceProfileArn' => '<string>',
            'DefaultOs' => '<string>',
            'DefaultRootDeviceType' => 'ebs|instance-store',
            'DefaultSshKeyName' => '<string>',
            'DefaultSubnetId' => '<string>',
            'HostnameTheme' => '<string>',
            'Name' => '<string>',
            'Region' => '<string>',
            'ServiceRoleArn' => '<string>',
            'StackId' => '<string>',
            'UseCustomCookbooks' => true || false,
            'UseOpsworksSecurityGroups' => true || false,
            'VpcId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Stacks
Type: Array of Stack structures

An array of Stack objects that describe the stacks.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeTimeBasedAutoScaling

$result = $client->describeTimeBasedAutoScaling([/* ... */]);
$promise = $client->describeTimeBasedAutoScalingAsync([/* ... */]);

Describes time-based auto scaling configurations for specified instances.

You must specify at least one of the parameters.

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

Parameter Syntax

$result = $client->describeTimeBasedAutoScaling([
    'InstanceIds' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
InstanceIds
Required: Yes
Type: Array of strings

An array of instance IDs.

Result Syntax

[
    'TimeBasedAutoScalingConfigurations' => [
        [
            'AutoScalingSchedule' => [
                'Friday' => ['<string>', ...],
                'Monday' => ['<string>', ...],
                'Saturday' => ['<string>', ...],
                'Sunday' => ['<string>', ...],
                'Thursday' => ['<string>', ...],
                'Tuesday' => ['<string>', ...],
                'Wednesday' => ['<string>', ...],
            ],
            'InstanceId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
TimeBasedAutoScalingConfigurations
Type: Array of TimeBasedAutoScalingConfiguration structures

An array of TimeBasedAutoScalingConfiguration objects that describe the configuration for the specified instances.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeUserProfiles

$result = $client->describeUserProfiles([/* ... */]);
$promise = $client->describeUserProfilesAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->describeUserProfiles([
    'IamUserArns' => ['<string>', ...],
]);

Parameter Details

Members
IamUserArns
Type: Array of strings

An array of IAM or federated user ARNs that identify the users to be described.

Result Syntax

[
    'UserProfiles' => [
        [
            'AllowSelfManagement' => true || false,
            'IamUserArn' => '<string>',
            'Name' => '<string>',
            'SshPublicKey' => '<string>',
            'SshUsername' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
UserProfiles
Type: Array of UserProfile structures

A Users object that describes the specified users.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DescribeVolumes

$result = $client->describeVolumes([/* ... */]);
$promise = $client->describeVolumesAsync([/* ... */]);

Describes an instance's Amazon EBS volumes.

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.

Parameter Syntax

$result = $client->describeVolumes([
    'InstanceId' => '<string>',
    'RaidArrayId' => '<string>',
    'StackId' => '<string>',
    'VolumeIds' => ['<string>', ...],
]);

Parameter Details

Members
InstanceId
Type: string

The instance ID. If you use this parameter, DescribeVolumes returns descriptions of the volumes associated with the specified instance.

RaidArrayId
Type: string

The RAID array ID. If you use this parameter, DescribeVolumes returns descriptions of the volumes associated with the specified RAID array.

StackId
Type: string

A stack ID. The action describes the stack's registered Amazon EBS volumes.

VolumeIds
Type: Array of strings

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.

Result Syntax

[
    'Volumes' => [
        [
            'AvailabilityZone' => '<string>',
            'Device' => '<string>',
            'Ec2VolumeId' => '<string>',
            'Encrypted' => true || false,
            'InstanceId' => '<string>',
            'Iops' => <integer>,
            'MountPoint' => '<string>',
            'Name' => '<string>',
            'RaidArrayId' => '<string>',
            'Region' => '<string>',
            'Size' => <integer>,
            'Status' => '<string>',
            'VolumeId' => '<string>',
            'VolumeType' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Volumes
Type: Array of Volume structures

An array of volume IDs.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

DetachElasticLoadBalancer

$result = $client->detachElasticLoadBalancer([/* ... */]);
$promise = $client->detachElasticLoadBalancerAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->detachElasticLoadBalancer([
    'ElasticLoadBalancerName' => '<string>', // REQUIRED
    'LayerId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ElasticLoadBalancerName
Required: Yes
Type: string

The Elastic Load Balancing instance's name.

LayerId
Required: Yes
Type: string

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceNotFoundException:

Indicates that a resource was not found.

DisassociateElasticIp

$result = $client->disassociateElasticIp([/* ... */]);
$promise = $client->disassociateElasticIpAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->disassociateElasticIp([
    'ElasticIp' => '<string>', // REQUIRED
]);

Parameter Details

Members
ElasticIp
Required: Yes
Type: string

The Elastic IP address.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

GetHostnameSuggestion

$result = $client->getHostnameSuggestion([/* ... */]);
$promise = $client->getHostnameSuggestionAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->getHostnameSuggestion([
    'LayerId' => '<string>', // REQUIRED
]);

Parameter Details

Members
LayerId
Required: Yes
Type: string

The layer ID.

Result Syntax

[
    'Hostname' => '<string>',
    'LayerId' => '<string>',
]

Result Details

Members
Hostname
Type: string

The generated host name.

LayerId
Type: string

The layer ID.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

GrantAccess

$result = $client->grantAccess([/* ... */]);
$promise = $client->grantAccessAsync([/* ... */]);

This action can be used only with Windows stacks.

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

Parameter Syntax

$result = $client->grantAccess([
    'InstanceId' => '<string>', // REQUIRED
    'ValidForInMinutes' => <integer>,
]);

Parameter Details

Members
InstanceId
Required: Yes
Type: string

The instance's OpsWorks Stacks ID.

ValidForInMinutes
Type: int

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.

Result Syntax

[
    'TemporaryCredential' => [
        'InstanceId' => '<string>',
        'Password' => '<string>',
        'Username' => '<string>',
        'ValidForInMinutes' => <integer>,
    ],
]

Result Details

Members
TemporaryCredential
Type: TemporaryCredential structure

A TemporaryCredential object that contains the data needed to log in to the instance by RDP clients, such as the Microsoft Remote Desktop Connection.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

ListTags

$result = $client->listTags([/* ... */]);
$promise = $client->listTagsAsync([/* ... */]);

Returns a list of tags that are applied to the specified stack or layer.

Parameter Syntax

$result = $client->listTags([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'ResourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
MaxResults
Type: int

Do not use. A validation exception occurs if you add a MaxResults parameter to a ListTagsRequest call.

NextToken
Type: string

Do not use. A validation exception occurs if you add a NextToken parameter to a ListTagsRequest call.

ResourceArn
Required: Yes
Type: string

The stack or layer's Amazon Resource Number (ARN).

Result Syntax

[
    'NextToken' => '<string>',
    'Tags' => ['<string>', ...],
]

Result Details

Members
NextToken
Type: 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.

Tags
Type: Associative array of custom strings keys (TagKey) to strings

A set of key-value pairs that contain tag keys and tag values that are attached to a stack or layer.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

RebootInstance

$result = $client->rebootInstance([/* ... */]);
$promise = $client->rebootInstanceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->rebootInstance([
    'InstanceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
InstanceId
Required: Yes
Type: string

The instance ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

RegisterEcsCluster

$result = $client->registerEcsCluster([/* ... */]);
$promise = $client->registerEcsClusterAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->registerEcsCluster([
    'EcsClusterArn' => '<string>', // REQUIRED
    'StackId' => '<string>', // REQUIRED
]);

Parameter Details

Members
EcsClusterArn
Required: Yes
Type: string

The cluster's ARN.

StackId
Required: Yes
Type: string

The stack ID.

Result Syntax

[
    'EcsClusterArn' => '<string>',
]

Result Details

Members
EcsClusterArn
Type: string

The cluster's ARN.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

RegisterElasticIp

$result = $client->registerElasticIp([/* ... */]);
$promise = $client->registerElasticIpAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->registerElasticIp([
    'ElasticIp' => '<string>', // REQUIRED
    'StackId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ElasticIp
Required: Yes
Type: string

The Elastic IP address.

StackId
Required: Yes
Type: string

The stack ID.

Result Syntax

[
    'ElasticIp' => '<string>',
]

Result Details

Members
ElasticIp
Type: string

The Elastic IP address.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

RegisterInstance

$result = $client->registerInstance([/* ... */]);
$promise = $client->registerInstanceAsync([/* ... */]);

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

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.

Parameter Syntax

$result = $client->registerInstance([
    'Hostname' => '<string>',
    'InstanceIdentity' => [
        'Document' => '<string>',
        'Signature' => '<string>',
    ],
    'PrivateIp' => '<string>',
    'PublicIp' => '<string>',
    'RsaPublicKey' => '<string>',
    'RsaPublicKeyFingerprint' => '<string>',
    'StackId' => '<string>', // REQUIRED
]);

Parameter Details

Members
Hostname
Type: 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

InstanceIdentity
Type: InstanceIdentity structure

An InstanceIdentity object that contains the instance's identity.

PrivateIp
Type: string

The instance's private IP address.

PublicIp
Type: string

The instance's public IP address.

RsaPublicKey
Type: string

The instances public RSA key. This key is used to encrypt communication between the instance and the service.

RsaPublicKeyFingerprint
Type: string

The instances public RSA key fingerprint.

StackId
Required: Yes
Type: string

The ID of the stack that the instance is to be registered with.

Result Syntax

[
    'InstanceId' => '<string>',
]

Result Details

Members
InstanceId
Type: string

The registered instance's OpsWorks Stacks ID.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

RegisterRdsDbInstance

$result = $client->registerRdsDbInstance([/* ... */]);
$promise = $client->registerRdsDbInstanceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->registerRdsDbInstance([
    'DbPassword' => '<string>', // REQUIRED
    'DbUser' => '<string>', // REQUIRED
    'RdsDbInstanceArn' => '<string>', // REQUIRED
    'StackId' => '<string>', // REQUIRED
]);

Parameter Details

Members
DbPassword
Required: Yes
Type: string

The database password.

DbUser
Required: Yes
Type: string

The database's master user name.

RdsDbInstanceArn
Required: Yes
Type: string

The Amazon RDS instance's ARN.

StackId
Required: Yes
Type: string

The stack ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

RegisterVolume

$result = $client->registerVolume([/* ... */]);
$promise = $client->registerVolumeAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->registerVolume([
    'Ec2VolumeId' => '<string>',
    'StackId' => '<string>', // REQUIRED
]);

Parameter Details

Members
Ec2VolumeId
Type: string

The Amazon EBS volume ID.

StackId
Required: Yes
Type: string

The stack ID.

Result Syntax

[
    'VolumeId' => '<string>',
]

Result Details

Members
VolumeId
Type: string

The volume ID.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

SetLoadBasedAutoScaling

$result = $client->setLoadBasedAutoScaling([/* ... */]);
$promise = $client->setLoadBasedAutoScalingAsync([/* ... */]);

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

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

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

Parameter Syntax

$result = $client->setLoadBasedAutoScaling([
    'DownScaling' => [
        'Alarms' => ['<string>', ...],
        'CpuThreshold' => <float>,
        'IgnoreMetricsTime' => <integer>,
        'InstanceCount' => <integer>,
        'LoadThreshold' => <float>,
        'MemoryThreshold' => <float>,
        'ThresholdsWaitTime' => <integer>,
    ],
    'Enable' => true || false,
    'LayerId' => '<string>', // REQUIRED
    'UpScaling' => [
        'Alarms' => ['<string>', ...],
        'CpuThreshold' => <float>,
        'IgnoreMetricsTime' => <integer>,
        'InstanceCount' => <integer>,
        'LoadThreshold' => <float>,
        'MemoryThreshold' => <float>,
        'ThresholdsWaitTime' => <integer>,
    ],
]);

Parameter Details

Members
DownScaling
Type: AutoScalingThresholds structure

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.

Enable
Type: boolean

Enables load-based auto scaling for the layer.

LayerId
Required: Yes
Type: string

The layer ID.

UpScaling
Type: AutoScalingThresholds structure

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.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

SetPermission

$result = $client->setPermission([/* ... */]);
$promise = $client->setPermissionAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->setPermission([
    'AllowSsh' => true || false,
    'AllowSudo' => true || false,
    'IamUserArn' => '<string>', // REQUIRED
    'Level' => '<string>',
    'StackId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AllowSsh
Type: boolean

The user is allowed to use SSH to communicate with the instance.

AllowSudo
Type: boolean

The user is allowed to use sudo to elevate privileges.

IamUserArn
Required: Yes
Type: string

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

Level
Type: 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.

StackId
Required: Yes
Type: string

The stack ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

SetTimeBasedAutoScaling

$result = $client->setTimeBasedAutoScaling([/* ... */]);
$promise = $client->setTimeBasedAutoScalingAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->setTimeBasedAutoScaling([
    'AutoScalingSchedule' => [
        'Friday' => ['<string>', ...],
        'Monday' => ['<string>', ...],
        'Saturday' => ['<string>', ...],
        'Sunday' => ['<string>', ...],
        'Thursday' => ['<string>', ...],
        'Tuesday' => ['<string>', ...],
        'Wednesday' => ['<string>', ...],
    ],
    'InstanceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AutoScalingSchedule
Type: WeeklyAutoScalingSchedule structure

An AutoScalingSchedule with the instance schedule.

InstanceId
Required: Yes
Type: string

The instance ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

StartInstance

$result = $client->startInstance([/* ... */]);
$promise = $client->startInstanceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->startInstance([
    'InstanceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
InstanceId
Required: Yes
Type: string

The instance ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

StartStack

$result = $client->startStack([/* ... */]);
$promise = $client->startStackAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->startStack([
    'StackId' => '<string>', // REQUIRED
]);

Parameter Details

Members
StackId
Required: Yes
Type: string

The stack ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

StopInstance

$result = $client->stopInstance([/* ... */]);
$promise = $client->stopInstanceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->stopInstance([
    'Force' => true || false,
    'InstanceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
Force
Type: 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.

InstanceId
Required: Yes
Type: string

The instance ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

StopStack

$result = $client->stopStack([/* ... */]);
$promise = $client->stopStackAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->stopStack([
    'StackId' => '<string>', // REQUIRED
]);

Parameter Details

Members
StackId
Required: Yes
Type: string

The stack ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

TagResource

$result = $client->tagResource([/* ... */]);
$promise = $client->tagResourceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->tagResource([
    'ResourceArn' => '<string>', // REQUIRED
    'Tags' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
ResourceArn
Required: Yes
Type: string

The stack or layer's Amazon Resource Number (ARN).

Tags
Required: Yes
Type: Associative array of custom strings keys (TagKey) to strings

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.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

UnassignInstance

$result = $client->unassignInstance([/* ... */]);
$promise = $client->unassignInstanceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->unassignInstance([
    'InstanceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
InstanceId
Required: Yes
Type: string

The instance ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

UnassignVolume

$result = $client->unassignVolume([/* ... */]);
$promise = $client->unassignVolumeAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->unassignVolume([
    'VolumeId' => '<string>', // REQUIRED
]);

Parameter Details

Members
VolumeId
Required: Yes
Type: string

The volume ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

UntagResource

$result = $client->untagResource([/* ... */]);
$promise = $client->untagResourceAsync([/* ... */]);

Removes tags from a specified stack or layer.

Parameter Syntax

$result = $client->untagResource([
    'ResourceArn' => '<string>', // REQUIRED
    'TagKeys' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
ResourceArn
Required: Yes
Type: string

The stack or layer's Amazon Resource Number (ARN).

TagKeys
Required: Yes
Type: Array of strings

A list of the keys of tags to be removed from a stack or layer.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

UpdateApp

$result = $client->updateApp([/* ... */]);
$promise = $client->updateAppAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->updateApp([
    'AppId' => '<string>', // REQUIRED
    'AppSource' => [
        'Password' => '<string>',
        'Revision' => '<string>',
        'SshKey' => '<string>',
        'Type' => 'git|svn|archive|s3',
        'Url' => '<string>',
        'Username' => '<string>',
    ],
    'Attributes' => ['<string>', ...],
    'DataSources' => [
        [
            'Arn' => '<string>',
            'DatabaseName' => '<string>',
            'Type' => '<string>',
        ],
        // ...
    ],
    'Description' => '<string>',
    'Domains' => ['<string>', ...],
    'EnableSsl' => true || false,
    'Environment' => [
        [
            'Key' => '<string>', // REQUIRED
            'Secure' => true || false,
            'Value' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'Name' => '<string>',
    'SslConfiguration' => [
        'Certificate' => '<string>', // REQUIRED
        'Chain' => '<string>',
        'PrivateKey' => '<string>', // REQUIRED
    ],
    'Type' => 'aws-flow-ruby|java|rails|php|nodejs|static|other',
]);

Parameter Details

Members
AppId
Required: Yes
Type: string

The app ID.

AppSource
Type: Source structure

A Source object that specifies the app repository.

Attributes
Type: Associative array of custom strings keys (AppAttributesKeys) to strings

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

DataSources
Type: Array of DataSource structures

The app's data sources.

Description
Type: string

A description of the app.

Domains
Type: Array of strings

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

EnableSsl
Type: boolean

Whether SSL is enabled for the app.

Environment
Type: Array of EnvironmentVariable structures

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

If you have specified one or more environment variables, you cannot modify the stack's Chef version.

Name
Type: string

The app name.

SslConfiguration
Type: SslConfiguration structure

An SslConfiguration object with the SSL configuration.

Type
Type: string

The app type.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

UpdateElasticIp

$result = $client->updateElasticIp([/* ... */]);
$promise = $client->updateElasticIpAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->updateElasticIp([
    'ElasticIp' => '<string>', // REQUIRED
    'Name' => '<string>',
]);

Parameter Details

Members
ElasticIp
Required: Yes
Type: string

The IP address for which you want to update the name.

Name
Type: string

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

UpdateInstance

$result = $client->updateInstance([/* ... */]);
$promise = $client->updateInstanceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->updateInstance([
    'AgentVersion' => '<string>',
    'AmiId' => '<string>',
    'Architecture' => 'x86_64|i386',
    'AutoScalingType' => 'load|timer',
    'EbsOptimized' => true || false,
    'Hostname' => '<string>',
    'InstallUpdatesOnBoot' => true || false,
    'InstanceId' => '<string>', // REQUIRED
    'InstanceType' => '<string>',
    'LayerIds' => ['<string>', ...],
    'Os' => '<string>',
    'SshKeyName' => '<string>',
]);

Parameter Details

Members
AgentVersion
Type: 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.

AmiId
Type: 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.

Architecture
Type: 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.

AutoScalingType
Type: string

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

EbsOptimized
Type: boolean

This property cannot be updated.

Hostname
Type: string

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

  • Linux-based instances: 63 characters

  • Windows-based instances: 15 characters

InstallUpdatesOnBoot
Type: 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.

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates.

InstanceId
Required: Yes
Type: string

The instance ID.

InstanceType
Type: 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.

LayerIds
Type: Array of strings

The instance's layer IDs.

Os
Type: 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.

You can specify a different Linux operating system for the updated stack, but you cannot change from Linux to Windows or Windows to Linux.

SshKeyName
Type: string

The instance's Amazon EC2 key name.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

UpdateLayer

$result = $client->updateLayer([/* ... */]);
$promise = $client->updateLayerAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->updateLayer([
    'Attributes' => ['<string>', ...],
    'AutoAssignElasticIps' => true || false,
    'AutoAssignPublicIps' => true || false,
    'CloudWatchLogsConfiguration' => [
        'Enabled' => true || false,
        'LogStreams' => [
            [
                'BatchCount' => <integer>,
                'BatchSize' => <integer>,
                'BufferDuration' => <integer>,
                'DatetimeFormat' => '<string>',
                '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>',
                'FileFingerprintLines' => '<string>',
                'InitialPosition' => 'start_of_file|end_of_file',
                'LogGroupName' => '<string>',
                'MultiLineStartPattern' => '<string>',
                'TimeZone' => 'LOCAL|UTC',
            ],
            // ...
        ],
    ],
    'CustomInstanceProfileArn' => '<string>',
    'CustomJson' => '<string>',
    'CustomRecipes' => [
        'Configure' => ['<string>', ...],
        'Deploy' => ['<string>', ...],
        'Setup' => ['<string>', ...],
        'Shutdown' => ['<string>', ...],
        'Undeploy' => ['<string>', ...],
    ],
    'CustomSecurityGroupIds' => ['<string>', ...],
    'EnableAutoHealing' => true || false,
    'InstallUpdatesOnBoot' => true || false,
    'LayerId' => '<string>', // REQUIRED
    'LifecycleEventConfiguration' => [
        'Shutdown' => [
            'DelayUntilElbConnectionsDrained' => true || false,
            'ExecutionTimeout' => <integer>,
        ],
    ],
    'Name' => '<string>',
    'Packages' => ['<string>', ...],
    'Shortname' => '<string>',
    'UseEbsOptimizedInstances' => true || false,
    'VolumeConfigurations' => [
        [
            'Encrypted' => true || false,
            'Iops' => <integer>,
            'MountPoint' => '<string>', // REQUIRED
            'NumberOfDisks' => <integer>, // REQUIRED
            'RaidLevel' => <integer>,
            'Size' => <integer>, // REQUIRED
            'VolumeType' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
Attributes
Type: Associative array of custom strings keys (LayerAttributesKeys) to strings

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

AutoAssignElasticIps
Type: boolean

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

AutoAssignPublicIps
Type: 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.

CloudWatchLogsConfiguration
Type: CloudWatchLogsConfiguration structure

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

CustomInstanceProfileArn
Type: 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
Type: 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.

CustomRecipes
Type: Recipes structure

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

CustomSecurityGroupIds
Type: Array of strings

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

EnableAutoHealing
Type: boolean

Whether to disable auto healing for the layer.

InstallUpdatesOnBoot
Type: 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.

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates.

LayerId
Required: Yes
Type: string

The layer ID.

LifecycleEventConfiguration
Type: LifecycleEventConfiguration structure

Name
Type: string

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

Packages
Type: Array of strings

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

Shortname
Type: 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.

UseEbsOptimizedInstances
Type: boolean

Whether to use Amazon EBS-optimized instances.

VolumeConfigurations
Type: Array of VolumeConfiguration structures

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

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

UpdateMyUserProfile

$result = $client->updateMyUserProfile([/* ... */]);
$promise = $client->updateMyUserProfileAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->updateMyUserProfile([
    'SshPublicKey' => '<string>',
]);

Parameter Details

Members
SshPublicKey
Type: string

The user's SSH public key.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

UpdateRdsDbInstance

$result = $client->updateRdsDbInstance([/* ... */]);
$promise = $client->updateRdsDbInstanceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->updateRdsDbInstance([
    'DbPassword' => '<string>',
    'DbUser' => '<string>',
    'RdsDbInstanceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
DbPassword
Type: string

The database password.

DbUser
Type: string

The master user name.

RdsDbInstanceArn
Required: Yes
Type: string

The Amazon RDS instance's ARN.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

UpdateStack

$result = $client->updateStack([/* ... */]);
$promise = $client->updateStackAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->updateStack([
    'AgentVersion' => '<string>',
    'Attributes' => ['<string>', ...],
    'ChefConfiguration' => [
        'BerkshelfVersion' => '<string>',
        'ManageBerkshelf' => true || false,
    ],
    'ConfigurationManager' => [
        'Name' => '<string>',
        'Version' => '<string>',
    ],
    'CustomCookbooksSource' => [
        'Password' => '<string>',
        'Revision' => '<string>',
        'SshKey' => '<string>',
        'Type' => 'git|svn|archive|s3',
        'Url' => '<string>',
        'Username' => '<string>',
    ],
    'CustomJson' => '<string>',
    'DefaultAvailabilityZone' => '<string>',
    'DefaultInstanceProfileArn' => '<string>',
    'DefaultOs' => '<string>',
    'DefaultRootDeviceType' => 'ebs|instance-store',
    'DefaultSshKeyName' => '<string>',
    'DefaultSubnetId' => '<string>',
    'HostnameTheme' => '<string>',
    'Name' => '<string>',
    'ServiceRoleArn' => '<string>',
    'StackId' => '<string>', // REQUIRED
    'UseCustomCookbooks' => true || false,
    'UseOpsworksSecurityGroups' => true || false,
]);

Parameter Details

Members
AgentVersion
Type: 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.

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

Attributes
Type: Associative array of custom strings keys (StackAttributesKeys) to strings

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

ChefConfiguration
Type: ChefConfiguration structure

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.

ConfigurationManager
Type: StackConfigurationManager structure

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.

CustomCookbooksSource
Type: Source structure

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

CustomJson
Type: 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.

DefaultAvailabilityZone
Type: 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.

DefaultInstanceProfileArn
Type: 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
Type: 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.

DefaultRootDeviceType
Type: 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.

DefaultSshKeyName
Type: 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.

DefaultSubnetId
Type: 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.

HostnameTheme
Type: 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.

Name
Type: string

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

ServiceRoleArn
Type: string

Do not use this parameter. You cannot update a stack's service role.

StackId
Required: Yes
Type: string

The stack ID.

UseCustomCookbooks
Type: boolean

Whether the stack uses custom cookbooks.

UseOpsworksSecurityGroups
Type: 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.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

UpdateUserProfile

$result = $client->updateUserProfile([/* ... */]);
$promise = $client->updateUserProfileAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->updateUserProfile([
    'AllowSelfManagement' => true || false,
    'IamUserArn' => '<string>', // REQUIRED
    'SshPublicKey' => '<string>',
    'SshUsername' => '<string>',
]);

Parameter Details

Members
AllowSelfManagement
Type: boolean

Whether users can specify their own SSH public key through the My Settings page. For more information, see Managing User Permissions.

IamUserArn
Required: Yes
Type: string

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

SshPublicKey
Type: string

The user's new SSH public key.

SshUsername
Type: 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.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

UpdateVolume

$result = $client->updateVolume([/* ... */]);
$promise = $client->updateVolumeAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->updateVolume([
    'MountPoint' => '<string>',
    'Name' => '<string>',
    'VolumeId' => '<string>', // REQUIRED
]);

Parameter Details

Members
MountPoint
Type: string

The new mount point.

Name
Type: string

The new name. Volume names can be a maximum of 128 characters.

VolumeId
Required: Yes
Type: string

The volume ID.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

Indicates that a request was not valid.

ResourceNotFoundException:

Indicates that a resource was not found.

Shapes

AgentVersion

Description

Describes an agent version.

Members
ConfigurationManager
Type: StackConfigurationManager structure

The configuration manager.

Version
Type: string

The agent version.

App

Description

A description of the app.

Members
AppId
Type: string

The app ID.

AppSource
Type: Source structure

A Source object that describes the app repository.

Attributes
Type: Associative array of custom strings keys (AppAttributesKeys) to strings

The stack attributes.

CreatedAt
Type: string

When the app was created.

DataSources
Type: Array of DataSource structures

The app's data sources.

Description
Type: string

A description of the app.

Domains
Type: Array of strings

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

EnableSsl
Type: boolean

Whether to enable SSL for the app.

Environment
Type: Array of EnvironmentVariable structures

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

Name
Type: string

The app name.

Shortname
Type: string

The app's short name.

SslConfiguration
Type: SslConfiguration structure

An SslConfiguration object with the SSL configuration.

StackId
Type: string

The app stack ID.

Type
Type: string

The app type.

AutoScalingThresholds

Description

Describes a load-based auto scaling upscaling or downscaling threshold configuration, which specifies when OpsWorks Stacks starts or stops load-based instances.

Members
Alarms
Type: Array of strings

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.

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.

CpuThreshold
Type: double

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

IgnoreMetricsTime
Type: int

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.

InstanceCount
Type: int

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

LoadThreshold
Type: double

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

MemoryThreshold
Type: double

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

ThresholdsWaitTime
Type: int

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

BlockDeviceMapping

Description

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

Members
DeviceName
Type: 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.

Ebs
Type: EbsBlockDevice structure

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

NoDevice
Type: string

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

VirtualName
Type: string

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

ChefConfiguration

Description

Describes the Chef configuration.

Members
BerkshelfVersion
Type: string

The Berkshelf version.

ManageBerkshelf
Type: boolean

Whether to enable Berkshelf.

CloudWatchLogsConfiguration

Description

Describes the Amazon CloudWatch Logs configuration for a layer.

Members
Enabled
Type: boolean

Whether CloudWatch Logs is enabled for a layer.

LogStreams
Type: Array of CloudWatchLogsLogStream structures

A list of configuration options for CloudWatch Logs.

CloudWatchLogsLogStream

Description

Describes the CloudWatch Logs configuration for a layer. For detailed information about members of this data type, see the CloudWatch Logs Agent Reference.

Members
BatchCount
Type: int

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

BatchSize
Type: int

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.

BufferDuration
Type: int

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

DatetimeFormat
Type: string

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

Encoding
Type: 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.

File
Type: 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
Type: 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.

InitialPosition
Type: 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.

LogGroupName
Type: 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).

MultiLineStartPattern
Type: string

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

TimeZone
Type: string

Specifies the time zone of log event time stamps.

Command

Description

Describes a command.

Members
AcknowledgedAt
Type: string

Date and time when the command was acknowledged.

CommandId
Type: string

The command ID.

CompletedAt
Type: string

Date when the command completed.

CreatedAt
Type: string

Date and time when the command was run.

DeploymentId
Type: string

The command deployment ID.

ExitCode
Type: int

The command exit code.

InstanceId
Type: string

The ID of the instance where the command was executed.

LogUrl
Type: string

The URL of the command log.

Status
Type: string

The command status:

  • failed

  • successful

  • skipped

  • pending

Type
Type: string

The command type:

  • configure

  • deploy

  • execute_recipes

  • install_dependencies

  • restart

  • rollback

  • setup

  • start

  • stop

  • undeploy

  • update_custom_cookbooks

  • update_dependencies

DataSource

Description

Describes an app's data source.

Members
Arn
Type: string

The data source's ARN.

DatabaseName
Type: string

The database name.

Type
Type: string

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

Deployment

Description

Describes a deployment of a stack or app.

Members
AppId
Type: string

The app ID.

Command
Type: DeploymentCommand structure

Used to specify a stack or deployment command.

Comment
Type: string

A user-defined comment.

CompletedAt
Type: string

Date when the deployment completed.

CreatedAt
Type: string

Date when the deployment was created.

CustomJson
Type: 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.

DeploymentId
Type: string

The deployment ID.

Duration
Type: int

The deployment duration.

IamUserArn
Type: string

The user's IAM ARN.

InstanceIds
Type: Array of strings

The IDs of the target instances.

StackId
Type: string

The stack ID.

Status
Type: string

The deployment status:

  • running

  • successful

  • failed

DeploymentCommand

Description

Used to specify a stack or deployment command.

Members
Args
Type: Associative array of custom strings keys (String) to stringss

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"] }

Name
Required: Yes
Type: 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.

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.

EbsBlockDevice

Description

Describes an Amazon EBS volume. This data type maps directly to the Amazon EC2 EbsBlockDevice data type.

Members
DeleteOnTermination
Type: boolean

Whether the volume is deleted on instance termination.

Iops
Type: int

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

SnapshotId
Type: string

The snapshot ID.

VolumeSize
Type: int

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

VolumeType
Type: 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).

EcsCluster

Description

Describes a registered Amazon ECS cluster.

Members
EcsClusterArn
Type: string

The cluster's ARN.

EcsClusterName
Type: string

The cluster name.

RegisteredAt
Type: string

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

StackId
Type: string

The stack ID.

ElasticIp

Description

Describes an Elastic IP address.

Members
Domain
Type: string

The domain.

InstanceId
Type: string

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

Ip
Type: string

The IP address.

Name
Type: string

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

Region
Type: string

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

ElasticLoadBalancer

Description

Describes an Elastic Load Balancing instance.

Members
AvailabilityZones
Type: Array of strings

A list of Availability Zones.

DnsName
Type: string

The instance's public DNS name.

Ec2InstanceIds
Type: Array of strings

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

ElasticLoadBalancerName
Type: string

The Elastic Load Balancing instance name.

LayerId
Type: string

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

Region
Type: string

The instance's Amazon Web Services Region.

StackId
Type: string

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

SubnetIds
Type: Array of strings

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

VpcId
Type: string

The VPC ID.

EnvironmentVariable

Description

Represents an app's environment variable.

Members
Key
Required: Yes
Type: 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.

Secure
Type: 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.

Value
Required: Yes
Type: 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.

Instance

Description

Describes an instance.

Members
AgentVersion
Type: 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
Type: string

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

Architecture
Type: string

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

Arn
Type: string

The instance's Amazon Resource Number (ARN).

AutoScalingType
Type: string

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

AvailabilityZone
Type: string

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

BlockDeviceMappings
Type: Array of BlockDeviceMapping structures

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

CreatedAt
Type: string

The time that the instance was created.

EbsOptimized
Type: boolean

Whether this is an Amazon EBS-optimized instance.

Ec2InstanceId
Type: string

The ID of the associated Amazon EC2 instance.

EcsClusterArn
Type: string

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

EcsContainerInstanceArn
Type: string

For container instances, the instance's ARN.

ElasticIp
Type: string

The instance Elastic IP address.

Hostname
Type: 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
Type: string

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

InstallUpdatesOnBoot
Type: 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.

We strongly recommend using the default value of true to ensure that your instances have the latest security updates.

InstanceId
Type: string

The instance ID.

InstanceProfileArn
Type: string

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

InstanceType
Type: string

The instance type, such as t2.micro.

LastServiceErrorId
Type: string

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

LayerIds
Type: Array of strings

An array containing the instance layer IDs.

Os
Type: string

The instance's operating system.

Platform
Type: string

The instance's platform.

PrivateDns
Type: string

The instance's private DNS name.

PrivateIp
Type: string

The instance's private IP address.

PublicDns
Type: string

The instance public DNS name.

PublicIp
Type: string

The instance public IP address.

RegisteredBy
Type: string

For registered instances, who performed the registration.

ReportedAgentVersion
Type: string

The instance's reported OpsWorks Stacks agent version.

ReportedOs
Type: ReportedOs structure

For registered instances, the reported operating system.

RootDeviceType
Type: string

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

RootDeviceVolumeId
Type: string

The root device volume ID.

SecurityGroupIds
Type: Array of strings

An array containing the instance security group IDs.

SshHostDsaKeyFingerprint
Type: string

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

SshHostRsaKeyFingerprint
Type: string

The SSH key's RSA fingerprint.

SshKeyName
Type: string

The instance's Amazon EC2 key-pair name.

StackId
Type: string

The stack ID.

Status
Type: 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
Type: string

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

Tenancy
Type: string

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

VirtualizationType
Type: string

The instance's virtualization type: paravirtual or hvm.

InstanceIdentity

Description

Contains a description of an Amazon EC2 instance from the Amazon EC2 metadata service. For more information, see Instance Metadata and User Data.

Members
Document
Type: string

A JSON document that contains the metadata.

Signature
Type: string

A signature that can be used to verify the document's accuracy and authenticity.

InstancesCount

Description

Describes how many instances a stack has for each status.

Members
Assigning
Type: int

The number of instances in the Assigning state.

Booting
Type: int

The number of instances with booting status.

ConnectionLost
Type: int

The number of instances with connection_lost status.

Deregistering
Type: int

The number of instances in the Deregistering state.

Online
Type: int

The number of instances with online status.

Pending
Type: int

The number of instances with pending status.

Rebooting
Type: int

The number of instances with rebooting status.

Registered
Type: int

The number of instances in the Registered state.

Registering
Type: int

The number of instances in the Registering state.

Requested
Type: int

The number of instances with requested status.

RunningSetup
Type: int

The number of instances with running_setup status.

SetupFailed
Type: int

The number of instances with setup_failed status.

ShuttingDown
Type: int

The number of instances with shutting_down status.

StartFailed
Type: int

The number of instances with start_failed status.

StopFailed
Type: int

The number of instances with stop_failed status.

Stopped
Type: int

The number of instances with stopped status.

Stopping
Type: int

The number of instances with stopping status.

Terminated
Type: int

The number of instances with terminated status.

Terminating
Type: int

The number of instances with terminating status.

Unassigning
Type: int

The number of instances in the Unassigning state.

Layer

Description

Describes a layer.

Members
Arn
Type: string

The Amazon Resource Number (ARN) of a layer.

Attributes
Type: Associative array of custom strings keys (LayerAttributesKeys) to strings

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.

AutoAssignElasticIps
Type: boolean

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

AutoAssignPublicIps
Type: 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.

CloudWatchLogsConfiguration
Type: CloudWatchLogsConfiguration structure

The Amazon CloudWatch Logs configuration settings for the layer.

CreatedAt
Type: string

Date when the layer was created.

CustomInstanceProfileArn
Type: 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
Type: string

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

CustomRecipes
Type: Recipes structure

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

CustomSecurityGroupIds
Type: Array of strings

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

DefaultRecipes
Type: Recipes structure

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.

DefaultSecurityGroupNames
Type: Array of strings

An array containing the layer's security group names.

EnableAutoHealing
Type: boolean

Whether auto healing is disabled for the layer.

InstallUpdatesOnBoot
Type: 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.

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates.

LayerId
Type: string

The layer ID.

LifecycleEventConfiguration
Type: LifecycleEventConfiguration structure

A LifeCycleEventConfiguration object that specifies the Shutdown event configuration.

Name
Type: string

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

Packages
Type: Array of strings

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

Shortname
Type: string

The layer short name.

StackId
Type: string

The layer stack ID.

Type
Type: string

The layer type.

UseEbsOptimizedInstances
Type: boolean

Whether the layer uses Amazon EBS-optimized instances.

VolumeConfigurations
Type: Array of VolumeConfiguration structures

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

LifecycleEventConfiguration

Description

Specifies the lifecycle event configuration

Members
Shutdown
Type: ShutdownEventConfiguration structure

A ShutdownEventConfiguration object that specifies the Shutdown event configuration.

LoadBasedAutoScalingConfiguration

Description

Describes a layer's load-based auto scaling configuration.

Members
DownScaling
Type: AutoScalingThresholds structure

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

Enable
Type: boolean

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

LayerId
Type: string

The layer ID.

UpScaling
Type: AutoScalingThresholds structure

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

OperatingSystem

Description

Describes supported operating systems in OpsWorks Stacks.

Members
ConfigurationManagers
Type: Array of OperatingSystemConfigurationManager structures

Supported configuration manager name and versions for an OpsWorks Stacks operating system.

Id
Type: string

The ID of a supported operating system, such as Amazon Linux 2.

Name
Type: string

The name of the operating system, such as Amazon Linux 2.

ReportedName
Type: string

A short name for the operating system manufacturer.

ReportedVersion
Type: string

The version of the operating system, including the release and edition, if applicable.

Supported
Type: boolean

Indicates that an operating system is not supported for new instances.

Type
Type: string

The type of a supported operating system, either Linux or Windows.

OperatingSystemConfigurationManager

Description

A block that contains information about the configuration manager (Chef) and the versions of the configuration manager that are supported for an operating system.

Members
Name
Type: string

The name of the configuration manager, which is Chef.

Version
Type: string

The versions of the configuration manager that are supported by an operating system.

Permission

Description

Describes stack or user permissions.

Members
AllowSsh
Type: boolean

Whether the user can use SSH.

AllowSudo
Type: boolean

Whether the user can use sudo.

IamUserArn
Type: string

The Amazon Resource Name (ARN) for an Identity and Access Management (IAM) role. For more information about IAM ARNs, see Using Identifiers.

Level
Type: 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

StackId
Type: string

A stack ID.

RaidArray

Description

Describes an instance's RAID array.

Members
AvailabilityZone
Type: string

The array's Availability Zone. For more information, see Regions and Endpoints.

CreatedAt
Type: string

When the RAID array was created.

Device
Type: string

The array's Linux device. For example /dev/mdadm0.

InstanceId
Type: string

The instance ID.

Iops
Type: int

For PIOPS volumes, the IOPS per disk.

MountPoint
Type: string

The array's mount point.

Name
Type: string

The array name.

NumberOfDisks
Type: int

The number of disks in the array.

RaidArrayId
Type: string

The array ID.

RaidLevel
Type: int
Size
Type: int

The array's size.

StackId
Type: string

The stack ID.

VolumeType
Type: string

The volume type, standard or PIOPS.

RdsDbInstance

Description

Describes an Amazon RDS instance.

Members
Address
Type: string

The instance's address.

DbInstanceIdentifier
Type: string

The database instance identifier.

DbPassword
Type: string

OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

DbUser
Type: string

The master user name.

Engine
Type: string

The instance's database engine.

MissingOnRds
Type: 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.

RdsDbInstanceArn
Type: string

The instance's ARN.

Region
Type: string

The instance's Amazon Web Services Region.

StackId
Type: string

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

Recipes

Description

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. In addition, you can 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.

Members
Configure
Type: Array of strings

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

Deploy
Type: Array of strings

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

Setup
Type: Array of strings

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

Shutdown
Type: Array of strings

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

Undeploy
Type: Array of strings

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

ReportedOs

Description

A registered instance's reported operating system.

Members
Family
Type: string

The operating system family.

Name
Type: string

The operating system name.

Version
Type: string

The operating system version.

ResourceNotFoundException

Description

Indicates that a resource was not found.

Members
message
Type: string

The exception message.

SelfUserProfile

Description

Describes a user's SSH information.

Members
IamUserArn
Type: string

The user's IAM ARN.

Name
Type: string

The user's name.

SshPublicKey
Type: string

The user's SSH public key.

SshUsername
Type: string

The user's SSH user name.

ServiceError

Description

Describes an OpsWorks Stacks service error.

Members
CreatedAt
Type: string

When the error occurred.

InstanceId
Type: string

The instance ID.

Message
Type: string

A message that describes the error.

ServiceErrorId
Type: string

The error ID.

StackId
Type: string

The stack ID.

Type
Type: string

The error type.

ShutdownEventConfiguration

Description

The Shutdown event configuration.

Members
DelayUntilElbConnectionsDrained
Type: boolean

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

ExecutionTimeout
Type: int

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

Source

Description

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

Members
Password
Type: 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.

Revision
Type: 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.

SshKey
Type: string

In requests, the repository's SSH key.

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

Type
Type: string

The repository type.

Url
Type: string

The source URL. The following is an example of an Amazon S3 source URL: https://s3.amazonaws.com/opsworks-demo-bucket/opsworks_cookbook_demo.tar.gz.

Username
Type: 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.

SslConfiguration

Description

Describes an app's SSL configuration.

Members
Certificate
Required: Yes
Type: string

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

Chain
Type: string

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

PrivateKey
Required: Yes
Type: string

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

Stack

Description

Describes a stack.

Members
AgentVersion
Type: string

The agent version. This parameter is set to LATEST for auto-update. or a version number for a fixed agent version.

Arn
Type: string

The stack's ARN.

Attributes
Type: Associative array of custom strings keys (StackAttributesKeys) to strings

The stack's attributes.

ChefConfiguration
Type: ChefConfiguration structure

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

ConfigurationManager
Type: StackConfigurationManager structure

The configuration manager.

CreatedAt
Type: string

The date when the stack was created.

CustomCookbooksSource
Type: Source structure

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

CustomJson
Type: 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.

DefaultAvailabilityZone
Type: string

The stack's default Availability Zone. For more information, see Regions and Endpoints.

DefaultInstanceProfileArn
Type: 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
Type: string

The stack's default operating system.

DefaultRootDeviceType
Type: 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.

DefaultSshKeyName
Type: string

A default Amazon EC2 key pair for the stack's instances. You can override this value when you create or update an instance.

DefaultSubnetId
Type: string

The default subnet ID; applicable only if the stack is running in a VPC.

HostnameTheme
Type: string

The stack host name theme, with spaces replaced by underscores.

Name
Type: string

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

Region
Type: string

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

ServiceRoleArn
Type: string

The stack Identity and Access Management (IAM) role.

StackId
Type: string

The stack ID.

UseCustomCookbooks
Type: boolean

Whether the stack uses custom cookbooks.

UseOpsworksSecurityGroups
Type: boolean

Whether the stack automatically associates the OpsWorks Stacks built-in security groups with the stack's layers.

VpcId
Type: string

The VPC ID; applicable only if the stack is running in a VPC.

StackConfigurationManager

Description

Describes the configuration manager.

Members
Name
Type: string

The name. This parameter must be set to Chef.

Version
Type: 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.

StackSummary

Description

Summarizes the number of layers, instances, and apps in a stack.

Members
AppsCount
Type: int

The number of apps.

Arn
Type: string

The stack's ARN.

InstancesCount
Type: InstancesCount structure

An InstancesCount object with the number of instances in each status.

LayersCount
Type: int

The number of layers.

Name
Type: string

The stack name.

StackId
Type: string

The stack ID.

TemporaryCredential

Description

Contains the data needed by RDP clients such as the Microsoft Remote Desktop Connection to log in to the instance.

Members
InstanceId
Type: string

The instance's OpsWorks Stacks ID.

Password
Type: string

The password.

Username
Type: string

The user name.

ValidForInMinutes
Type: int

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.

TimeBasedAutoScalingConfiguration

Description

Describes an instance's time-based auto scaling configuration.

Members
AutoScalingSchedule
Type: WeeklyAutoScalingSchedule structure

A WeeklyAutoScalingSchedule object with the instance schedule.

InstanceId
Type: string

The instance ID.

UserProfile

Description

Describes a user's SSH information.

Members
AllowSelfManagement
Type: boolean

Whether users can specify their own SSH public key through the My Settings page. For more information, see Managing User Permissions.

IamUserArn
Type: string

The user's IAM ARN.

Name
Type: string

The user's name.

SshPublicKey
Type: string

The user's SSH public key.

SshUsername
Type: string

The user's SSH user name.

ValidationException

Description

Indicates that a request was not valid.

Members
message
Type: string

The exception message.

Volume

Description

Describes an instance's Amazon EBS volume.

Members
AvailabilityZone
Type: string

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

Device
Type: string

The device name.

Ec2VolumeId
Type: string

The Amazon EC2 volume ID.

Encrypted
Type: boolean

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

InstanceId
Type: string

The instance ID.

Iops
Type: int

For PIOPS volumes, the IOPS per disk.

MountPoint
Type: string

The volume mount point. For example, "/mnt/disk1".

Name
Type: string

The volume name. Volume names are a maximum of 128 characters.

RaidArrayId
Type: string

The RAID array ID.

Region
Type: string

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

Size
Type: int

The volume size.

Status
Type: string

The value returned by DescribeVolumes.

VolumeId
Type: string

The volume ID.

VolumeType
Type: 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.

VolumeConfiguration

Description

Describes an Amazon EBS volume configuration.

Members
Encrypted
Type: boolean

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

Iops
Type: int

For PIOPS volumes, the IOPS per disk.

MountPoint
Required: Yes
Type: string

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

NumberOfDisks
Required: Yes
Type: int

The number of disks in the volume.

RaidLevel
Type: int

The volume RAID level.

Size
Required: Yes
Type: int

The volume size.

VolumeType
Type: 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.

WeeklyAutoScalingSchedule

Description

Describes a time-based instance's auto scaling schedule. The schedule consists of a set of key-value pairs.

  • The key is the time period (a UTC hour) and must be an integer from 0 - 23.

  • The value indicates whether the instance should be online or offline for the specified period, and must be set to "on" or "off"

The default setting for all time periods is off, so you use the following parameters primarily to specify the online periods. You don't have to explicitly specify offline periods unless you want to change an online period to an offline period.

The following example specifies that the instance should be online for four hours, from UTC 1200 - 1600. It will be off for the remainder of the day.

{ "12":"on", "13":"on", "14":"on", "15":"on" }

Members
Friday
Type: Associative array of custom strings keys (Hour) to strings

The schedule for Friday.

Monday
Type: Associative array of custom strings keys (Hour) to strings

The schedule for Monday.

Saturday
Type: Associative array of custom strings keys (Hour) to strings

The schedule for Saturday.

Sunday
Type: Associative array of custom strings keys (Hour) to strings

The schedule for Sunday.

Thursday
Type: Associative array of custom strings keys (Hour) to strings

The schedule for Thursday.

Tuesday
Type: Associative array of custom strings keys (Hour) to strings

The schedule for Tuesday.

Wednesday
Type: Associative array of custom strings keys (Hour) to strings

The schedule for Wednesday.