Table of Contents
OpsWorks.
Client
¶A low-level client representing AWS OpsWorks:
import boto3
client = boto3.client('opsworks')
These are the available methods:
assign_instance()
assign_volume()
associate_elastic_ip()
attach_elastic_load_balancer()
can_paginate()
clone_stack()
create_app()
create_deployment()
create_instance()
create_layer()
create_stack()
create_user_profile()
delete_app()
delete_instance()
delete_layer()
delete_stack()
delete_user_profile()
deregister_ecs_cluster()
deregister_elastic_ip()
deregister_instance()
deregister_rds_db_instance()
deregister_volume()
describe_agent_versions()
describe_apps()
describe_commands()
describe_deployments()
describe_ecs_clusters()
describe_elastic_ips()
describe_elastic_load_balancers()
describe_instances()
describe_layers()
describe_load_based_auto_scaling()
describe_my_user_profile()
describe_permissions()
describe_raid_arrays()
describe_rds_db_instances()
describe_service_errors()
describe_stack_provisioning_parameters()
describe_stack_summary()
describe_stacks()
describe_time_based_auto_scaling()
describe_user_profiles()
describe_volumes()
detach_elastic_load_balancer()
disassociate_elastic_ip()
generate_presigned_url()
get_hostname_suggestion()
get_paginator()
get_waiter()
grant_access()
reboot_instance()
register_ecs_cluster()
register_elastic_ip()
register_instance()
register_rds_db_instance()
register_volume()
set_load_based_auto_scaling()
set_permission()
set_time_based_auto_scaling()
start_instance()
start_stack()
stop_instance()
stop_stack()
unassign_instance()
unassign_volume()
update_app()
update_elastic_ip()
update_instance()
update_layer()
update_my_user_profile()
update_rds_db_instance()
update_stack()
update_user_profile()
update_volume()
assign_instance
(**kwargs)¶Assign a registered instance to a layer.
Required Permissions : To use this action, an AWS Identity and Access Management (IAM) user must have a Manage permissions level for the stack or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.assign_instance(
InstanceId='string',
LayerIds=[
'string',
]
)
Parameters: |
|
---|---|
Returns: | None |
assign_volume
(**kwargs)¶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 .
Request Syntax
response = client.assign_volume(
VolumeId='string',
InstanceId='string'
)
Parameters: |
|
---|---|
Returns: | None |
associate_elastic_ip
(**kwargs)¶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 .
Request Syntax
response = client.associate_elastic_ip(
ElasticIp='string',
InstanceId='string'
)
Parameters: |
|
---|---|
Returns: | None |
attach_elastic_load_balancer
(**kwargs)¶Attaches an Elastic Load Balancing load balancer to a specified layer. For more information, see Elastic Load Balancing .
Note
You must create the Elastic Load Balancing instance separately, by using the Elastic Load Balancing console, API, or CLI. For more information, see 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 .
Request Syntax
response = client.attach_elastic_load_balancer(
ElasticLoadBalancerName='string',
LayerId='string'
)
Parameters: |
|
---|---|
Returns: | None |
can_paginate
(operation_name)¶Check if an operation can be paginated.
Parameters: | operation_name (string) -- The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo , and you'd normally invoke the
operation as client.create_foo(**kwargs) , if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo") . |
---|---|
Returns: | True if the operation can be paginated,
False otherwise. |
clone_stack
(**kwargs)¶Creates a clone of a specified stack. For more information, see Clone a Stack . By default, all parameters are set to the values used by the parent stack.
Required Permissions : To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.clone_stack(
SourceStackId='string',
Name='string',
Region='string',
VpcId='string',
Attributes={
'string': 'string'
},
ServiceRoleArn='string',
DefaultInstanceProfileArn='string',
DefaultOs='string',
HostnameTheme='string',
DefaultAvailabilityZone='string',
DefaultSubnetId='string',
CustomJson='string',
ConfigurationManager={
'Name': 'string',
'Version': 'string'
},
ChefConfiguration={
'ManageBerkshelf': True|False,
'BerkshelfVersion': 'string'
},
UseCustomCookbooks=True|False,
UseOpsworksSecurityGroups=True|False,
CustomCookbooksSource={
'Type': 'git'|'svn'|'archive'|'s3',
'Url': 'string',
'Username': 'string',
'Password': 'string',
'SshKey': 'string',
'Revision': 'string'
},
DefaultSshKeyName='string',
ClonePermissions=True|False,
CloneAppIds=[
'string',
],
DefaultRootDeviceType='ebs'|'instance-store',
AgentVersion='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'StackId': 'string'
}
Response Structure
|
create_app
(**kwargs)¶Creates an app for a specified stack. For more information, see Creating Apps .
Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.create_app(
StackId='string',
Shortname='string',
Name='string',
Description='string',
DataSources=[
{
'Type': 'string',
'Arn': 'string',
'DatabaseName': 'string'
},
],
Type='aws-flow-ruby'|'java'|'rails'|'php'|'nodejs'|'static'|'other',
AppSource={
'Type': 'git'|'svn'|'archive'|'s3',
'Url': 'string',
'Username': 'string',
'Password': 'string',
'SshKey': 'string',
'Revision': 'string'
},
Domains=[
'string',
],
EnableSsl=True|False,
SslConfiguration={
'Certificate': 'string',
'PrivateKey': 'string',
'Chain': 'string'
},
Attributes={
'string': 'string'
},
Environment=[
{
'Key': 'string',
'Value': 'string',
'Secure': True|False
},
]
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'AppId': 'string'
}
Response Structure
|
create_deployment
(**kwargs)¶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 .
Request Syntax
response = client.create_deployment(
StackId='string',
AppId='string',
InstanceIds=[
'string',
],
Command={
'Name': 'install_dependencies'|'update_dependencies'|'update_custom_cookbooks'|'execute_recipes'|'configure'|'setup'|'deploy'|'rollback'|'start'|'stop'|'restart'|'undeploy',
'Args': {
'string': [
'string',
]
}
},
Comment='string',
CustomJson='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'DeploymentId': 'string'
}
Response Structure
|
create_instance
(**kwargs)¶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 .
Request Syntax
response = client.create_instance(
StackId='string',
LayerIds=[
'string',
],
InstanceType='string',
AutoScalingType='load'|'timer',
Hostname='string',
Os='string',
AmiId='string',
SshKeyName='string',
AvailabilityZone='string',
VirtualizationType='string',
SubnetId='string',
Architecture='x86_64'|'i386',
RootDeviceType='ebs'|'instance-store',
BlockDeviceMappings=[
{
'DeviceName': 'string',
'NoDevice': 'string',
'VirtualName': 'string',
'Ebs': {
'SnapshotId': 'string',
'Iops': 123,
'VolumeSize': 123,
'VolumeType': 'gp2'|'io1'|'standard',
'DeleteOnTermination': True|False
}
},
],
InstallUpdatesOnBoot=True|False,
EbsOptimized=True|False,
AgentVersion='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'InstanceId': 'string'
}
Response Structure
|
create_layer
(**kwargs)¶Creates a layer. For more information, see How to Create a Layer .
Note
You should use CreateLayer for noncustom layer types such as PHP App Server only if the stack does not have an existing layer of that type. A stack can have at most one instance of each noncustom layer; if you attempt to create a second instance, CreateLayer fails. A stack can have an arbitrary number of custom layers, so you can call CreateLayer as many times as you like for that layer type.
Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.create_layer(
StackId='string',
Type='aws-flow-ruby'|'ecs-cluster'|'java-app'|'lb'|'web'|'php-app'|'rails-app'|'nodejs-app'|'memcached'|'db-master'|'monitoring-master'|'custom',
Name='string',
Shortname='string',
Attributes={
'string': 'string'
},
CustomInstanceProfileArn='string',
CustomJson='string',
CustomSecurityGroupIds=[
'string',
],
Packages=[
'string',
],
VolumeConfigurations=[
{
'MountPoint': 'string',
'RaidLevel': 123,
'NumberOfDisks': 123,
'Size': 123,
'VolumeType': 'string',
'Iops': 123
},
],
EnableAutoHealing=True|False,
AutoAssignElasticIps=True|False,
AutoAssignPublicIps=True|False,
CustomRecipes={
'Setup': [
'string',
],
'Configure': [
'string',
],
'Deploy': [
'string',
],
'Undeploy': [
'string',
],
'Shutdown': [
'string',
]
},
InstallUpdatesOnBoot=True|False,
UseEbsOptimizedInstances=True|False,
LifecycleEventConfiguration={
'Shutdown': {
'ExecutionTimeout': 123,
'DelayUntilElbConnectionsDrained': True|False
}
}
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'LayerId': 'string'
}
Response Structure
|
create_stack
(**kwargs)¶Creates a new stack. For more information, see Create a New Stack .
Required Permissions : To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.create_stack(
Name='string',
Region='string',
VpcId='string',
Attributes={
'string': 'string'
},
ServiceRoleArn='string',
DefaultInstanceProfileArn='string',
DefaultOs='string',
HostnameTheme='string',
DefaultAvailabilityZone='string',
DefaultSubnetId='string',
CustomJson='string',
ConfigurationManager={
'Name': 'string',
'Version': 'string'
},
ChefConfiguration={
'ManageBerkshelf': True|False,
'BerkshelfVersion': 'string'
},
UseCustomCookbooks=True|False,
UseOpsworksSecurityGroups=True|False,
CustomCookbooksSource={
'Type': 'git'|'svn'|'archive'|'s3',
'Url': 'string',
'Username': 'string',
'Password': 'string',
'SshKey': 'string',
'Revision': 'string'
},
DefaultSshKeyName='string',
DefaultRootDeviceType='ebs'|'instance-store',
AgentVersion='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'StackId': 'string'
}
Response Structure
|
create_user_profile
(**kwargs)¶Creates a new user profile.
Required Permissions : To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.create_user_profile(
IamUserArn='string',
SshUsername='string',
SshPublicKey='string',
AllowSelfManagement=True|False
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'IamUserArn': 'string'
}
Response Structure
|
delete_app
(**kwargs)¶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 .
Request Syntax
response = client.delete_app(
AppId='string'
)
Parameters: | AppId (string) -- [REQUIRED] The app ID. |
---|---|
Returns: | None |
delete_instance
(**kwargs)¶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 .
Request Syntax
response = client.delete_instance(
InstanceId='string',
DeleteElasticIp=True|False,
DeleteVolumes=True|False
)
Parameters: |
|
---|---|
Returns: | None |
delete_layer
(**kwargs)¶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 .
Request Syntax
response = client.delete_layer(
LayerId='string'
)
Parameters: | LayerId (string) -- [REQUIRED] The layer ID. |
---|---|
Returns: | None |
delete_stack
(**kwargs)¶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 .
Request Syntax
response = client.delete_stack(
StackId='string'
)
Parameters: | StackId (string) -- [REQUIRED] The stack ID. |
---|---|
Returns: | None |
delete_user_profile
(**kwargs)¶Deletes a user profile.
Required Permissions : To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.delete_user_profile(
IamUserArn='string'
)
Parameters: | IamUserArn (string) -- [REQUIRED] The user's IAM ARN. |
---|---|
Returns: | None |
deregister_ecs_cluster
(**kwargs)¶Deregisters a specified Amazon ECS cluster from a stack. For more information, see Resource Management .
Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack or an attached policy that explicitly grants permissions. For more information on user permissions, see http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html .
Request Syntax
response = client.deregister_ecs_cluster(
EcsClusterArn='string'
)
Parameters: | EcsClusterArn (string) -- [REQUIRED] The cluster's ARN. |
---|---|
Returns: | None |
deregister_elastic_ip
(**kwargs)¶Deregisters a specified Elastic IP address. The address can then be registered by another stack. For more information, see Resource Management .
Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.deregister_elastic_ip(
ElasticIp='string'
)
Parameters: | ElasticIp (string) -- [REQUIRED] The Elastic IP address. |
---|---|
Returns: | None |
deregister_instance
(**kwargs)¶Deregister a registered Amazon EC2 or on-premises instance. This action removes the instance from the stack and returns it to your control. This action can not be used with instances that were created with AWS OpsWorks.
Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.deregister_instance(
InstanceId='string'
)
Parameters: | InstanceId (string) -- [REQUIRED] The instance ID. |
---|---|
Returns: | None |
deregister_rds_db_instance
(**kwargs)¶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 .
Request Syntax
response = client.deregister_rds_db_instance(
RdsDbInstanceArn='string'
)
Parameters: | RdsDbInstanceArn (string) -- [REQUIRED] The Amazon RDS instance's ARN. |
---|---|
Returns: | None |
deregister_volume
(**kwargs)¶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 .
Request Syntax
response = client.deregister_volume(
VolumeId='string'
)
Parameters: | VolumeId (string) -- [REQUIRED] The AWS OpsWorks volume ID, which is the GUID that AWS OpsWorks assigned to the instance when you registered the volume with the stack, not the Amazon EC2 volume ID. |
---|---|
Returns: | None |
describe_agent_versions
(**kwargs)¶Describes the available AWS OpsWorks agent versions. You must specify a stack ID or a configuration manager. DescribeAgentVersions
returns a list of available agent versions for the specified stack or configuration manager.
Request Syntax
response = client.describe_agent_versions(
StackId='string',
ConfigurationManager={
'Name': 'string',
'Version': 'string'
}
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'AgentVersions': [
{
'Version': 'string',
'ConfigurationManager': {
'Name': 'string',
'Version': 'string'
}
},
]
}
Response Structure
|
describe_apps
(**kwargs)¶Requests a description of a specified set of apps.
Note
You must specify at least one of the parameters.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_apps(
StackId='string',
AppIds=[
'string',
]
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'Apps': [
{
'AppId': 'string',
'StackId': 'string',
'Shortname': 'string',
'Name': 'string',
'Description': 'string',
'DataSources': [
{
'Type': 'string',
'Arn': 'string',
'DatabaseName': 'string'
},
],
'Type': 'aws-flow-ruby'|'java'|'rails'|'php'|'nodejs'|'static'|'other',
'AppSource': {
'Type': 'git'|'svn'|'archive'|'s3',
'Url': 'string',
'Username': 'string',
'Password': 'string',
'SshKey': 'string',
'Revision': 'string'
},
'Domains': [
'string',
],
'EnableSsl': True|False,
'SslConfiguration': {
'Certificate': 'string',
'PrivateKey': 'string',
'Chain': 'string'
},
'Attributes': {
'string': 'string'
},
'CreatedAt': 'string',
'Environment': [
{
'Key': 'string',
'Value': 'string',
'Secure': True|False
},
]
},
]
}
Response Structure
|
describe_commands
(**kwargs)¶Describes the results of specified commands.
Note
You must specify at least one of the parameters.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_commands(
DeploymentId='string',
InstanceId='string',
CommandIds=[
'string',
]
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'Commands': [
{
'CommandId': 'string',
'InstanceId': 'string',
'DeploymentId': 'string',
'CreatedAt': 'string',
'AcknowledgedAt': 'string',
'CompletedAt': 'string',
'Status': 'string',
'ExitCode': 123,
'LogUrl': 'string',
'Type': 'string'
},
]
}
Response Structure
|
describe_deployments
(**kwargs)¶Requests a description of a specified set of deployments.
Note
You must specify at least one of the parameters.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_deployments(
StackId='string',
AppId='string',
DeploymentIds=[
'string',
]
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'Deployments': [
{
'DeploymentId': 'string',
'StackId': 'string',
'AppId': 'string',
'CreatedAt': 'string',
'CompletedAt': 'string',
'Duration': 123,
'IamUserArn': 'string',
'Comment': 'string',
'Command': {
'Name': 'install_dependencies'|'update_dependencies'|'update_custom_cookbooks'|'execute_recipes'|'configure'|'setup'|'deploy'|'rollback'|'start'|'stop'|'restart'|'undeploy',
'Args': {
'string': [
'string',
]
}
},
'Status': 'string',
'CustomJson': 'string',
'InstanceIds': [
'string',
]
},
]
}
Response Structure
|
describe_ecs_clusters
(**kwargs)¶Describes Amazon ECS clusters that are registered with a stack. If you specify only a stack ID, you can use the MaxResults
and NextToken
parameters to paginate the response. However, AWS OpsWorks currently supports only one cluster per layer, so the result set has a maximum of one element.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack or an attached policy that explicitly grants permission. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_ecs_clusters(
EcsClusterArns=[
'string',
],
StackId='string',
NextToken='string',
MaxResults=123
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'EcsClusters': [
{
'EcsClusterArn': 'string',
'EcsClusterName': 'string',
'StackId': 'string',
'RegisteredAt': 'string'
},
],
'NextToken': 'string'
}
Response Structure
|
describe_elastic_ips
(**kwargs)¶Describes Elastic IP addresses .
Note
You must specify at least one of the parameters.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_elastic_ips(
InstanceId='string',
StackId='string',
Ips=[
'string',
]
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'ElasticIps': [
{
'Ip': 'string',
'Name': 'string',
'Domain': 'string',
'Region': 'string',
'InstanceId': 'string'
},
]
}
Response Structure
|
describe_elastic_load_balancers
(**kwargs)¶Describes a stack's Elastic Load Balancing instances.
Note
You must specify at least one of the parameters.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_elastic_load_balancers(
StackId='string',
LayerIds=[
'string',
]
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'ElasticLoadBalancers': [
{
'ElasticLoadBalancerName': 'string',
'Region': 'string',
'DnsName': 'string',
'StackId': 'string',
'LayerId': 'string',
'VpcId': 'string',
'AvailabilityZones': [
'string',
],
'SubnetIds': [
'string',
],
'Ec2InstanceIds': [
'string',
]
},
]
}
Response Structure
|
describe_instances
(**kwargs)¶Requests a description of a set of instances.
Note
You must specify at least one of the parameters.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_instances(
StackId='string',
LayerId='string',
InstanceIds=[
'string',
]
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'Instances': [
{
'AgentVersion': 'string',
'AmiId': 'string',
'Architecture': 'x86_64'|'i386',
'AutoScalingType': 'load'|'timer',
'AvailabilityZone': 'string',
'BlockDeviceMappings': [
{
'DeviceName': 'string',
'NoDevice': 'string',
'VirtualName': 'string',
'Ebs': {
'SnapshotId': 'string',
'Iops': 123,
'VolumeSize': 123,
'VolumeType': 'gp2'|'io1'|'standard',
'DeleteOnTermination': True|False
}
},
],
'CreatedAt': 'string',
'EbsOptimized': True|False,
'Ec2InstanceId': 'string',
'EcsClusterArn': 'string',
'EcsContainerInstanceArn': 'string',
'ElasticIp': 'string',
'Hostname': 'string',
'InfrastructureClass': 'string',
'InstallUpdatesOnBoot': True|False,
'InstanceId': 'string',
'InstanceProfileArn': 'string',
'InstanceType': 'string',
'LastServiceErrorId': 'string',
'LayerIds': [
'string',
],
'Os': 'string',
'Platform': 'string',
'PrivateDns': 'string',
'PrivateIp': 'string',
'PublicDns': 'string',
'PublicIp': 'string',
'RegisteredBy': 'string',
'ReportedAgentVersion': 'string',
'ReportedOs': {
'Family': 'string',
'Name': 'string',
'Version': 'string'
},
'RootDeviceType': 'ebs'|'instance-store',
'RootDeviceVolumeId': 'string',
'SecurityGroupIds': [
'string',
],
'SshHostDsaKeyFingerprint': 'string',
'SshHostRsaKeyFingerprint': 'string',
'SshKeyName': 'string',
'StackId': 'string',
'Status': 'string',
'SubnetId': 'string',
'VirtualizationType': 'paravirtual'|'hvm'
},
]
}
Response Structure
|
describe_layers
(**kwargs)¶Requests a description of one or more layers in a specified stack.
Note
You must specify at least one of the parameters.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_layers(
StackId='string',
LayerIds=[
'string',
]
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'Layers': [
{
'StackId': 'string',
'LayerId': 'string',
'Type': 'aws-flow-ruby'|'ecs-cluster'|'java-app'|'lb'|'web'|'php-app'|'rails-app'|'nodejs-app'|'memcached'|'db-master'|'monitoring-master'|'custom',
'Name': 'string',
'Shortname': 'string',
'Attributes': {
'string': 'string'
},
'CustomInstanceProfileArn': 'string',
'CustomJson': 'string',
'CustomSecurityGroupIds': [
'string',
],
'DefaultSecurityGroupNames': [
'string',
],
'Packages': [
'string',
],
'VolumeConfigurations': [
{
'MountPoint': 'string',
'RaidLevel': 123,
'NumberOfDisks': 123,
'Size': 123,
'VolumeType': 'string',
'Iops': 123
},
],
'EnableAutoHealing': True|False,
'AutoAssignElasticIps': True|False,
'AutoAssignPublicIps': True|False,
'DefaultRecipes': {
'Setup': [
'string',
],
'Configure': [
'string',
],
'Deploy': [
'string',
],
'Undeploy': [
'string',
],
'Shutdown': [
'string',
]
},
'CustomRecipes': {
'Setup': [
'string',
],
'Configure': [
'string',
],
'Deploy': [
'string',
],
'Undeploy': [
'string',
],
'Shutdown': [
'string',
]
},
'CreatedAt': 'string',
'InstallUpdatesOnBoot': True|False,
'UseEbsOptimizedInstances': True|False,
'LifecycleEventConfiguration': {
'Shutdown': {
'ExecutionTimeout': 123,
'DelayUntilElbConnectionsDrained': True|False
}
}
},
]
}
Response Structure
|
describe_load_based_auto_scaling
(**kwargs)¶Describes load-based auto scaling configurations for specified layers.
Note
You must specify at least one of the parameters.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_load_based_auto_scaling(
LayerIds=[
'string',
]
)
Parameters: | LayerIds (list) -- [REQUIRED] An array of layer IDs.
|
---|---|
Return type: | dict |
Returns: | Response Syntax{
'LoadBasedAutoScalingConfigurations': [
{
'LayerId': 'string',
'Enable': True|False,
'UpScaling': {
'InstanceCount': 123,
'ThresholdsWaitTime': 123,
'IgnoreMetricsTime': 123,
'CpuThreshold': 123.0,
'MemoryThreshold': 123.0,
'LoadThreshold': 123.0,
'Alarms': [
'string',
]
},
'DownScaling': {
'InstanceCount': 123,
'ThresholdsWaitTime': 123,
'IgnoreMetricsTime': 123,
'CpuThreshold': 123.0,
'MemoryThreshold': 123.0,
'LoadThreshold': 123.0,
'Alarms': [
'string',
]
}
},
]
}
Response Structure
|
describe_my_user_profile
()¶Describes a user's SSH information.
Required Permissions : To use this action, an IAM user must have self-management enabled or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_my_user_profile()
Return type: | dict |
---|---|
Returns: | Response Syntax{
'UserProfile': {
'IamUserArn': 'string',
'Name': 'string',
'SshUsername': 'string',
'SshPublicKey': 'string'
}
}
Response Structure
|
describe_permissions
(**kwargs)¶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 .
Request Syntax
response = client.describe_permissions(
IamUserArn='string',
StackId='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'Permissions': [
{
'StackId': 'string',
'IamUserArn': 'string',
'AllowSsh': True|False,
'AllowSudo': True|False,
'Level': 'string'
},
]
}
Response Structure
|
describe_raid_arrays
(**kwargs)¶Describe an instance's RAID arrays.
Note
You must specify at least one of the parameters.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_raid_arrays(
InstanceId='string',
StackId='string',
RaidArrayIds=[
'string',
]
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'RaidArrays': [
{
'RaidArrayId': 'string',
'InstanceId': 'string',
'Name': 'string',
'RaidLevel': 123,
'NumberOfDisks': 123,
'Size': 123,
'Device': 'string',
'MountPoint': 'string',
'AvailabilityZone': 'string',
'CreatedAt': 'string',
'StackId': 'string',
'VolumeType': 'string',
'Iops': 123
},
]
}
Response Structure
|
describe_rds_db_instances
(**kwargs)¶Describes Amazon RDS instances.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_rds_db_instances(
StackId='string',
RdsDbInstanceArns=[
'string',
]
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'RdsDbInstances': [
{
'RdsDbInstanceArn': 'string',
'DbInstanceIdentifier': 'string',
'DbUser': 'string',
'DbPassword': 'string',
'Region': 'string',
'Address': 'string',
'Engine': 'string',
'StackId': 'string',
'MissingOnRds': True|False
},
]
}
Response Structure
|
describe_service_errors
(**kwargs)¶Describes AWS OpsWorks service errors.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_service_errors(
StackId='string',
InstanceId='string',
ServiceErrorIds=[
'string',
]
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'ServiceErrors': [
{
'ServiceErrorId': 'string',
'StackId': 'string',
'InstanceId': 'string',
'Type': 'string',
'Message': 'string',
'CreatedAt': 'string'
},
]
}
Response Structure
|
describe_stack_provisioning_parameters
(**kwargs)¶Requests a description of a stack's provisioning parameters.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_stack_provisioning_parameters(
StackId='string'
)
Parameters: | StackId (string) -- [REQUIRED] The stack ID |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'AgentInstallerUrl': 'string',
'Parameters': {
'string': 'string'
}
}
Response Structure
|
describe_stack_summary
(**kwargs)¶Describes the number of layers and apps in a specified stack, and the number of instances in each state, such as running_setup
or online
.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_stack_summary(
StackId='string'
)
Parameters: | StackId (string) -- [REQUIRED] The stack ID. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'StackSummary': {
'StackId': 'string',
'Name': 'string',
'Arn': 'string',
'LayersCount': 123,
'AppsCount': 123,
'InstancesCount': {
'Assigning': 123,
'Booting': 123,
'ConnectionLost': 123,
'Deregistering': 123,
'Online': 123,
'Pending': 123,
'Rebooting': 123,
'Registered': 123,
'Registering': 123,
'Requested': 123,
'RunningSetup': 123,
'SetupFailed': 123,
'ShuttingDown': 123,
'StartFailed': 123,
'Stopped': 123,
'Stopping': 123,
'Terminated': 123,
'Terminating': 123,
'Unassigning': 123
}
}
}
Response Structure
|
describe_stacks
(**kwargs)¶Requests a description of one or more stacks.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_stacks(
StackIds=[
'string',
]
)
Parameters: | StackIds (list) -- An array of stack IDs that specify the stacks to be described. If you omit this parameter,
|
---|---|
Return type: | dict |
Returns: | Response Syntax{
'Stacks': [
{
'StackId': 'string',
'Name': 'string',
'Arn': 'string',
'Region': 'string',
'VpcId': 'string',
'Attributes': {
'string': 'string'
},
'ServiceRoleArn': 'string',
'DefaultInstanceProfileArn': 'string',
'DefaultOs': 'string',
'HostnameTheme': 'string',
'DefaultAvailabilityZone': 'string',
'DefaultSubnetId': 'string',
'CustomJson': 'string',
'ConfigurationManager': {
'Name': 'string',
'Version': 'string'
},
'ChefConfiguration': {
'ManageBerkshelf': True|False,
'BerkshelfVersion': 'string'
},
'UseCustomCookbooks': True|False,
'UseOpsworksSecurityGroups': True|False,
'CustomCookbooksSource': {
'Type': 'git'|'svn'|'archive'|'s3',
'Url': 'string',
'Username': 'string',
'Password': 'string',
'SshKey': 'string',
'Revision': 'string'
},
'DefaultSshKeyName': 'string',
'CreatedAt': 'string',
'DefaultRootDeviceType': 'ebs'|'instance-store',
'AgentVersion': 'string'
},
]
}
Response Structure
|
describe_time_based_auto_scaling
(**kwargs)¶Describes time-based auto scaling configurations for specified instances.
Note
You must specify at least one of the parameters.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_time_based_auto_scaling(
InstanceIds=[
'string',
]
)
Parameters: | InstanceIds (list) -- [REQUIRED] An array of instance IDs.
|
---|---|
Return type: | dict |
Returns: | Response Syntax{
'TimeBasedAutoScalingConfigurations': [
{
'InstanceId': 'string',
'AutoScalingSchedule': {
'Monday': {
'string': 'string'
},
'Tuesday': {
'string': 'string'
},
'Wednesday': {
'string': 'string'
},
'Thursday': {
'string': 'string'
},
'Friday': {
'string': 'string'
},
'Saturday': {
'string': 'string'
},
'Sunday': {
'string': 'string'
}
}
},
]
}
Response Structure
|
describe_user_profiles
(**kwargs)¶Describe specified users.
Required Permissions : To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_user_profiles(
IamUserArns=[
'string',
]
)
Parameters: | IamUserArns (list) -- An array of IAM user ARNs that identify the users to be described.
|
---|---|
Return type: | dict |
Returns: | Response Syntax{
'UserProfiles': [
{
'IamUserArn': 'string',
'Name': 'string',
'SshUsername': 'string',
'SshPublicKey': 'string',
'AllowSelfManagement': True|False
},
]
}
Response Structure
|
describe_volumes
(**kwargs)¶Describes an instance's Amazon EBS volumes.
Note
You must specify at least one of the parameters.
Required Permissions : To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.describe_volumes(
InstanceId='string',
StackId='string',
RaidArrayId='string',
VolumeIds=[
'string',
]
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'Volumes': [
{
'VolumeId': 'string',
'Ec2VolumeId': 'string',
'Name': 'string',
'RaidArrayId': 'string',
'InstanceId': 'string',
'Status': 'string',
'Size': 123,
'Device': 'string',
'MountPoint': 'string',
'Region': 'string',
'AvailabilityZone': 'string',
'VolumeType': 'string',
'Iops': 123
},
]
}
Response Structure
|
detach_elastic_load_balancer
(**kwargs)¶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 .
Request Syntax
response = client.detach_elastic_load_balancer(
ElasticLoadBalancerName='string',
LayerId='string'
)
Parameters: |
|
---|---|
Returns: | None |
disassociate_elastic_ip
(**kwargs)¶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 .
Request Syntax
response = client.disassociate_elastic_ip(
ElasticIp='string'
)
Parameters: | ElasticIp (string) -- [REQUIRED] The Elastic IP address. |
---|---|
Returns: | None |
generate_presigned_url
(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
Parameters: |
|
---|---|
Returns: | The presigned url |
get_hostname_suggestion
(**kwargs)¶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 .
Request Syntax
response = client.get_hostname_suggestion(
LayerId='string'
)
Parameters: | LayerId (string) -- [REQUIRED] The layer ID. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'LayerId': 'string',
'Hostname': 'string'
}
Response Structure
|
get_paginator
(operation_name)¶Create a paginator for an operation.
Parameters: | operation_name (string) -- The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo , and you'd normally invoke the
operation as client.create_foo(**kwargs) , if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo") . |
---|---|
Raises OperationNotPageableError: | |
Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
|
Return type: | L{botocore.paginate.Paginator} |
Returns: | A paginator object. |
get_waiter
(waiter_name)¶grant_access
(**kwargs)¶Note
This action can be used only with Windows stacks.
Grants RDP access to a Windows instance for a specified time period.
Request Syntax
response = client.grant_access(
InstanceId='string',
ValidForInMinutes=123
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'TemporaryCredential': {
'Username': 'string',
'Password': 'string',
'ValidForInMinutes': 123,
'InstanceId': 'string'
}
}
Response Structure
|
reboot_instance
(**kwargs)¶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 .
Request Syntax
response = client.reboot_instance(
InstanceId='string'
)
Parameters: | InstanceId (string) -- [REQUIRED] The instance ID. |
---|---|
Returns: | None |
register_ecs_cluster
(**kwargs)¶Registers a specified Amazon ECS cluster with a stack. You can register only one cluster with a stack. A cluster can be registered with only one stack. For more information, see Resource Management .
Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.register_ecs_cluster(
EcsClusterArn='string',
StackId='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'EcsClusterArn': 'string'
}
Response Structure
|
register_elastic_ip
(**kwargs)¶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 .
Request Syntax
response = client.register_elastic_ip(
ElasticIp='string',
StackId='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'ElasticIp': 'string'
}
Response Structure
|
register_instance
(**kwargs)¶Registers instances with a specified stack that were created outside of AWS OpsWorks.
Note
We do not recommend using this action to register instances. The complete registration operation has two primary steps, installing the AWS OpsWorks agent on the instance and registering the instance with the stack. RegisterInstance
handles only the second step. You should instead use the AWS CLI register
command, which performs the entire registration operation. For more information, see Registering an Instance with an AWS OpsWorks Stack .
Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.register_instance(
StackId='string',
Hostname='string',
PublicIp='string',
PrivateIp='string',
RsaPublicKey='string',
RsaPublicKeyFingerprint='string',
InstanceIdentity={
'Document': 'string',
'Signature': 'string'
}
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'InstanceId': 'string'
}
Response Structure
|
register_rds_db_instance
(**kwargs)¶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 .
Request Syntax
response = client.register_rds_db_instance(
StackId='string',
RdsDbInstanceArn='string',
DbUser='string',
DbPassword='string'
)
Parameters: |
|
---|---|
Returns: | None |
register_volume
(**kwargs)¶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 .
Request Syntax
response = client.register_volume(
Ec2VolumeId='string',
StackId='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'VolumeId': 'string'
}
Response Structure
|
set_load_based_auto_scaling
(**kwargs)¶Specify the load-based auto scaling configuration for a specified layer. For more information, see Managing Load with Time-based and Load-based Instances .
Note
To use load-based auto scaling, you must create a set of load-based auto scaling instances. Load-based auto scaling operates only on the instances from that set, so you must ensure that you have created enough instances to handle the maximum anticipated load.
Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.set_load_based_auto_scaling(
LayerId='string',
Enable=True|False,
UpScaling={
'InstanceCount': 123,
'ThresholdsWaitTime': 123,
'IgnoreMetricsTime': 123,
'CpuThreshold': 123.0,
'MemoryThreshold': 123.0,
'LoadThreshold': 123.0,
'Alarms': [
'string',
]
},
DownScaling={
'InstanceCount': 123,
'ThresholdsWaitTime': 123,
'IgnoreMetricsTime': 123,
'CpuThreshold': 123.0,
'MemoryThreshold': 123.0,
'LoadThreshold': 123.0,
'Alarms': [
'string',
]
}
)
Parameters: |
|
---|---|
Returns: | None |
set_permission
(**kwargs)¶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 .
Request Syntax
response = client.set_permission(
StackId='string',
IamUserArn='string',
AllowSsh=True|False,
AllowSudo=True|False,
Level='string'
)
Parameters: |
|
---|---|
Returns: | None |
set_time_based_auto_scaling
(**kwargs)¶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 .
Request Syntax
response = client.set_time_based_auto_scaling(
InstanceId='string',
AutoScalingSchedule={
'Monday': {
'string': 'string'
},
'Tuesday': {
'string': 'string'
},
'Wednesday': {
'string': 'string'
},
'Thursday': {
'string': 'string'
},
'Friday': {
'string': 'string'
},
'Saturday': {
'string': 'string'
},
'Sunday': {
'string': 'string'
}
}
)
Parameters: |
|
---|---|
Returns: | None |
start_instance
(**kwargs)¶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 .
Request Syntax
response = client.start_instance(
InstanceId='string'
)
Parameters: | InstanceId (string) -- [REQUIRED] The instance ID. |
---|---|
Returns: | None |
start_stack
(**kwargs)¶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 .
Request Syntax
response = client.start_stack(
StackId='string'
)
Parameters: | StackId (string) -- [REQUIRED] The stack ID. |
---|---|
Returns: | None |
stop_instance
(**kwargs)¶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 .
Request Syntax
response = client.stop_instance(
InstanceId='string'
)
Parameters: | InstanceId (string) -- [REQUIRED] The instance ID. |
---|---|
Returns: | None |
stop_stack
(**kwargs)¶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 .
Request Syntax
response = client.stop_stack(
StackId='string'
)
Parameters: | StackId (string) -- [REQUIRED] The stack ID. |
---|---|
Returns: | None |
unassign_instance
(**kwargs)¶Unassigns a registered instance from all of it's layers. The instance remains in the stack as an unassigned instance and can be assigned to another layer, as needed. You cannot use this action with instances that were created with AWS OpsWorks.
Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.unassign_instance(
InstanceId='string'
)
Parameters: | InstanceId (string) -- [REQUIRED] The instance ID. |
---|---|
Returns: | None |
unassign_volume
(**kwargs)¶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 .
Request Syntax
response = client.unassign_volume(
VolumeId='string'
)
Parameters: | VolumeId (string) -- [REQUIRED] The volume ID. |
---|---|
Returns: | None |
update_app
(**kwargs)¶Updates a specified app.
Required Permissions : To use this action, an IAM user must have a Deploy or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.update_app(
AppId='string',
Name='string',
Description='string',
DataSources=[
{
'Type': 'string',
'Arn': 'string',
'DatabaseName': 'string'
},
],
Type='aws-flow-ruby'|'java'|'rails'|'php'|'nodejs'|'static'|'other',
AppSource={
'Type': 'git'|'svn'|'archive'|'s3',
'Url': 'string',
'Username': 'string',
'Password': 'string',
'SshKey': 'string',
'Revision': 'string'
},
Domains=[
'string',
],
EnableSsl=True|False,
SslConfiguration={
'Certificate': 'string',
'PrivateKey': 'string',
'Chain': 'string'
},
Attributes={
'string': 'string'
},
Environment=[
{
'Key': 'string',
'Value': 'string',
'Secure': True|False
},
]
)
Parameters: |
|
---|---|
Returns: | None |
update_elastic_ip
(**kwargs)¶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 .
Request Syntax
response = client.update_elastic_ip(
ElasticIp='string',
Name='string'
)
Parameters: |
|
---|---|
Returns: | None |
update_instance
(**kwargs)¶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 .
Request Syntax
response = client.update_instance(
InstanceId='string',
LayerIds=[
'string',
],
InstanceType='string',
AutoScalingType='load'|'timer',
Hostname='string',
Os='string',
AmiId='string',
SshKeyName='string',
Architecture='x86_64'|'i386',
InstallUpdatesOnBoot=True|False,
EbsOptimized=True|False,
AgentVersion='string'
)
Parameters: |
|
---|---|
Returns: | None |
update_layer
(**kwargs)¶Updates a specified layer.
Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.update_layer(
LayerId='string',
Name='string',
Shortname='string',
Attributes={
'string': 'string'
},
CustomInstanceProfileArn='string',
CustomJson='string',
CustomSecurityGroupIds=[
'string',
],
Packages=[
'string',
],
VolumeConfigurations=[
{
'MountPoint': 'string',
'RaidLevel': 123,
'NumberOfDisks': 123,
'Size': 123,
'VolumeType': 'string',
'Iops': 123
},
],
EnableAutoHealing=True|False,
AutoAssignElasticIps=True|False,
AutoAssignPublicIps=True|False,
CustomRecipes={
'Setup': [
'string',
],
'Configure': [
'string',
],
'Deploy': [
'string',
],
'Undeploy': [
'string',
],
'Shutdown': [
'string',
]
},
InstallUpdatesOnBoot=True|False,
UseEbsOptimizedInstances=True|False,
LifecycleEventConfiguration={
'Shutdown': {
'ExecutionTimeout': 123,
'DelayUntilElbConnectionsDrained': True|False
}
}
)
Parameters: |
|
---|---|
Returns: | None |
update_my_user_profile
(**kwargs)¶Updates a user's SSH public key.
Required Permissions : To use this action, an IAM user must have self-management enabled or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.update_my_user_profile(
SshPublicKey='string'
)
Parameters: | SshPublicKey (string) -- The user's SSH public key. |
---|---|
Returns: | None |
update_rds_db_instance
(**kwargs)¶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 .
Request Syntax
response = client.update_rds_db_instance(
RdsDbInstanceArn='string',
DbUser='string',
DbPassword='string'
)
Parameters: |
|
---|---|
Returns: | None |
update_stack
(**kwargs)¶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 .
Request Syntax
response = client.update_stack(
StackId='string',
Name='string',
Attributes={
'string': 'string'
},
ServiceRoleArn='string',
DefaultInstanceProfileArn='string',
DefaultOs='string',
HostnameTheme='string',
DefaultAvailabilityZone='string',
DefaultSubnetId='string',
CustomJson='string',
ConfigurationManager={
'Name': 'string',
'Version': 'string'
},
ChefConfiguration={
'ManageBerkshelf': True|False,
'BerkshelfVersion': 'string'
},
UseCustomCookbooks=True|False,
CustomCookbooksSource={
'Type': 'git'|'svn'|'archive'|'s3',
'Url': 'string',
'Username': 'string',
'Password': 'string',
'SshKey': 'string',
'Revision': 'string'
},
DefaultSshKeyName='string',
DefaultRootDeviceType='ebs'|'instance-store',
UseOpsworksSecurityGroups=True|False,
AgentVersion='string'
)
Parameters: |
|
---|---|
Returns: | None |
update_user_profile
(**kwargs)¶Updates a specified user profile.
Required Permissions : To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
response = client.update_user_profile(
IamUserArn='string',
SshUsername='string',
SshPublicKey='string',
AllowSelfManagement=True|False
)
Parameters: |
|
---|---|
Returns: | None |
update_volume
(**kwargs)¶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 .
Request Syntax
response = client.update_volume(
VolumeId='string',
Name='string',
MountPoint='string'
)
Parameters: |
|
---|---|
Returns: | None |
OpsWorks.
ServiceResource
¶A resource representing AWS OpsWorks:
import boto3
opsworks = boto3.resource('opsworks')
These are the resource's available actions:
These are the resource's available sub-resources:
These are the resource's available collections:
Actions
Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.
create_stack
(**kwargs)¶Creates a new stack. For more information, see Create a New Stack .
Required Permissions : To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
stack = opsworks.create_stack(
Name='string',
Region='string',
VpcId='string',
Attributes={
'string': 'string'
},
ServiceRoleArn='string',
DefaultInstanceProfileArn='string',
DefaultOs='string',
HostnameTheme='string',
DefaultAvailabilityZone='string',
DefaultSubnetId='string',
CustomJson='string',
ConfigurationManager={
'Name': 'string',
'Version': 'string'
},
ChefConfiguration={
'ManageBerkshelf': True|False,
'BerkshelfVersion': 'string'
},
UseCustomCookbooks=True|False,
UseOpsworksSecurityGroups=True|False,
CustomCookbooksSource={
'Type': 'git'|'svn'|'archive'|'s3',
'Url': 'string',
'Username': 'string',
'Password': 'string',
'SshKey': 'string',
'Revision': 'string'
},
DefaultSshKeyName='string',
DefaultRootDeviceType='ebs'|'instance-store',
AgentVersion='string'
)
Parameters: |
|
---|---|
Return type: |
|
Returns: | A Stack resource |
Sub-resources
Sub-resources are methods that create a new instance of a child resource. This resource's identifiers get passed along to the child. For more information about sub-resources refer to the Resources Introduction Guide.
Layer
(id)¶Creates a Layer resource.:
layer = opsworks.Layer('id')
Parameters: | id (string) -- The Layer's id identifier. This must be set. |
---|---|
Return type: | OpsWorks.Layer |
Returns: | A Layer resource |
Stack
(id)¶Creates a Stack resource.:
stack = opsworks.Stack('id')
Parameters: | id (string) -- The Stack's id identifier. This must be set. |
---|---|
Return type: | OpsWorks.Stack |
Returns: | A Stack resource |
StackSummary
(stack_id)¶Creates a StackSummary resource.:
stack_summary = opsworks.StackSummary('stack_id')
Parameters: | stack_id (string) -- The StackSummary's stack_id identifier. This must be set. |
---|---|
Return type: | OpsWorks.StackSummary |
Returns: | A StackSummary resource |
Collections
Collections provide an interface to iterate over and manipulate groups of resources. For more information about collections refer to the Resources Introduction Guide.
stacks
¶all
()¶Creates an iterable of all Stack resources in the collection.
Request Syntax
stack_iterator = opsworks.stacks.all()
Return type: | opsworks.Stack |
---|---|
Returns: | A Stack resource |
filter
(**kwargs)¶Creates an iterable of all Stack resources in the collection filtered by kwargs passed to method.
Request Syntax
stack_iterator = opsworks.stacks.filter(
StackIds=[
'string',
]
)
Parameters: | StackIds (list) -- An array of stack IDs that specify the stacks to be described. If you omit this parameter,
|
---|---|
Return type: | opsworks.Stack |
Returns: | A Stack resource |
limit
(**kwargs)¶Creates an iterable up to a specified amount of Stack resources in the collection.
Request Syntax
stack_iterator = opsworks.stacks.limit(
count=123
)
Parameters: | count (integer) -- The limit to the number of resources in the iterable. |
---|---|
Return type: | opsworks.Stack |
Returns: | A Stack resource |
page_size
(**kwargs)¶Creates an iterable of all Stack resources in the collection, but limits the number of items returned by each service call by the specified amount.
Request Syntax
stack_iterator = opsworks.stacks.page_size(
count=123
)
Parameters: | count (integer) -- The number of items returned by each service call |
---|---|
Return type: | opsworks.Stack |
Returns: | A Stack resource |
OpsWorks.
Layer
(id)¶A resource representing an AWS OpsWorks Layer:
import boto3
opsworks = boto3.resource('opsworks')
layer = opsworks.Layer('id')
Parameters: | id (string) -- The Layer's id identifier. This must be set. |
---|
These are the resource's available identifiers:
These are the resource's available attributes:
custom_instance_profile_arn
custom_json
packages
name
volume_configurations
stack_id
layer_id
created_at
auto_assign_elastic_ips
use_ebs_optimized_instances
default_security_group_names
install_updates_on_boot
auto_assign_public_ips
custom_recipes
enable_auto_healing
attributes
shortname
custom_security_group_ids
type
default_recipes
lifecycle_event_configuration
These are the resource's available references:
These are the resource's available actions:
Identifiers
Identifiers are properties of a resource that are set upon instantation of the resource. For more information about identifiers refer to the Resources Introduction Guide.
id
¶(string) The Layer's id identifier. This must be set.
Attributes
Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load()
method.
For more information about attributes refer to the Resources Introduction Guide.
custom_instance_profile_arn
¶(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 .
custom_json
¶(string)
A JSON formatted string containing the layer's custom stack configuration and deployment attributes.
packages
¶(list)
An array of Package
objects that describe the layer's packages.
name
¶(string)
The layer name.
volume_configurations
¶(list)
A VolumeConfigurations
object that describes the layer's Amazon EBS volumes.
stack_id
¶(string)
The layer stack ID.
layer_id
¶(string)
The layer ID.
created_at
¶(string)
Date when the layer was created.
auto_assign_elastic_ips
¶(boolean)
Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer .
use_ebs_optimized_instances
¶(boolean)
Whether the layer uses Amazon EBS-optimized instances.
default_security_group_names
¶(list)
An array containing the layer's security group names.
install_updates_on_boot
¶(boolean)
Whether to install operating system and package updates when the instance boots. The default value is true
. If this value is set to false
, you must then update your instances manually by using CreateDeployment to run the update_dependencies
stack command or manually running yum
(Amazon Linux) or apt-get
(Ubuntu) on the instances.
Note
We strongly recommend using the default value of true
, to ensure that your instances have the latest security updates.
auto_assign_public_ips
¶(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 .
custom_recipes
¶(dict)
A LayerCustomRecipes
object that specifies the layer's custom recipes.
enable_auto_healing
¶(boolean)
Whether auto healing is disabled for the layer.
attributes
¶(dict)
The layer attributes.
For the HaproxyStatsPassword
, MysqlRootPassword
, and GangliaPassword
attributes, AWS OpsWorks returns *****FILTERED*****
instead of the actual value
For an ECS Cluster layer, AWS OpsWorks the EcsClusterArn
attribute is set to the cluster's ARN.
shortname
¶(string)
The layer short name.
custom_security_group_ids
¶(list)
An array containing the layer's custom security group IDs.
type
¶(string)
The layer type.
default_recipes
¶(dict)
AWS OpsWorks supports five lifecycle events: setup , configuration , deploy , undeploy , and shutdown . For each layer, AWS OpsWorks runs a set of standard recipes for each event. In addition, you can provide custom recipes for any or all layers and events. AWS OpsWorks runs custom event recipes after the standard recipes. LayerCustomRecipes
specifies the custom recipes for a particular layer to be run in response to each of the five events.
To specify a recipe, use the cookbook's directory name in the repository followed by two colons and the recipe name, which is the recipe's file name without the .rb extension. For example: phpapp2::dbsetup specifies the dbsetup.rb recipe in the repository's phpapp2 folder.
lifecycle_event_configuration
¶(dict)
A LifeCycleEventConfiguration
object that specifies the Shutdown event configuration.
References
References are related resource instances that have a belongs-to relationship. For more information about references refer to the Resources Introduction Guide.
stack
¶(Stack
) The related stack if set, otherwise None
.
Actions
Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.
delete
()¶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 .
Request Syntax
response = layer.delete()
Returns: | None |
---|
load
()¶Calls opsworks.Client.describe_layers()
to update the attributes of the Layer resource
Request Syntax
layer.load()
Returns: | None |
---|
reload
()¶Calls opsworks.Client.describe_layers()
to update the attributes of the Layer resource
Request Syntax
layer.reload()
Returns: | None |
---|
OpsWorks.
Stack
(id)¶A resource representing an AWS OpsWorks Stack:
import boto3
opsworks = boto3.resource('opsworks')
stack = opsworks.Stack('id')
Parameters: | id (string) -- The Stack's id identifier. This must be set. |
---|
These are the resource's available identifiers:
These are the resource's available attributes:
custom_json
chef_configuration
arn
hostname_theme
service_role_arn
default_root_device_type
configuration_manager
vpc_id
use_opsworks_security_groups
name
default_ssh_key_name
stack_id
default_instance_profile_arn
region
use_custom_cookbooks
default_availability_zone
custom_cookbooks_source
default_os
attributes
created_at
default_subnet_id
agent_version
These are the resource's available actions:
These are the resource's available sub-resources:
These are the resource's available collections:
Identifiers
Identifiers are properties of a resource that are set upon instantation of the resource. For more information about identifiers refer to the Resources Introduction Guide.
id
¶(string) The Stack's id identifier. This must be set.
Attributes
Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load()
method.
For more information about attributes refer to the Resources Introduction Guide.
custom_json
¶(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 and must escape characters such as '"':
"{\"key1\": \"value1\", \"key2\": \"value2\",...}"
For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes .
chef_configuration
¶(dict)
A ChefConfiguration
object that specifies whether to enable Berkshelf and the Berkshelf version. For more information, see Create a New Stack .
arn
¶(string)
The stack's ARN.
hostname_theme
¶(string)
The stack host name theme, with spaces replaced by underscores.
service_role_arn
¶(string)
The stack AWS Identity and Access Management (IAM) role.
default_root_device_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 .
configuration_manager
¶(dict)
The configuration manager.
vpc_id
¶(string)
The VPC ID; applicable only if the stack is running in a VPC.
use_opsworks_security_groups
¶(boolean)
Whether the stack automatically associates the AWS OpsWorks built-in security groups with the stack's layers.
name
¶(string)
The stack name.
default_ssh_key_name
¶(string)
A default Amazon EC2 key pair for the stack's instances. You can override this value when you create or update an instance.
stack_id
¶(string)
The stack ID.
default_instance_profile_arn
¶(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 .
region
¶(string)
The stack AWS region, such as "us-east-1". For more information about AWS regions, see Regions and Endpoints .
use_custom_cookbooks
¶(boolean)
Whether the stack uses custom cookbooks.
default_availability_zone
¶(string)
The stack's default Availability Zone. For more information, see Regions and Endpoints .
custom_cookbooks_source
¶(dict)
Contains the information required to retrieve an app or cookbook from a repository. For more information, see Creating Apps or Custom Recipes and Cookbooks .
default_os
¶(string)
The stack's default operating system.
attributes
¶(dict)
The stack's attributes.
created_at
¶(string)
The date when the stack was created.
default_subnet_id
¶(string)
The default subnet ID; applicable only if the stack is running in a VPC.
agent_version
¶(string)
The agent version. This parameter is set to LATEST
for auto-update. or a version number for a fixed agent version.
Actions
Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.
create_layer
(**kwargs)¶Creates a layer. For more information, see How to Create a Layer .
Note
You should use CreateLayer for noncustom layer types such as PHP App Server only if the stack does not have an existing layer of that type. A stack can have at most one instance of each noncustom layer; if you attempt to create a second instance, CreateLayer fails. A stack can have an arbitrary number of custom layers, so you can call CreateLayer as many times as you like for that layer type.
Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Request Syntax
layer = stack.create_layer(
Type='aws-flow-ruby'|'ecs-cluster'|'java-app'|'lb'|'web'|'php-app'|'rails-app'|'nodejs-app'|'memcached'|'db-master'|'monitoring-master'|'custom',
Name='string',
Shortname='string',
Attributes={
'string': 'string'
},
CustomInstanceProfileArn='string',
CustomJson='string',
CustomSecurityGroupIds=[
'string',
],
Packages=[
'string',
],
VolumeConfigurations=[
{
'MountPoint': 'string',
'RaidLevel': 123,
'NumberOfDisks': 123,
'Size': 123,
'VolumeType': 'string',
'Iops': 123
},
],
EnableAutoHealing=True|False,
AutoAssignElasticIps=True|False,
AutoAssignPublicIps=True|False,
CustomRecipes={
'Setup': [
'string',
],
'Configure': [
'string',
],
'Deploy': [
'string',
],
'Undeploy': [
'string',
],
'Shutdown': [
'string',
]
},
InstallUpdatesOnBoot=True|False,
UseEbsOptimizedInstances=True|False,
LifecycleEventConfiguration={
'Shutdown': {
'ExecutionTimeout': 123,
'DelayUntilElbConnectionsDrained': True|False
}
}
)
Parameters: |
|
---|---|
Return type: |
|
Returns: | A Layer resource |
delete
()¶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 .
Request Syntax
response = stack.delete()
Returns: | None |
---|
load
()¶Calls opsworks.Client.describe_stacks()
to update the attributes of the Stack resource
Request Syntax
stack.load()
Returns: | None |
---|
reload
()¶Calls opsworks.Client.describe_stacks()
to update the attributes of the Stack resource
Request Syntax
stack.reload()
Returns: | None |
---|
Sub-resources
Sub-resources are methods that create a new instance of a child resource. This resource's identifiers get passed along to the child. For more information about sub-resources refer to the Resources Introduction Guide.
Summary
()¶Creates a StackSummary resource.:
stack_summary = stack.Summary()
Return type: | OpsWorks.StackSummary |
---|---|
Returns: | A StackSummary resource |
Collections
Collections provide an interface to iterate over and manipulate groups of resources. For more information about collections refer to the Resources Introduction Guide.
layers
¶all
()¶Creates an iterable of all Layer resources in the collection.
Request Syntax
layer_iterator = stack.layers.all()
Return type: | opsworks.Layer |
---|---|
Returns: | A Layer resource |
filter
(**kwargs)¶Creates an iterable of all Layer resources in the collection filtered by kwargs passed to method.
Request Syntax
layer_iterator = stack.layers.filter(
LayerIds=[
'string',
]
)
Parameters: | LayerIds (list) -- An array of layer IDs that specify the layers to be described. If you omit this parameter,
|
---|---|
Return type: | opsworks.Layer |
Returns: | A Layer resource |
limit
(**kwargs)¶Creates an iterable up to a specified amount of Layer resources in the collection.
Request Syntax
layer_iterator = stack.layers.limit(
count=123
)
Parameters: | count (integer) -- The limit to the number of resources in the iterable. |
---|---|
Return type: | opsworks.Layer |
Returns: | A Layer resource |
page_size
(**kwargs)¶Creates an iterable of all Layer resources in the collection, but limits the number of items returned by each service call by the specified amount.
Request Syntax
layer_iterator = stack.layers.page_size(
count=123
)
Parameters: | count (integer) -- The number of items returned by each service call |
---|---|
Return type: | opsworks.Layer |
Returns: | A Layer resource |
OpsWorks.
StackSummary
(stack_id)¶A resource representing an AWS OpsWorks StackSummary:
import boto3
opsworks = boto3.resource('opsworks')
stack_summary = opsworks.StackSummary('stack_id')
Parameters: | stack_id (string) -- The StackSummary's stack_id identifier. This must be set. |
---|
These are the resource's available identifiers:
These are the resource's available attributes:
These are the resource's available sub-resources:
Identifiers
Identifiers are properties of a resource that are set upon instantation of the resource. For more information about identifiers refer to the Resources Introduction Guide.
stack_id
¶(string) The StackSummary's stack_id identifier. This must be set.
Attributes
Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load()
method.
For more information about attributes refer to the Resources Introduction Guide.
layers_count
¶(integer)
The number of layers.
instances_count
¶(dict)
An InstancesCount
object with the number of instances in each status.
apps_count
¶(integer)
The number of apps.
name
¶(string)
The stack name.
arn
¶(string)
The stack's ARN.
Sub-resources
Sub-resources are methods that create a new instance of a child resource. This resource's identifiers get passed along to the child. For more information about sub-resources refer to the Resources Introduction Guide.
Stack
()¶Creates a Stack resource.:
stack = stack_summary.Stack()
Return type: | OpsWorks.Stack |
---|---|
Returns: | A Stack resource |