sentence1
stringlengths 52
3.87M
| sentence2
stringlengths 1
47.2k
| label
stringclasses 1
value |
---|---|---|
def update_account_password_policy(MinimumPasswordLength=None, RequireSymbols=None, RequireNumbers=None, RequireUppercaseCharacters=None, RequireLowercaseCharacters=None, AllowUsersToChangePassword=None, MaxPasswordAge=None, PasswordReusePrevention=None, HardExpiry=None):
"""
Updates the password policy settings for the AWS account.
For more information about using a password policy, see Managing an IAM Password Policy in the IAM User Guide .
See also: AWS API Documentation
Examples
The following command sets the password policy to require a minimum length of eight characters and to require one or more numbers in the password:
Expected Output:
:example: response = client.update_account_password_policy(
MinimumPasswordLength=123,
RequireSymbols=True|False,
RequireNumbers=True|False,
RequireUppercaseCharacters=True|False,
RequireLowercaseCharacters=True|False,
AllowUsersToChangePassword=True|False,
MaxPasswordAge=123,
PasswordReusePrevention=123,
HardExpiry=True|False
)
:type MinimumPasswordLength: integer
:param MinimumPasswordLength: The minimum number of characters allowed in an IAM user password.
Default value: 6
:type RequireSymbols: boolean
:param RequireSymbols: Specifies whether IAM user passwords must contain at least one of the following non-alphanumeric characters:
! @ # $ % ^ amp; * ( ) _ + - = [ ] { } | '
Default value: false
:type RequireNumbers: boolean
:param RequireNumbers: Specifies whether IAM user passwords must contain at least one numeric character (0 to 9).
Default value: false
:type RequireUppercaseCharacters: boolean
:param RequireUppercaseCharacters: Specifies whether IAM user passwords must contain at least one uppercase character from the ISO basic Latin alphabet (A to Z).
Default value: false
:type RequireLowercaseCharacters: boolean
:param RequireLowercaseCharacters: Specifies whether IAM user passwords must contain at least one lowercase character from the ISO basic Latin alphabet (a to z).
Default value: false
:type AllowUsersToChangePassword: boolean
:param AllowUsersToChangePassword: Allows all IAM users in your account to use the AWS Management Console to change their own passwords. For more information, see Letting IAM Users Change Their Own Passwords in the IAM User Guide .
Default value: false
:type MaxPasswordAge: integer
:param MaxPasswordAge: The number of days that an IAM user password is valid. The default value of 0 means IAM user passwords never expire.
Default value: 0
:type PasswordReusePrevention: integer
:param PasswordReusePrevention: Specifies the number of previous passwords that IAM users are prevented from reusing. The default value of 0 means IAM users are not prevented from reusing previous passwords.
Default value: 0
:type HardExpiry: boolean
:param HardExpiry: Prevents IAM users from setting a new password after their password has expired.
Default value: false
:return: response = client.update_account_password_policy(
MinimumPasswordLength=8,
RequireNumbers=True,
)
print(response)
"""
pass | Updates the password policy settings for the AWS account.
For more information about using a password policy, see Managing an IAM Password Policy in the IAM User Guide .
See also: AWS API Documentation
Examples
The following command sets the password policy to require a minimum length of eight characters and to require one or more numbers in the password:
Expected Output:
:example: response = client.update_account_password_policy(
MinimumPasswordLength=123,
RequireSymbols=True|False,
RequireNumbers=True|False,
RequireUppercaseCharacters=True|False,
RequireLowercaseCharacters=True|False,
AllowUsersToChangePassword=True|False,
MaxPasswordAge=123,
PasswordReusePrevention=123,
HardExpiry=True|False
)
:type MinimumPasswordLength: integer
:param MinimumPasswordLength: The minimum number of characters allowed in an IAM user password.
Default value: 6
:type RequireSymbols: boolean
:param RequireSymbols: Specifies whether IAM user passwords must contain at least one of the following non-alphanumeric characters:
! @ # $ % ^ amp; * ( ) _ + - = [ ] { } | '
Default value: false
:type RequireNumbers: boolean
:param RequireNumbers: Specifies whether IAM user passwords must contain at least one numeric character (0 to 9).
Default value: false
:type RequireUppercaseCharacters: boolean
:param RequireUppercaseCharacters: Specifies whether IAM user passwords must contain at least one uppercase character from the ISO basic Latin alphabet (A to Z).
Default value: false
:type RequireLowercaseCharacters: boolean
:param RequireLowercaseCharacters: Specifies whether IAM user passwords must contain at least one lowercase character from the ISO basic Latin alphabet (a to z).
Default value: false
:type AllowUsersToChangePassword: boolean
:param AllowUsersToChangePassword: Allows all IAM users in your account to use the AWS Management Console to change their own passwords. For more information, see Letting IAM Users Change Their Own Passwords in the IAM User Guide .
Default value: false
:type MaxPasswordAge: integer
:param MaxPasswordAge: The number of days that an IAM user password is valid. The default value of 0 means IAM user passwords never expire.
Default value: 0
:type PasswordReusePrevention: integer
:param PasswordReusePrevention: Specifies the number of previous passwords that IAM users are prevented from reusing. The default value of 0 means IAM users are not prevented from reusing previous passwords.
Default value: 0
:type HardExpiry: boolean
:param HardExpiry: Prevents IAM users from setting a new password after their password has expired.
Default value: false
:return: response = client.update_account_password_policy(
MinimumPasswordLength=8,
RequireNumbers=True,
)
print(response) | entailment |
def create_network_profile(projectArn=None, name=None, description=None, type=None, uplinkBandwidthBits=None, downlinkBandwidthBits=None, uplinkDelayMs=None, downlinkDelayMs=None, uplinkJitterMs=None, downlinkJitterMs=None, uplinkLossPercent=None, downlinkLossPercent=None):
"""
Creates a network profile.
See also: AWS API Documentation
:example: response = client.create_network_profile(
projectArn='string',
name='string',
description='string',
type='CURATED'|'PRIVATE',
uplinkBandwidthBits=123,
downlinkBandwidthBits=123,
uplinkDelayMs=123,
downlinkDelayMs=123,
uplinkJitterMs=123,
downlinkJitterMs=123,
uplinkLossPercent=123,
downlinkLossPercent=123
)
:type projectArn: string
:param projectArn: [REQUIRED]
The Amazon Resource Name (ARN) of the project for which you want to create a network profile.
:type name: string
:param name: [REQUIRED]
The name you wish to specify for the new network profile.
:type description: string
:param description: The description of the network profile.
:type type: string
:param type: The type of network profile you wish to create. Valid values are listed below.
:type uplinkBandwidthBits: integer
:param uplinkBandwidthBits: The data throughput rate in bits per second, as an integer from 0 to 104857600.
:type downlinkBandwidthBits: integer
:param downlinkBandwidthBits: The data throughput rate in bits per second, as an integer from 0 to 104857600.
:type uplinkDelayMs: integer
:param uplinkDelayMs: Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.
:type downlinkDelayMs: integer
:param downlinkDelayMs: Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.
:type uplinkJitterMs: integer
:param uplinkJitterMs: Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.
:type downlinkJitterMs: integer
:param downlinkJitterMs: Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.
:type uplinkLossPercent: integer
:param uplinkLossPercent: Proportion of transmitted packets that fail to arrive from 0 to 100 percent.
:type downlinkLossPercent: integer
:param downlinkLossPercent: Proportion of received packets that fail to arrive from 0 to 100 percent.
:rtype: dict
:return: {
'networkProfile': {
'arn': 'string',
'name': 'string',
'description': 'string',
'type': 'CURATED'|'PRIVATE',
'uplinkBandwidthBits': 123,
'downlinkBandwidthBits': 123,
'uplinkDelayMs': 123,
'downlinkDelayMs': 123,
'uplinkJitterMs': 123,
'downlinkJitterMs': 123,
'uplinkLossPercent': 123,
'downlinkLossPercent': 123
}
}
"""
pass | Creates a network profile.
See also: AWS API Documentation
:example: response = client.create_network_profile(
projectArn='string',
name='string',
description='string',
type='CURATED'|'PRIVATE',
uplinkBandwidthBits=123,
downlinkBandwidthBits=123,
uplinkDelayMs=123,
downlinkDelayMs=123,
uplinkJitterMs=123,
downlinkJitterMs=123,
uplinkLossPercent=123,
downlinkLossPercent=123
)
:type projectArn: string
:param projectArn: [REQUIRED]
The Amazon Resource Name (ARN) of the project for which you want to create a network profile.
:type name: string
:param name: [REQUIRED]
The name you wish to specify for the new network profile.
:type description: string
:param description: The description of the network profile.
:type type: string
:param type: The type of network profile you wish to create. Valid values are listed below.
:type uplinkBandwidthBits: integer
:param uplinkBandwidthBits: The data throughput rate in bits per second, as an integer from 0 to 104857600.
:type downlinkBandwidthBits: integer
:param downlinkBandwidthBits: The data throughput rate in bits per second, as an integer from 0 to 104857600.
:type uplinkDelayMs: integer
:param uplinkDelayMs: Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.
:type downlinkDelayMs: integer
:param downlinkDelayMs: Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.
:type uplinkJitterMs: integer
:param uplinkJitterMs: Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.
:type downlinkJitterMs: integer
:param downlinkJitterMs: Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.
:type uplinkLossPercent: integer
:param uplinkLossPercent: Proportion of transmitted packets that fail to arrive from 0 to 100 percent.
:type downlinkLossPercent: integer
:param downlinkLossPercent: Proportion of received packets that fail to arrive from 0 to 100 percent.
:rtype: dict
:return: {
'networkProfile': {
'arn': 'string',
'name': 'string',
'description': 'string',
'type': 'CURATED'|'PRIVATE',
'uplinkBandwidthBits': 123,
'downlinkBandwidthBits': 123,
'uplinkDelayMs': 123,
'downlinkDelayMs': 123,
'uplinkJitterMs': 123,
'downlinkJitterMs': 123,
'uplinkLossPercent': 123,
'downlinkLossPercent': 123
}
} | entailment |
def update_network_profile(arn=None, name=None, description=None, type=None, uplinkBandwidthBits=None, downlinkBandwidthBits=None, uplinkDelayMs=None, downlinkDelayMs=None, uplinkJitterMs=None, downlinkJitterMs=None, uplinkLossPercent=None, downlinkLossPercent=None):
"""
Updates the network profile with specific settings.
See also: AWS API Documentation
:example: response = client.update_network_profile(
arn='string',
name='string',
description='string',
type='CURATED'|'PRIVATE',
uplinkBandwidthBits=123,
downlinkBandwidthBits=123,
uplinkDelayMs=123,
downlinkDelayMs=123,
uplinkJitterMs=123,
downlinkJitterMs=123,
uplinkLossPercent=123,
downlinkLossPercent=123
)
:type arn: string
:param arn: [REQUIRED]
The Amazon Resource Name (ARN) of the project that you wish to update network profile settings.
:type name: string
:param name: The name of the network profile about which you are returning information.
:type description: string
:param description: The descriptoin of the network profile about which you are returning information.
:type type: string
:param type: The type of network profile you wish to return information about. Valid values are listed below.
:type uplinkBandwidthBits: integer
:param uplinkBandwidthBits: The data throughput rate in bits per second, as an integer from 0 to 104857600.
:type downlinkBandwidthBits: integer
:param downlinkBandwidthBits: The data throughput rate in bits per second, as an integer from 0 to 104857600.
:type uplinkDelayMs: integer
:param uplinkDelayMs: Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.
:type downlinkDelayMs: integer
:param downlinkDelayMs: Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.
:type uplinkJitterMs: integer
:param uplinkJitterMs: Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.
:type downlinkJitterMs: integer
:param downlinkJitterMs: Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.
:type uplinkLossPercent: integer
:param uplinkLossPercent: Proportion of transmitted packets that fail to arrive from 0 to 100 percent.
:type downlinkLossPercent: integer
:param downlinkLossPercent: Proportion of received packets that fail to arrive from 0 to 100 percent.
:rtype: dict
:return: {
'networkProfile': {
'arn': 'string',
'name': 'string',
'description': 'string',
'type': 'CURATED'|'PRIVATE',
'uplinkBandwidthBits': 123,
'downlinkBandwidthBits': 123,
'uplinkDelayMs': 123,
'downlinkDelayMs': 123,
'uplinkJitterMs': 123,
'downlinkJitterMs': 123,
'uplinkLossPercent': 123,
'downlinkLossPercent': 123
}
}
"""
pass | Updates the network profile with specific settings.
See also: AWS API Documentation
:example: response = client.update_network_profile(
arn='string',
name='string',
description='string',
type='CURATED'|'PRIVATE',
uplinkBandwidthBits=123,
downlinkBandwidthBits=123,
uplinkDelayMs=123,
downlinkDelayMs=123,
uplinkJitterMs=123,
downlinkJitterMs=123,
uplinkLossPercent=123,
downlinkLossPercent=123
)
:type arn: string
:param arn: [REQUIRED]
The Amazon Resource Name (ARN) of the project that you wish to update network profile settings.
:type name: string
:param name: The name of the network profile about which you are returning information.
:type description: string
:param description: The descriptoin of the network profile about which you are returning information.
:type type: string
:param type: The type of network profile you wish to return information about. Valid values are listed below.
:type uplinkBandwidthBits: integer
:param uplinkBandwidthBits: The data throughput rate in bits per second, as an integer from 0 to 104857600.
:type downlinkBandwidthBits: integer
:param downlinkBandwidthBits: The data throughput rate in bits per second, as an integer from 0 to 104857600.
:type uplinkDelayMs: integer
:param uplinkDelayMs: Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.
:type downlinkDelayMs: integer
:param downlinkDelayMs: Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.
:type uplinkJitterMs: integer
:param uplinkJitterMs: Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.
:type downlinkJitterMs: integer
:param downlinkJitterMs: Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.
:type uplinkLossPercent: integer
:param uplinkLossPercent: Proportion of transmitted packets that fail to arrive from 0 to 100 percent.
:type downlinkLossPercent: integer
:param downlinkLossPercent: Proportion of received packets that fail to arrive from 0 to 100 percent.
:rtype: dict
:return: {
'networkProfile': {
'arn': 'string',
'name': 'string',
'description': 'string',
'type': 'CURATED'|'PRIVATE',
'uplinkBandwidthBits': 123,
'downlinkBandwidthBits': 123,
'uplinkDelayMs': 123,
'downlinkDelayMs': 123,
'uplinkJitterMs': 123,
'downlinkJitterMs': 123,
'uplinkLossPercent': 123,
'downlinkLossPercent': 123
}
} | entailment |
def get_shipping_label(jobIds=None, name=None, company=None, phoneNumber=None, country=None, stateOrProvince=None, city=None, postalCode=None, street1=None, street2=None, street3=None, APIVersion=None):
"""
This operation generates a pre-paid UPS shipping label that you will use to ship your device to AWS for processing.
See also: AWS API Documentation
:example: response = client.get_shipping_label(
jobIds=[
'string',
],
name='string',
company='string',
phoneNumber='string',
country='string',
stateOrProvince='string',
city='string',
postalCode='string',
street1='string',
street2='string',
street3='string',
APIVersion='string'
)
:type jobIds: list
:param jobIds: [REQUIRED]
(string) --
:type name: string
:param name: Specifies the name of the person responsible for shipping this package.
:type company: string
:param company: Specifies the name of the company that will ship this package.
:type phoneNumber: string
:param phoneNumber: Specifies the phone number of the person responsible for shipping this package.
:type country: string
:param country: Specifies the name of your country for the return address.
:type stateOrProvince: string
:param stateOrProvince: Specifies the name of your state or your province for the return address.
:type city: string
:param city: Specifies the name of your city for the return address.
:type postalCode: string
:param postalCode: Specifies the postal code for the return address.
:type street1: string
:param street1: Specifies the first part of the street address for the return address, for example 1234 Main Street.
:type street2: string
:param street2: Specifies the optional second part of the street address for the return address, for example Suite 100.
:type street3: string
:param street3: Specifies the optional third part of the street address for the return address, for example c/o Jane Doe.
:type APIVersion: string
:param APIVersion: Specifies the version of the client tool.
:rtype: dict
:return: {
'ShippingLabelURL': 'string',
'Warning': 'string'
}
:returns:
(dict) --
ShippingLabelURL (string) --
Warning (string) --
"""
pass | This operation generates a pre-paid UPS shipping label that you will use to ship your device to AWS for processing.
See also: AWS API Documentation
:example: response = client.get_shipping_label(
jobIds=[
'string',
],
name='string',
company='string',
phoneNumber='string',
country='string',
stateOrProvince='string',
city='string',
postalCode='string',
street1='string',
street2='string',
street3='string',
APIVersion='string'
)
:type jobIds: list
:param jobIds: [REQUIRED]
(string) --
:type name: string
:param name: Specifies the name of the person responsible for shipping this package.
:type company: string
:param company: Specifies the name of the company that will ship this package.
:type phoneNumber: string
:param phoneNumber: Specifies the phone number of the person responsible for shipping this package.
:type country: string
:param country: Specifies the name of your country for the return address.
:type stateOrProvince: string
:param stateOrProvince: Specifies the name of your state or your province for the return address.
:type city: string
:param city: Specifies the name of your city for the return address.
:type postalCode: string
:param postalCode: Specifies the postal code for the return address.
:type street1: string
:param street1: Specifies the first part of the street address for the return address, for example 1234 Main Street.
:type street2: string
:param street2: Specifies the optional second part of the street address for the return address, for example Suite 100.
:type street3: string
:param street3: Specifies the optional third part of the street address for the return address, for example c/o Jane Doe.
:type APIVersion: string
:param APIVersion: Specifies the version of the client tool.
:rtype: dict
:return: {
'ShippingLabelURL': 'string',
'Warning': 'string'
}
:returns:
(dict) --
ShippingLabelURL (string) --
Warning (string) -- | entailment |
def create_authorizer(restApiId=None, name=None, type=None, providerARNs=None, authType=None, authorizerUri=None, authorizerCredentials=None, identitySource=None, identityValidationExpression=None, authorizerResultTtlInSeconds=None):
"""
Adds a new Authorizer resource to an existing RestApi resource.
See also: AWS API Documentation
:example: response = client.create_authorizer(
restApiId='string',
name='string',
type='TOKEN'|'COGNITO_USER_POOLS',
providerARNs=[
'string',
],
authType='string',
authorizerUri='string',
authorizerCredentials='string',
identitySource='string',
identityValidationExpression='string',
authorizerResultTtlInSeconds=123
)
:type restApiId: string
:param restApiId: [REQUIRED]
The RestApi identifier under which the Authorizer will be created.
:type name: string
:param name: [REQUIRED]
[Required] The name of the authorizer.
:type type: string
:param type: [REQUIRED]
[Required] The type of the authorizer.
:type providerARNs: list
:param providerARNs: A list of the Cognito Your User Pool authorizer's provider ARNs.
(string) --
:type authType: string
:param authType: Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.
:type authorizerUri: string
:param authorizerUri: [Required] Specifies the authorizer's Uniform Resource Identifier (URI).
:type authorizerCredentials: string
:param authorizerCredentials: Specifies the credentials required for the authorizer, if any.
:type identitySource: string
:param identitySource: [REQUIRED]
[Required] The source of the identity in an incoming request.
:type identityValidationExpression: string
:param identityValidationExpression: A validation expression for the incoming identity.
:type authorizerResultTtlInSeconds: integer
:param authorizerResultTtlInSeconds: The TTL of cached authorizer results.
:rtype: dict
:return: {
'id': 'string',
'name': 'string',
'type': 'TOKEN'|'COGNITO_USER_POOLS',
'providerARNs': [
'string',
],
'authType': 'string',
'authorizerUri': 'string',
'authorizerCredentials': 'string',
'identitySource': 'string',
'identityValidationExpression': 'string',
'authorizerResultTtlInSeconds': 123
}
:returns:
(string) --
"""
pass | Adds a new Authorizer resource to an existing RestApi resource.
See also: AWS API Documentation
:example: response = client.create_authorizer(
restApiId='string',
name='string',
type='TOKEN'|'COGNITO_USER_POOLS',
providerARNs=[
'string',
],
authType='string',
authorizerUri='string',
authorizerCredentials='string',
identitySource='string',
identityValidationExpression='string',
authorizerResultTtlInSeconds=123
)
:type restApiId: string
:param restApiId: [REQUIRED]
The RestApi identifier under which the Authorizer will be created.
:type name: string
:param name: [REQUIRED]
[Required] The name of the authorizer.
:type type: string
:param type: [REQUIRED]
[Required] The type of the authorizer.
:type providerARNs: list
:param providerARNs: A list of the Cognito Your User Pool authorizer's provider ARNs.
(string) --
:type authType: string
:param authType: Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.
:type authorizerUri: string
:param authorizerUri: [Required] Specifies the authorizer's Uniform Resource Identifier (URI).
:type authorizerCredentials: string
:param authorizerCredentials: Specifies the credentials required for the authorizer, if any.
:type identitySource: string
:param identitySource: [REQUIRED]
[Required] The source of the identity in an incoming request.
:type identityValidationExpression: string
:param identityValidationExpression: A validation expression for the incoming identity.
:type authorizerResultTtlInSeconds: integer
:param authorizerResultTtlInSeconds: The TTL of cached authorizer results.
:rtype: dict
:return: {
'id': 'string',
'name': 'string',
'type': 'TOKEN'|'COGNITO_USER_POOLS',
'providerARNs': [
'string',
],
'authType': 'string',
'authorizerUri': 'string',
'authorizerCredentials': 'string',
'identitySource': 'string',
'identityValidationExpression': 'string',
'authorizerResultTtlInSeconds': 123
}
:returns:
(string) -- | entailment |
def put_integration(restApiId=None, resourceId=None, httpMethod=None, type=None, integrationHttpMethod=None, uri=None, credentials=None, requestParameters=None, requestTemplates=None, passthroughBehavior=None, cacheNamespace=None, cacheKeyParameters=None, contentHandling=None):
"""
Represents a put integration.
See also: AWS API Documentation
:example: response = client.put_integration(
restApiId='string',
resourceId='string',
httpMethod='string',
type='HTTP'|'AWS'|'MOCK'|'HTTP_PROXY'|'AWS_PROXY',
integrationHttpMethod='string',
uri='string',
credentials='string',
requestParameters={
'string': 'string'
},
requestTemplates={
'string': 'string'
},
passthroughBehavior='string',
cacheNamespace='string',
cacheKeyParameters=[
'string',
],
contentHandling='CONVERT_TO_BINARY'|'CONVERT_TO_TEXT'
)
:type restApiId: string
:param restApiId: [REQUIRED]
Specifies a put integration request's API identifier.
:type resourceId: string
:param resourceId: [REQUIRED]
Specifies a put integration request's resource ID.
:type httpMethod: string
:param httpMethod: [REQUIRED]
Specifies a put integration request's HTTP method.
:type type: string
:param type: [REQUIRED]
Specifies a put integration input's type.
:type integrationHttpMethod: string
:param integrationHttpMethod: Specifies a put integration HTTP method. When the integration type is HTTP or AWS, this field is required.
:type uri: string
:param uri: Specifies a put integration input's Uniform Resource Identifier (URI). When the integration type is HTTP or AWS, this field is required. For integration with Lambda as an AWS service proxy, this value is of the 'arn:aws:apigateway:region:lambda:path/2015-03-31/functions/functionArn/invocations' format.
:type credentials: string
:param credentials: Specifies whether credentials are required for a put integration.
:type requestParameters: dict
:param requestParameters: A key-value map specifying request parameters that are passed from the method request to the back end. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request parameter value must match the pattern of method.request.{location}.{name} , where location is querystring , path , or header and name must be a valid and unique method request parameter name.
(string) --
(string) --
:type requestTemplates: dict
:param requestTemplates: Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.
(string) --
(string) --
:type passthroughBehavior: string
:param passthroughBehavior: Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH , WHEN_NO_TEMPLATES , and NEVER .
WHEN_NO_MATCH passes the request body for unmapped content types through to the integration back end without transformation.
NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.
WHEN_NO_TEMPLATES allows pass-through when the integration has NO content types mapped to templates. However if there is at least one content type defined, unmapped content types will be rejected with the same 415 response.
:type cacheNamespace: string
:param cacheNamespace: Specifies a put integration input's cache namespace.
:type cacheKeyParameters: list
:param cacheKeyParameters: Specifies a put integration input's cache key parameters.
(string) --
:type contentHandling: string
:param contentHandling: Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT , with the following behaviors:
CONVERT_TO_BINARY : Converts a request payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT : Converts a request payload from a binary blob to a Base64-encoded string.
If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.
:rtype: dict
:return: {
'type': 'HTTP'|'AWS'|'MOCK'|'HTTP_PROXY'|'AWS_PROXY',
'httpMethod': 'string',
'uri': 'string',
'credentials': 'string',
'requestParameters': {
'string': 'string'
},
'requestTemplates': {
'string': 'string'
},
'passthroughBehavior': 'string',
'contentHandling': 'CONVERT_TO_BINARY'|'CONVERT_TO_TEXT',
'cacheNamespace': 'string',
'cacheKeyParameters': [
'string',
],
'integrationResponses': {
'string': {
'statusCode': 'string',
'selectionPattern': 'string',
'responseParameters': {
'string': 'string'
},
'responseTemplates': {
'string': 'string'
},
'contentHandling': 'CONVERT_TO_BINARY'|'CONVERT_TO_TEXT'
}
}
}
:returns:
(string) --
(string) --
"""
pass | Represents a put integration.
See also: AWS API Documentation
:example: response = client.put_integration(
restApiId='string',
resourceId='string',
httpMethod='string',
type='HTTP'|'AWS'|'MOCK'|'HTTP_PROXY'|'AWS_PROXY',
integrationHttpMethod='string',
uri='string',
credentials='string',
requestParameters={
'string': 'string'
},
requestTemplates={
'string': 'string'
},
passthroughBehavior='string',
cacheNamespace='string',
cacheKeyParameters=[
'string',
],
contentHandling='CONVERT_TO_BINARY'|'CONVERT_TO_TEXT'
)
:type restApiId: string
:param restApiId: [REQUIRED]
Specifies a put integration request's API identifier.
:type resourceId: string
:param resourceId: [REQUIRED]
Specifies a put integration request's resource ID.
:type httpMethod: string
:param httpMethod: [REQUIRED]
Specifies a put integration request's HTTP method.
:type type: string
:param type: [REQUIRED]
Specifies a put integration input's type.
:type integrationHttpMethod: string
:param integrationHttpMethod: Specifies a put integration HTTP method. When the integration type is HTTP or AWS, this field is required.
:type uri: string
:param uri: Specifies a put integration input's Uniform Resource Identifier (URI). When the integration type is HTTP or AWS, this field is required. For integration with Lambda as an AWS service proxy, this value is of the 'arn:aws:apigateway:region:lambda:path/2015-03-31/functions/functionArn/invocations' format.
:type credentials: string
:param credentials: Specifies whether credentials are required for a put integration.
:type requestParameters: dict
:param requestParameters: A key-value map specifying request parameters that are passed from the method request to the back end. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request parameter value must match the pattern of method.request.{location}.{name} , where location is querystring , path , or header and name must be a valid and unique method request parameter name.
(string) --
(string) --
:type requestTemplates: dict
:param requestTemplates: Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.
(string) --
(string) --
:type passthroughBehavior: string
:param passthroughBehavior: Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH , WHEN_NO_TEMPLATES , and NEVER .
WHEN_NO_MATCH passes the request body for unmapped content types through to the integration back end without transformation.
NEVER rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.
WHEN_NO_TEMPLATES allows pass-through when the integration has NO content types mapped to templates. However if there is at least one content type defined, unmapped content types will be rejected with the same 415 response.
:type cacheNamespace: string
:param cacheNamespace: Specifies a put integration input's cache namespace.
:type cacheKeyParameters: list
:param cacheKeyParameters: Specifies a put integration input's cache key parameters.
(string) --
:type contentHandling: string
:param contentHandling: Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT , with the following behaviors:
CONVERT_TO_BINARY : Converts a request payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT : Converts a request payload from a binary blob to a Base64-encoded string.
If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.
:rtype: dict
:return: {
'type': 'HTTP'|'AWS'|'MOCK'|'HTTP_PROXY'|'AWS_PROXY',
'httpMethod': 'string',
'uri': 'string',
'credentials': 'string',
'requestParameters': {
'string': 'string'
},
'requestTemplates': {
'string': 'string'
},
'passthroughBehavior': 'string',
'contentHandling': 'CONVERT_TO_BINARY'|'CONVERT_TO_TEXT',
'cacheNamespace': 'string',
'cacheKeyParameters': [
'string',
],
'integrationResponses': {
'string': {
'statusCode': 'string',
'selectionPattern': 'string',
'responseParameters': {
'string': 'string'
},
'responseTemplates': {
'string': 'string'
},
'contentHandling': 'CONVERT_TO_BINARY'|'CONVERT_TO_TEXT'
}
}
}
:returns:
(string) --
(string) -- | entailment |
def put_method(restApiId=None, resourceId=None, httpMethod=None, authorizationType=None, authorizerId=None, apiKeyRequired=None, operationName=None, requestParameters=None, requestModels=None, requestValidatorId=None):
"""
Add a method to an existing Resource resource.
See also: AWS API Documentation
:example: response = client.put_method(
restApiId='string',
resourceId='string',
httpMethod='string',
authorizationType='string',
authorizerId='string',
apiKeyRequired=True|False,
operationName='string',
requestParameters={
'string': True|False
},
requestModels={
'string': 'string'
},
requestValidatorId='string'
)
:type restApiId: string
:param restApiId: [REQUIRED]
The RestApi identifier for the new Method resource.
:type resourceId: string
:param resourceId: [REQUIRED]
The Resource identifier for the new Method resource.
:type httpMethod: string
:param httpMethod: [REQUIRED]
Specifies the method request's HTTP method type.
:type authorizationType: string
:param authorizationType: [REQUIRED]
The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.
:type authorizerId: string
:param authorizerId: Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM.
:type apiKeyRequired: boolean
:param apiKeyRequired: Specifies whether the method required a valid ApiKey .
:type operationName: string
:param operationName: A human-friendly operation identifier for the method. For example, you can assign the operationName of ListPets for the GET /pets method in PetStore example.
:type requestParameters: dict
:param requestParameters: A key-value map defining required or optional method request parameters that can be accepted by Amazon API Gateway. A key defines a method request parameter name matching the pattern of method.request.{location}.{name} , where location is querystring , path , or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true ) or optional (false ). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or body-mapping templates.
(string) --
(boolean) --
:type requestModels: dict
:param requestModels: Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.
(string) --
(string) --
:type requestValidatorId: string
:param requestValidatorId: The identifier of a RequestValidator for validating the method request.
:rtype: dict
:return: {
'httpMethod': 'string',
'authorizationType': 'string',
'authorizerId': 'string',
'apiKeyRequired': True|False,
'requestValidatorId': 'string',
'operationName': 'string',
'requestParameters': {
'string': True|False
},
'requestModels': {
'string': 'string'
},
'methodResponses': {
'string': {
'statusCode': 'string',
'responseParameters': {
'string': True|False
},
'responseModels': {
'string': 'string'
}
}
},
'methodIntegration': {
'type': 'HTTP'|'AWS'|'MOCK'|'HTTP_PROXY'|'AWS_PROXY',
'httpMethod': 'string',
'uri': 'string',
'credentials': 'string',
'requestParameters': {
'string': 'string'
},
'requestTemplates': {
'string': 'string'
},
'passthroughBehavior': 'string',
'contentHandling': 'CONVERT_TO_BINARY'|'CONVERT_TO_TEXT',
'cacheNamespace': 'string',
'cacheKeyParameters': [
'string',
],
'integrationResponses': {
'string': {
'statusCode': 'string',
'selectionPattern': 'string',
'responseParameters': {
'string': 'string'
},
'responseTemplates': {
'string': 'string'
},
'contentHandling': 'CONVERT_TO_BINARY'|'CONVERT_TO_TEXT'
}
}
}
}
:returns:
(string) --
(boolean) --
"""
pass | Add a method to an existing Resource resource.
See also: AWS API Documentation
:example: response = client.put_method(
restApiId='string',
resourceId='string',
httpMethod='string',
authorizationType='string',
authorizerId='string',
apiKeyRequired=True|False,
operationName='string',
requestParameters={
'string': True|False
},
requestModels={
'string': 'string'
},
requestValidatorId='string'
)
:type restApiId: string
:param restApiId: [REQUIRED]
The RestApi identifier for the new Method resource.
:type resourceId: string
:param resourceId: [REQUIRED]
The Resource identifier for the new Method resource.
:type httpMethod: string
:param httpMethod: [REQUIRED]
Specifies the method request's HTTP method type.
:type authorizationType: string
:param authorizationType: [REQUIRED]
The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.
:type authorizerId: string
:param authorizerId: Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM.
:type apiKeyRequired: boolean
:param apiKeyRequired: Specifies whether the method required a valid ApiKey .
:type operationName: string
:param operationName: A human-friendly operation identifier for the method. For example, you can assign the operationName of ListPets for the GET /pets method in PetStore example.
:type requestParameters: dict
:param requestParameters: A key-value map defining required or optional method request parameters that can be accepted by Amazon API Gateway. A key defines a method request parameter name matching the pattern of method.request.{location}.{name} , where location is querystring , path , or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true ) or optional (false ). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or body-mapping templates.
(string) --
(boolean) --
:type requestModels: dict
:param requestModels: Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.
(string) --
(string) --
:type requestValidatorId: string
:param requestValidatorId: The identifier of a RequestValidator for validating the method request.
:rtype: dict
:return: {
'httpMethod': 'string',
'authorizationType': 'string',
'authorizerId': 'string',
'apiKeyRequired': True|False,
'requestValidatorId': 'string',
'operationName': 'string',
'requestParameters': {
'string': True|False
},
'requestModels': {
'string': 'string'
},
'methodResponses': {
'string': {
'statusCode': 'string',
'responseParameters': {
'string': True|False
},
'responseModels': {
'string': 'string'
}
}
},
'methodIntegration': {
'type': 'HTTP'|'AWS'|'MOCK'|'HTTP_PROXY'|'AWS_PROXY',
'httpMethod': 'string',
'uri': 'string',
'credentials': 'string',
'requestParameters': {
'string': 'string'
},
'requestTemplates': {
'string': 'string'
},
'passthroughBehavior': 'string',
'contentHandling': 'CONVERT_TO_BINARY'|'CONVERT_TO_TEXT',
'cacheNamespace': 'string',
'cacheKeyParameters': [
'string',
],
'integrationResponses': {
'string': {
'statusCode': 'string',
'selectionPattern': 'string',
'responseParameters': {
'string': 'string'
},
'responseTemplates': {
'string': 'string'
},
'contentHandling': 'CONVERT_TO_BINARY'|'CONVERT_TO_TEXT'
}
}
}
}
:returns:
(string) --
(boolean) -- | entailment |
def describe_users(OrganizationId=None, UserIds=None, Query=None, Include=None, Order=None, Sort=None, Marker=None, Limit=None, Fields=None):
"""
Describes the specified users. You can describe all users or filter the results (for example, by status or organization).
By default, Amazon WorkDocs returns the first 24 active or pending users. If there are more results, the response includes a marker that you can use to request the next set of results.
See also: AWS API Documentation
:example: response = client.describe_users(
OrganizationId='string',
UserIds='string',
Query='string',
Include='ALL'|'ACTIVE_PENDING',
Order='ASCENDING'|'DESCENDING',
Sort='USER_NAME'|'FULL_NAME'|'STORAGE_LIMIT'|'USER_STATUS'|'STORAGE_USED',
Marker='string',
Limit=123,
Fields='string'
)
:type OrganizationId: string
:param OrganizationId: The ID of the organization.
:type UserIds: string
:param UserIds: The IDs of the users.
:type Query: string
:param Query: A query to filter users by user name.
:type Include: string
:param Include: The state of the users. Specify 'ALL' to include inactive users.
:type Order: string
:param Order: The order for the results.
:type Sort: string
:param Sort: The sorting criteria.
:type Marker: string
:param Marker: The marker for the next set of results. (You received this marker from a previous call.)
:type Limit: integer
:param Limit: The maximum number of items to return.
:type Fields: string
:param Fields: A comma-separated list of values. Specify 'STORAGE_METADATA' to include the user storage quota and utilization information.
:rtype: dict
:return: {
'Users': [
{
'Id': 'string',
'Username': 'string',
'EmailAddress': 'string',
'GivenName': 'string',
'Surname': 'string',
'OrganizationId': 'string',
'RootFolderId': 'string',
'RecycleBinFolderId': 'string',
'Status': 'ACTIVE'|'INACTIVE'|'PENDING',
'Type': 'USER'|'ADMIN',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'TimeZoneId': 'string',
'Locale': 'en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default',
'Storage': {
'StorageUtilizedInBytes': 123,
'StorageRule': {
'StorageAllocatedInBytes': 123,
'StorageType': 'UNLIMITED'|'QUOTA'
}
}
},
],
'TotalNumberOfUsers': 123,
'Marker': 'string'
}
"""
pass | Describes the specified users. You can describe all users or filter the results (for example, by status or organization).
By default, Amazon WorkDocs returns the first 24 active or pending users. If there are more results, the response includes a marker that you can use to request the next set of results.
See also: AWS API Documentation
:example: response = client.describe_users(
OrganizationId='string',
UserIds='string',
Query='string',
Include='ALL'|'ACTIVE_PENDING',
Order='ASCENDING'|'DESCENDING',
Sort='USER_NAME'|'FULL_NAME'|'STORAGE_LIMIT'|'USER_STATUS'|'STORAGE_USED',
Marker='string',
Limit=123,
Fields='string'
)
:type OrganizationId: string
:param OrganizationId: The ID of the organization.
:type UserIds: string
:param UserIds: The IDs of the users.
:type Query: string
:param Query: A query to filter users by user name.
:type Include: string
:param Include: The state of the users. Specify 'ALL' to include inactive users.
:type Order: string
:param Order: The order for the results.
:type Sort: string
:param Sort: The sorting criteria.
:type Marker: string
:param Marker: The marker for the next set of results. (You received this marker from a previous call.)
:type Limit: integer
:param Limit: The maximum number of items to return.
:type Fields: string
:param Fields: A comma-separated list of values. Specify 'STORAGE_METADATA' to include the user storage quota and utilization information.
:rtype: dict
:return: {
'Users': [
{
'Id': 'string',
'Username': 'string',
'EmailAddress': 'string',
'GivenName': 'string',
'Surname': 'string',
'OrganizationId': 'string',
'RootFolderId': 'string',
'RecycleBinFolderId': 'string',
'Status': 'ACTIVE'|'INACTIVE'|'PENDING',
'Type': 'USER'|'ADMIN',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'TimeZoneId': 'string',
'Locale': 'en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default',
'Storage': {
'StorageUtilizedInBytes': 123,
'StorageRule': {
'StorageAllocatedInBytes': 123,
'StorageType': 'UNLIMITED'|'QUOTA'
}
}
},
],
'TotalNumberOfUsers': 123,
'Marker': 'string'
} | entailment |
def create_change_set(StackName=None, TemplateBody=None, TemplateURL=None, UsePreviousTemplate=None, Parameters=None, Capabilities=None, ResourceTypes=None, RoleARN=None, NotificationARNs=None, Tags=None, ChangeSetName=None, ClientToken=None, Description=None, ChangeSetType=None):
"""
Creates a list of changes that will be applied to a stack so that you can review the changes before executing them. You can create a change set for a stack that doesn't exist or an existing stack. If you create a change set for a stack that doesn't exist, the change set shows all of the resources that AWS CloudFormation will create. If you create a change set for an existing stack, AWS CloudFormation compares the stack's information with the information that you submit in the change set and lists the differences. Use change sets to understand which resources AWS CloudFormation will create or change, and how it will change resources in an existing stack, before you create or update a stack.
To create a change set for a stack that doesn't exist, for the ChangeSetType parameter, specify CREATE . To create a change set for an existing stack, specify UPDATE for the ChangeSetType parameter. After the CreateChangeSet call successfully completes, AWS CloudFormation starts creating the change set. To check the status of the change set or to review it, use the DescribeChangeSet action.
When you are satisfied with the changes the change set will make, execute the change set by using the ExecuteChangeSet action. AWS CloudFormation doesn't make changes until you execute the change set.
See also: AWS API Documentation
:example: response = client.create_change_set(
StackName='string',
TemplateBody='string',
TemplateURL='string',
UsePreviousTemplate=True|False,
Parameters=[
{
'ParameterKey': 'string',
'ParameterValue': 'string',
'UsePreviousValue': True|False
},
],
Capabilities=[
'CAPABILITY_IAM'|'CAPABILITY_NAMED_IAM',
],
ResourceTypes=[
'string',
],
RoleARN='string',
NotificationARNs=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
ChangeSetName='string',
ClientToken='string',
Description='string',
ChangeSetType='CREATE'|'UPDATE'
)
:type StackName: string
:param StackName: [REQUIRED]
The name or the unique ID of the stack for which you are creating a change set. AWS CloudFormation generates the change set by comparing this stack's information with the information that you submit, such as a modified template or different parameter input values.
:type TemplateBody: string
:param TemplateBody: A structure that contains the body of the revised template, with a minimum length of 1 byte and a maximum length of 51,200 bytes. AWS CloudFormation generates the change set by comparing this template with the template of the stack that you specified.
Conditional: You must specify only TemplateBody or TemplateURL .
:type TemplateURL: string
:param TemplateURL: The location of the file that contains the revised template. The URL must point to a template (max size: 460,800 bytes) that is located in an S3 bucket. AWS CloudFormation generates the change set by comparing this template with the stack that you specified.
Conditional: You must specify only TemplateBody or TemplateURL .
:type UsePreviousTemplate: boolean
:param UsePreviousTemplate: Whether to reuse the template that is associated with the stack to create the change set.
:type Parameters: list
:param Parameters: A list of Parameter structures that specify input parameters for the change set. For more information, see the Parameter data type.
(dict) --The Parameter data type.
ParameterKey (string) --The key associated with the parameter. If you don't specify a key and value for a particular parameter, AWS CloudFormation uses the default value that is specified in your template.
ParameterValue (string) --The value associated with the parameter.
UsePreviousValue (boolean) --During a stack update, use the existing parameter value that the stack is using for a given parameter key. If you specify true , do not specify a parameter value.
:type Capabilities: list
:param Capabilities: A list of values that you must specify before AWS CloudFormation can update certain stacks. Some stack templates might include resources that can affect permissions in your AWS account, for example, by creating new AWS Identity and Access Management (IAM) users. For those stacks, you must explicitly acknowledge their capabilities by specifying this parameter.
The only valid values are CAPABILITY_IAM and CAPABILITY_NAMED_IAM . The following resources require you to specify this parameter: AWS::IAM::AccessKey , AWS::IAM::Group , AWS::IAM::InstanceProfile , AWS::IAM::Policy , AWS::IAM::Role , AWS::IAM::User , and AWS::IAM::UserToGroupAddition . If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.
If you have IAM resources, you can specify either capability. If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM . If you don't specify this parameter, this action returns an InsufficientCapabilities error.
For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .
(string) --
:type ResourceTypes: list
:param ResourceTypes: The template resource types that you have permissions to work with if you execute this change set, such as AWS::EC2::Instance , AWS::EC2::* , or Custom::MyCustomInstance .
If the list of resource types doesn't include a resource type that you're updating, the stack update fails. By default, AWS CloudFormation grants permissions to all resource types. AWS Identity and Access Management (IAM) uses this parameter for condition keys in IAM policies for AWS CloudFormation. For more information, see Controlling Access with AWS Identity and Access Management in the AWS CloudFormation User Guide.
(string) --
:type RoleARN: string
:param RoleARN: The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation assumes when executing the change set. AWS CloudFormation uses the role's credentials to make calls on your behalf. AWS CloudFormation uses this role for all future operations on the stack. As long as users have permission to operate on the stack, AWS CloudFormation uses this role even if the users don't have permission to pass it. Ensure that the role grants least privilege.
If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
:type NotificationARNs: list
:param NotificationARNs: The Amazon Resource Names (ARNs) of Amazon Simple Notification Service (Amazon SNS) topics that AWS CloudFormation associates with the stack. To remove all associated notification topics, specify an empty list.
(string) --
:type Tags: list
:param Tags: Key-value pairs to associate with this stack. AWS CloudFormation also propagates these tags to resources in the stack. You can specify a maximum of 10 tags.
(dict) --The Tag type enables you to specify a key-value pair that can be used to store information about an AWS CloudFormation stack.
Key (string) --
Required . A string used to identify this tag. You can specify a maximum of 128 characters for a tag key. Tags owned by Amazon Web Services (AWS) have the reserved prefix: aws: .
Value (string) --
Required . A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value.
:type ChangeSetName: string
:param ChangeSetName: [REQUIRED]
The name of the change set. The name must be unique among all change sets that are associated with the specified stack.
A change set name can contain only alphanumeric, case sensitive characters and hyphens. It must start with an alphabetic character and cannot exceed 128 characters.
:type ClientToken: string
:param ClientToken: A unique identifier for this CreateChangeSet request. Specify this token if you plan to retry requests so that AWS CloudFormation knows that you're not attempting to create another change set with the same name. You might retry CreateChangeSet requests to ensure that AWS CloudFormation successfully received them.
:type Description: string
:param Description: A description to help you identify this change set.
:type ChangeSetType: string
:param ChangeSetType: The type of change set operation. To create a change set for a new stack, specify CREATE . To create a change set for an existing stack, specify UPDATE .
If you create a change set for a new stack, AWS Cloudformation creates a stack with a unique stack ID, but no template or resources. The stack will be in the ` REVIEW_IN_PROGRESS http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-describing-stacks.html#d0e11995`_ state until you execute the change set.
By default, AWS CloudFormation specifies UPDATE . You can't use the UPDATE type to create a change set for a new stack or the CREATE type to create a change set for an existing stack.
:rtype: dict
:return: {
'Id': 'string',
'StackId': 'string'
}
"""
pass | Creates a list of changes that will be applied to a stack so that you can review the changes before executing them. You can create a change set for a stack that doesn't exist or an existing stack. If you create a change set for a stack that doesn't exist, the change set shows all of the resources that AWS CloudFormation will create. If you create a change set for an existing stack, AWS CloudFormation compares the stack's information with the information that you submit in the change set and lists the differences. Use change sets to understand which resources AWS CloudFormation will create or change, and how it will change resources in an existing stack, before you create or update a stack.
To create a change set for a stack that doesn't exist, for the ChangeSetType parameter, specify CREATE . To create a change set for an existing stack, specify UPDATE for the ChangeSetType parameter. After the CreateChangeSet call successfully completes, AWS CloudFormation starts creating the change set. To check the status of the change set or to review it, use the DescribeChangeSet action.
When you are satisfied with the changes the change set will make, execute the change set by using the ExecuteChangeSet action. AWS CloudFormation doesn't make changes until you execute the change set.
See also: AWS API Documentation
:example: response = client.create_change_set(
StackName='string',
TemplateBody='string',
TemplateURL='string',
UsePreviousTemplate=True|False,
Parameters=[
{
'ParameterKey': 'string',
'ParameterValue': 'string',
'UsePreviousValue': True|False
},
],
Capabilities=[
'CAPABILITY_IAM'|'CAPABILITY_NAMED_IAM',
],
ResourceTypes=[
'string',
],
RoleARN='string',
NotificationARNs=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
ChangeSetName='string',
ClientToken='string',
Description='string',
ChangeSetType='CREATE'|'UPDATE'
)
:type StackName: string
:param StackName: [REQUIRED]
The name or the unique ID of the stack for which you are creating a change set. AWS CloudFormation generates the change set by comparing this stack's information with the information that you submit, such as a modified template or different parameter input values.
:type TemplateBody: string
:param TemplateBody: A structure that contains the body of the revised template, with a minimum length of 1 byte and a maximum length of 51,200 bytes. AWS CloudFormation generates the change set by comparing this template with the template of the stack that you specified.
Conditional: You must specify only TemplateBody or TemplateURL .
:type TemplateURL: string
:param TemplateURL: The location of the file that contains the revised template. The URL must point to a template (max size: 460,800 bytes) that is located in an S3 bucket. AWS CloudFormation generates the change set by comparing this template with the stack that you specified.
Conditional: You must specify only TemplateBody or TemplateURL .
:type UsePreviousTemplate: boolean
:param UsePreviousTemplate: Whether to reuse the template that is associated with the stack to create the change set.
:type Parameters: list
:param Parameters: A list of Parameter structures that specify input parameters for the change set. For more information, see the Parameter data type.
(dict) --The Parameter data type.
ParameterKey (string) --The key associated with the parameter. If you don't specify a key and value for a particular parameter, AWS CloudFormation uses the default value that is specified in your template.
ParameterValue (string) --The value associated with the parameter.
UsePreviousValue (boolean) --During a stack update, use the existing parameter value that the stack is using for a given parameter key. If you specify true , do not specify a parameter value.
:type Capabilities: list
:param Capabilities: A list of values that you must specify before AWS CloudFormation can update certain stacks. Some stack templates might include resources that can affect permissions in your AWS account, for example, by creating new AWS Identity and Access Management (IAM) users. For those stacks, you must explicitly acknowledge their capabilities by specifying this parameter.
The only valid values are CAPABILITY_IAM and CAPABILITY_NAMED_IAM . The following resources require you to specify this parameter: AWS::IAM::AccessKey , AWS::IAM::Group , AWS::IAM::InstanceProfile , AWS::IAM::Policy , AWS::IAM::Role , AWS::IAM::User , and AWS::IAM::UserToGroupAddition . If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.
If you have IAM resources, you can specify either capability. If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM . If you don't specify this parameter, this action returns an InsufficientCapabilities error.
For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .
(string) --
:type ResourceTypes: list
:param ResourceTypes: The template resource types that you have permissions to work with if you execute this change set, such as AWS::EC2::Instance , AWS::EC2::* , or Custom::MyCustomInstance .
If the list of resource types doesn't include a resource type that you're updating, the stack update fails. By default, AWS CloudFormation grants permissions to all resource types. AWS Identity and Access Management (IAM) uses this parameter for condition keys in IAM policies for AWS CloudFormation. For more information, see Controlling Access with AWS Identity and Access Management in the AWS CloudFormation User Guide.
(string) --
:type RoleARN: string
:param RoleARN: The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation assumes when executing the change set. AWS CloudFormation uses the role's credentials to make calls on your behalf. AWS CloudFormation uses this role for all future operations on the stack. As long as users have permission to operate on the stack, AWS CloudFormation uses this role even if the users don't have permission to pass it. Ensure that the role grants least privilege.
If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
:type NotificationARNs: list
:param NotificationARNs: The Amazon Resource Names (ARNs) of Amazon Simple Notification Service (Amazon SNS) topics that AWS CloudFormation associates with the stack. To remove all associated notification topics, specify an empty list.
(string) --
:type Tags: list
:param Tags: Key-value pairs to associate with this stack. AWS CloudFormation also propagates these tags to resources in the stack. You can specify a maximum of 10 tags.
(dict) --The Tag type enables you to specify a key-value pair that can be used to store information about an AWS CloudFormation stack.
Key (string) --
Required . A string used to identify this tag. You can specify a maximum of 128 characters for a tag key. Tags owned by Amazon Web Services (AWS) have the reserved prefix: aws: .
Value (string) --
Required . A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value.
:type ChangeSetName: string
:param ChangeSetName: [REQUIRED]
The name of the change set. The name must be unique among all change sets that are associated with the specified stack.
A change set name can contain only alphanumeric, case sensitive characters and hyphens. It must start with an alphabetic character and cannot exceed 128 characters.
:type ClientToken: string
:param ClientToken: A unique identifier for this CreateChangeSet request. Specify this token if you plan to retry requests so that AWS CloudFormation knows that you're not attempting to create another change set with the same name. You might retry CreateChangeSet requests to ensure that AWS CloudFormation successfully received them.
:type Description: string
:param Description: A description to help you identify this change set.
:type ChangeSetType: string
:param ChangeSetType: The type of change set operation. To create a change set for a new stack, specify CREATE . To create a change set for an existing stack, specify UPDATE .
If you create a change set for a new stack, AWS Cloudformation creates a stack with a unique stack ID, but no template or resources. The stack will be in the ` REVIEW_IN_PROGRESS http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-describing-stacks.html#d0e11995`_ state until you execute the change set.
By default, AWS CloudFormation specifies UPDATE . You can't use the UPDATE type to create a change set for a new stack or the CREATE type to create a change set for an existing stack.
:rtype: dict
:return: {
'Id': 'string',
'StackId': 'string'
} | entailment |
def create_stack(StackName=None, TemplateBody=None, TemplateURL=None, Parameters=None, DisableRollback=None, TimeoutInMinutes=None, NotificationARNs=None, Capabilities=None, ResourceTypes=None, RoleARN=None, OnFailure=None, StackPolicyBody=None, StackPolicyURL=None, Tags=None, ClientRequestToken=None):
"""
Creates a stack as specified in the template. After the call completes successfully, the stack creation starts. You can check the status of the stack via the DescribeStacks API.
See also: AWS API Documentation
:example: response = client.create_stack(
StackName='string',
TemplateBody='string',
TemplateURL='string',
Parameters=[
{
'ParameterKey': 'string',
'ParameterValue': 'string',
'UsePreviousValue': True|False
},
],
DisableRollback=True|False,
TimeoutInMinutes=123,
NotificationARNs=[
'string',
],
Capabilities=[
'CAPABILITY_IAM'|'CAPABILITY_NAMED_IAM',
],
ResourceTypes=[
'string',
],
RoleARN='string',
OnFailure='DO_NOTHING'|'ROLLBACK'|'DELETE',
StackPolicyBody='string',
StackPolicyURL='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
ClientRequestToken='string'
)
:type StackName: string
:param StackName: [REQUIRED]
The name that is associated with the stack. The name must be unique in the region in which you are creating the stack.
Note
A stack name can contain only alphanumeric characters (case sensitive) and hyphens. It must start with an alphabetic character and cannot be longer than 128 characters.
:type TemplateBody: string
:param TemplateBody: Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. For more information, go to Template Anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify either the TemplateBody or the TemplateURL parameter, but not both.
:type TemplateURL: string
:param TemplateURL: Location of file containing the template body. The URL must point to a template (max size: 460,800 bytes) that is located in an Amazon S3 bucket. For more information, go to the Template Anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify either the TemplateBody or the TemplateURL parameter, but not both.
:type Parameters: list
:param Parameters: A list of Parameter structures that specify input parameters for the stack. For more information, see the Parameter data type.
(dict) --The Parameter data type.
ParameterKey (string) --The key associated with the parameter. If you don't specify a key and value for a particular parameter, AWS CloudFormation uses the default value that is specified in your template.
ParameterValue (string) --The value associated with the parameter.
UsePreviousValue (boolean) --During a stack update, use the existing parameter value that the stack is using for a given parameter key. If you specify true , do not specify a parameter value.
:type DisableRollback: boolean
:param DisableRollback: Set to true to disable rollback of the stack if stack creation failed. You can specify either DisableRollback or OnFailure , but not both.
Default: false
:type TimeoutInMinutes: integer
:param TimeoutInMinutes: The amount of time that can pass before the stack status becomes CREATE_FAILED; if DisableRollback is not set or is set to false , the stack will be rolled back.
:type NotificationARNs: list
:param NotificationARNs: The Simple Notification Service (SNS) topic ARNs to publish stack related events. You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI).
(string) --
:type Capabilities: list
:param Capabilities: A list of values that you must specify before AWS CloudFormation can create certain stacks. Some stack templates might include resources that can affect permissions in your AWS account, for example, by creating new AWS Identity and Access Management (IAM) users. For those stacks, you must explicitly acknowledge their capabilities by specifying this parameter.
The only valid values are CAPABILITY_IAM and CAPABILITY_NAMED_IAM . The following resources require you to specify this parameter: AWS::IAM::AccessKey , AWS::IAM::Group , AWS::IAM::InstanceProfile , AWS::IAM::Policy , AWS::IAM::Role , AWS::IAM::User , and AWS::IAM::UserToGroupAddition . If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.
If you have IAM resources, you can specify either capability. If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM . If you don't specify this parameter, this action returns an InsufficientCapabilities error.
For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .
(string) --
:type ResourceTypes: list
:param ResourceTypes: The template resource types that you have permissions to work with for this create stack action, such as AWS::EC2::Instance , AWS::EC2::* , or Custom::MyCustomInstance . Use the following syntax to describe template resource types: AWS::* (for all AWS resource), Custom::* (for all custom resources), Custom::*logical_ID* `` (for a specific custom resource), ``AWS::*service_name* ::* (for all resources of a particular AWS service), and ``AWS::service_name ::resource_logical_ID `` (for a specific AWS resource).
If the list of resource types doesn't include a resource that you're creating, the stack creation fails. By default, AWS CloudFormation grants permissions to all resource types. AWS Identity and Access Management (IAM) uses this parameter for AWS CloudFormation-specific condition keys in IAM policies. For more information, see Controlling Access with AWS Identity and Access Management .
(string) --
:type RoleARN: string
:param RoleARN: The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation assumes to create the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. AWS CloudFormation always uses this role for all future operations on the stack. As long as users have permission to operate on the stack, AWS CloudFormation uses this role even if the users don't have permission to pass it. Ensure that the role grants least privilege.
If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
:type OnFailure: string
:param OnFailure: Determines what action will be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. You can specify either OnFailure or DisableRollback , but not both.
Default: ROLLBACK
:type StackPolicyBody: string
:param StackPolicyBody: Structure containing the stack policy body. For more information, go to Prevent Updates to Stack Resources in the AWS CloudFormation User Guide . You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
:type StackPolicyURL: string
:param StackPolicyURL: Location of a file containing the stack policy. The URL must point to a policy (maximum size: 16 KB) located in an S3 bucket in the same region as the stack. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
:type Tags: list
:param Tags: Key-value pairs to associate with this stack. AWS CloudFormation also propagates these tags to the resources created in the stack. A maximum number of 10 tags can be specified.
(dict) --The Tag type enables you to specify a key-value pair that can be used to store information about an AWS CloudFormation stack.
Key (string) --
Required . A string used to identify this tag. You can specify a maximum of 128 characters for a tag key. Tags owned by Amazon Web Services (AWS) have the reserved prefix: aws: .
Value (string) --
Required . A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value.
:type ClientRequestToken: string
:param ClientRequestToken: A unique identifier for this CreateStack request. Specify this token if you plan to retry requests so that AWS CloudFormation knows that you're not attempting to create a stack with the same name. You might retry CreateStack requests to ensure that AWS CloudFormation successfully received them.
:rtype: dict
:return: {
'StackId': 'string'
}
"""
pass | Creates a stack as specified in the template. After the call completes successfully, the stack creation starts. You can check the status of the stack via the DescribeStacks API.
See also: AWS API Documentation
:example: response = client.create_stack(
StackName='string',
TemplateBody='string',
TemplateURL='string',
Parameters=[
{
'ParameterKey': 'string',
'ParameterValue': 'string',
'UsePreviousValue': True|False
},
],
DisableRollback=True|False,
TimeoutInMinutes=123,
NotificationARNs=[
'string',
],
Capabilities=[
'CAPABILITY_IAM'|'CAPABILITY_NAMED_IAM',
],
ResourceTypes=[
'string',
],
RoleARN='string',
OnFailure='DO_NOTHING'|'ROLLBACK'|'DELETE',
StackPolicyBody='string',
StackPolicyURL='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
ClientRequestToken='string'
)
:type StackName: string
:param StackName: [REQUIRED]
The name that is associated with the stack. The name must be unique in the region in which you are creating the stack.
Note
A stack name can contain only alphanumeric characters (case sensitive) and hyphens. It must start with an alphabetic character and cannot be longer than 128 characters.
:type TemplateBody: string
:param TemplateBody: Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. For more information, go to Template Anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify either the TemplateBody or the TemplateURL parameter, but not both.
:type TemplateURL: string
:param TemplateURL: Location of file containing the template body. The URL must point to a template (max size: 460,800 bytes) that is located in an Amazon S3 bucket. For more information, go to the Template Anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify either the TemplateBody or the TemplateURL parameter, but not both.
:type Parameters: list
:param Parameters: A list of Parameter structures that specify input parameters for the stack. For more information, see the Parameter data type.
(dict) --The Parameter data type.
ParameterKey (string) --The key associated with the parameter. If you don't specify a key and value for a particular parameter, AWS CloudFormation uses the default value that is specified in your template.
ParameterValue (string) --The value associated with the parameter.
UsePreviousValue (boolean) --During a stack update, use the existing parameter value that the stack is using for a given parameter key. If you specify true , do not specify a parameter value.
:type DisableRollback: boolean
:param DisableRollback: Set to true to disable rollback of the stack if stack creation failed. You can specify either DisableRollback or OnFailure , but not both.
Default: false
:type TimeoutInMinutes: integer
:param TimeoutInMinutes: The amount of time that can pass before the stack status becomes CREATE_FAILED; if DisableRollback is not set or is set to false , the stack will be rolled back.
:type NotificationARNs: list
:param NotificationARNs: The Simple Notification Service (SNS) topic ARNs to publish stack related events. You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI).
(string) --
:type Capabilities: list
:param Capabilities: A list of values that you must specify before AWS CloudFormation can create certain stacks. Some stack templates might include resources that can affect permissions in your AWS account, for example, by creating new AWS Identity and Access Management (IAM) users. For those stacks, you must explicitly acknowledge their capabilities by specifying this parameter.
The only valid values are CAPABILITY_IAM and CAPABILITY_NAMED_IAM . The following resources require you to specify this parameter: AWS::IAM::AccessKey , AWS::IAM::Group , AWS::IAM::InstanceProfile , AWS::IAM::Policy , AWS::IAM::Role , AWS::IAM::User , and AWS::IAM::UserToGroupAddition . If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.
If you have IAM resources, you can specify either capability. If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM . If you don't specify this parameter, this action returns an InsufficientCapabilities error.
For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .
(string) --
:type ResourceTypes: list
:param ResourceTypes: The template resource types that you have permissions to work with for this create stack action, such as AWS::EC2::Instance , AWS::EC2::* , or Custom::MyCustomInstance . Use the following syntax to describe template resource types: AWS::* (for all AWS resource), Custom::* (for all custom resources), Custom::*logical_ID* `` (for a specific custom resource), ``AWS::*service_name* ::* (for all resources of a particular AWS service), and ``AWS::service_name ::resource_logical_ID `` (for a specific AWS resource).
If the list of resource types doesn't include a resource that you're creating, the stack creation fails. By default, AWS CloudFormation grants permissions to all resource types. AWS Identity and Access Management (IAM) uses this parameter for AWS CloudFormation-specific condition keys in IAM policies. For more information, see Controlling Access with AWS Identity and Access Management .
(string) --
:type RoleARN: string
:param RoleARN: The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation assumes to create the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. AWS CloudFormation always uses this role for all future operations on the stack. As long as users have permission to operate on the stack, AWS CloudFormation uses this role even if the users don't have permission to pass it. Ensure that the role grants least privilege.
If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
:type OnFailure: string
:param OnFailure: Determines what action will be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. You can specify either OnFailure or DisableRollback , but not both.
Default: ROLLBACK
:type StackPolicyBody: string
:param StackPolicyBody: Structure containing the stack policy body. For more information, go to Prevent Updates to Stack Resources in the AWS CloudFormation User Guide . You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
:type StackPolicyURL: string
:param StackPolicyURL: Location of a file containing the stack policy. The URL must point to a policy (maximum size: 16 KB) located in an S3 bucket in the same region as the stack. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
:type Tags: list
:param Tags: Key-value pairs to associate with this stack. AWS CloudFormation also propagates these tags to the resources created in the stack. A maximum number of 10 tags can be specified.
(dict) --The Tag type enables you to specify a key-value pair that can be used to store information about an AWS CloudFormation stack.
Key (string) --
Required . A string used to identify this tag. You can specify a maximum of 128 characters for a tag key. Tags owned by Amazon Web Services (AWS) have the reserved prefix: aws: .
Value (string) --
Required . A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value.
:type ClientRequestToken: string
:param ClientRequestToken: A unique identifier for this CreateStack request. Specify this token if you plan to retry requests so that AWS CloudFormation knows that you're not attempting to create a stack with the same name. You might retry CreateStack requests to ensure that AWS CloudFormation successfully received them.
:rtype: dict
:return: {
'StackId': 'string'
} | entailment |
def update_stack(StackName=None, TemplateBody=None, TemplateURL=None, UsePreviousTemplate=None, StackPolicyDuringUpdateBody=None, StackPolicyDuringUpdateURL=None, Parameters=None, Capabilities=None, ResourceTypes=None, RoleARN=None, StackPolicyBody=None, StackPolicyURL=None, NotificationARNs=None, Tags=None, ClientRequestToken=None):
"""
Updates a stack as specified in the template. After the call completes successfully, the stack update starts. You can check the status of the stack via the DescribeStacks action.
To get a copy of the template for an existing stack, you can use the GetTemplate action.
For more information about creating an update template, updating a stack, and monitoring the progress of the update, see Updating a Stack .
See also: AWS API Documentation
Examples
This example adds two stack notification topics to the specified stack.
Expected Output:
:example: response = client.update_stack(
StackName='string',
TemplateBody='string',
TemplateURL='string',
UsePreviousTemplate=True|False,
StackPolicyDuringUpdateBody='string',
StackPolicyDuringUpdateURL='string',
Parameters=[
{
'ParameterKey': 'string',
'ParameterValue': 'string',
'UsePreviousValue': True|False
},
],
Capabilities=[
'CAPABILITY_IAM'|'CAPABILITY_NAMED_IAM',
],
ResourceTypes=[
'string',
],
RoleARN='string',
StackPolicyBody='string',
StackPolicyURL='string',
NotificationARNs=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
ClientRequestToken='string'
)
:type StackName: string
:param StackName: [REQUIRED]
The name or unique stack ID of the stack to update.
:type TemplateBody: string
:param TemplateBody: Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. (For more information, go to Template Anatomy in the AWS CloudFormation User Guide.)
Conditional: You must specify only one of the following parameters: TemplateBody , TemplateURL , or set the UsePreviousTemplate to true .
:type TemplateURL: string
:param TemplateURL: Location of file containing the template body. The URL must point to a template that is located in an Amazon S3 bucket. For more information, go to Template Anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify only one of the following parameters: TemplateBody , TemplateURL , or set the UsePreviousTemplate to true .
:type UsePreviousTemplate: boolean
:param UsePreviousTemplate: Reuse the existing template that is associated with the stack that you are updating.
Conditional: You must specify only one of the following parameters: TemplateBody , TemplateURL , or set the UsePreviousTemplate to true .
:type StackPolicyDuringUpdateBody: string
:param StackPolicyDuringUpdateBody: Structure containing the temporary overriding stack policy body. You can specify either the StackPolicyDuringUpdateBody or the StackPolicyDuringUpdateURL parameter, but not both.
If you want to update protected resources, specify a temporary overriding stack policy during this update. If you do not specify a stack policy, the current policy that is associated with the stack will be used.
:type StackPolicyDuringUpdateURL: string
:param StackPolicyDuringUpdateURL: Location of a file containing the temporary overriding stack policy. The URL must point to a policy (max size: 16KB) located in an S3 bucket in the same region as the stack. You can specify either the StackPolicyDuringUpdateBody or the StackPolicyDuringUpdateURL parameter, but not both.
If you want to update protected resources, specify a temporary overriding stack policy during this update. If you do not specify a stack policy, the current policy that is associated with the stack will be used.
:type Parameters: list
:param Parameters: A list of Parameter structures that specify input parameters for the stack. For more information, see the Parameter data type.
(dict) --The Parameter data type.
ParameterKey (string) --The key associated with the parameter. If you don't specify a key and value for a particular parameter, AWS CloudFormation uses the default value that is specified in your template.
ParameterValue (string) --The value associated with the parameter.
UsePreviousValue (boolean) --During a stack update, use the existing parameter value that the stack is using for a given parameter key. If you specify true , do not specify a parameter value.
:type Capabilities: list
:param Capabilities: A list of values that you must specify before AWS CloudFormation can update certain stacks. Some stack templates might include resources that can affect permissions in your AWS account, for example, by creating new AWS Identity and Access Management (IAM) users. For those stacks, you must explicitly acknowledge their capabilities by specifying this parameter.
The only valid values are CAPABILITY_IAM and CAPABILITY_NAMED_IAM . The following resources require you to specify this parameter: AWS::IAM::AccessKey , AWS::IAM::Group , AWS::IAM::InstanceProfile , AWS::IAM::Policy , AWS::IAM::Role , AWS::IAM::User , and AWS::IAM::UserToGroupAddition . If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.
If you have IAM resources, you can specify either capability. If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM . If you don't specify this parameter, this action returns an InsufficientCapabilities error.
For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .
(string) --
:type ResourceTypes: list
:param ResourceTypes: The template resource types that you have permissions to work with for this update stack action, such as AWS::EC2::Instance , AWS::EC2::* , or Custom::MyCustomInstance .
If the list of resource types doesn't include a resource that you're updating, the stack update fails. By default, AWS CloudFormation grants permissions to all resource types. AWS Identity and Access Management (IAM) uses this parameter for AWS CloudFormation-specific condition keys in IAM policies. For more information, see Controlling Access with AWS Identity and Access Management .
(string) --
:type RoleARN: string
:param RoleARN: The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation assumes to update the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. AWS CloudFormation always uses this role for all future operations on the stack. As long as users have permission to operate on the stack, AWS CloudFormation uses this role even if the users don't have permission to pass it. Ensure that the role grants least privilege.
If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
:type StackPolicyBody: string
:param StackPolicyBody: Structure containing a new stack policy body. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
You might update the stack policy, for example, in order to protect a new resource that you created during a stack update. If you do not specify a stack policy, the current policy that is associated with the stack is unchanged.
:type StackPolicyURL: string
:param StackPolicyURL: Location of a file containing the updated stack policy. The URL must point to a policy (max size: 16KB) located in an S3 bucket in the same region as the stack. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
You might update the stack policy, for example, in order to protect a new resource that you created during a stack update. If you do not specify a stack policy, the current policy that is associated with the stack is unchanged.
:type NotificationARNs: list
:param NotificationARNs: Amazon Simple Notification Service topic Amazon Resource Names (ARNs) that AWS CloudFormation associates with the stack. Specify an empty list to remove all notification topics.
(string) --
:type Tags: list
:param Tags: Key-value pairs to associate with this stack. AWS CloudFormation also propagates these tags to supported resources in the stack. You can specify a maximum number of 10 tags.
If you don't specify this parameter, AWS CloudFormation doesn't modify the stack's tags. If you specify an empty value, AWS CloudFormation removes all associated tags.
(dict) --The Tag type enables you to specify a key-value pair that can be used to store information about an AWS CloudFormation stack.
Key (string) --
Required . A string used to identify this tag. You can specify a maximum of 128 characters for a tag key. Tags owned by Amazon Web Services (AWS) have the reserved prefix: aws: .
Value (string) --
Required . A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value.
:type ClientRequestToken: string
:param ClientRequestToken: A unique identifier for this UpdateStack request. Specify this token if you plan to retry requests so that AWS CloudFormation knows that you're not attempting to update a stack with the same name. You might retry UpdateStack requests to ensure that AWS CloudFormation successfully received them.
:rtype: dict
:return: {
'StackId': 'string'
}
"""
pass | Updates a stack as specified in the template. After the call completes successfully, the stack update starts. You can check the status of the stack via the DescribeStacks action.
To get a copy of the template for an existing stack, you can use the GetTemplate action.
For more information about creating an update template, updating a stack, and monitoring the progress of the update, see Updating a Stack .
See also: AWS API Documentation
Examples
This example adds two stack notification topics to the specified stack.
Expected Output:
:example: response = client.update_stack(
StackName='string',
TemplateBody='string',
TemplateURL='string',
UsePreviousTemplate=True|False,
StackPolicyDuringUpdateBody='string',
StackPolicyDuringUpdateURL='string',
Parameters=[
{
'ParameterKey': 'string',
'ParameterValue': 'string',
'UsePreviousValue': True|False
},
],
Capabilities=[
'CAPABILITY_IAM'|'CAPABILITY_NAMED_IAM',
],
ResourceTypes=[
'string',
],
RoleARN='string',
StackPolicyBody='string',
StackPolicyURL='string',
NotificationARNs=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
ClientRequestToken='string'
)
:type StackName: string
:param StackName: [REQUIRED]
The name or unique stack ID of the stack to update.
:type TemplateBody: string
:param TemplateBody: Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. (For more information, go to Template Anatomy in the AWS CloudFormation User Guide.)
Conditional: You must specify only one of the following parameters: TemplateBody , TemplateURL , or set the UsePreviousTemplate to true .
:type TemplateURL: string
:param TemplateURL: Location of file containing the template body. The URL must point to a template that is located in an Amazon S3 bucket. For more information, go to Template Anatomy in the AWS CloudFormation User Guide.
Conditional: You must specify only one of the following parameters: TemplateBody , TemplateURL , or set the UsePreviousTemplate to true .
:type UsePreviousTemplate: boolean
:param UsePreviousTemplate: Reuse the existing template that is associated with the stack that you are updating.
Conditional: You must specify only one of the following parameters: TemplateBody , TemplateURL , or set the UsePreviousTemplate to true .
:type StackPolicyDuringUpdateBody: string
:param StackPolicyDuringUpdateBody: Structure containing the temporary overriding stack policy body. You can specify either the StackPolicyDuringUpdateBody or the StackPolicyDuringUpdateURL parameter, but not both.
If you want to update protected resources, specify a temporary overriding stack policy during this update. If you do not specify a stack policy, the current policy that is associated with the stack will be used.
:type StackPolicyDuringUpdateURL: string
:param StackPolicyDuringUpdateURL: Location of a file containing the temporary overriding stack policy. The URL must point to a policy (max size: 16KB) located in an S3 bucket in the same region as the stack. You can specify either the StackPolicyDuringUpdateBody or the StackPolicyDuringUpdateURL parameter, but not both.
If you want to update protected resources, specify a temporary overriding stack policy during this update. If you do not specify a stack policy, the current policy that is associated with the stack will be used.
:type Parameters: list
:param Parameters: A list of Parameter structures that specify input parameters for the stack. For more information, see the Parameter data type.
(dict) --The Parameter data type.
ParameterKey (string) --The key associated with the parameter. If you don't specify a key and value for a particular parameter, AWS CloudFormation uses the default value that is specified in your template.
ParameterValue (string) --The value associated with the parameter.
UsePreviousValue (boolean) --During a stack update, use the existing parameter value that the stack is using for a given parameter key. If you specify true , do not specify a parameter value.
:type Capabilities: list
:param Capabilities: A list of values that you must specify before AWS CloudFormation can update certain stacks. Some stack templates might include resources that can affect permissions in your AWS account, for example, by creating new AWS Identity and Access Management (IAM) users. For those stacks, you must explicitly acknowledge their capabilities by specifying this parameter.
The only valid values are CAPABILITY_IAM and CAPABILITY_NAMED_IAM . The following resources require you to specify this parameter: AWS::IAM::AccessKey , AWS::IAM::Group , AWS::IAM::InstanceProfile , AWS::IAM::Policy , AWS::IAM::Role , AWS::IAM::User , and AWS::IAM::UserToGroupAddition . If your stack template contains these resources, we recommend that you review all permissions associated with them and edit their permissions if necessary.
If you have IAM resources, you can specify either capability. If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM . If you don't specify this parameter, this action returns an InsufficientCapabilities error.
For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .
(string) --
:type ResourceTypes: list
:param ResourceTypes: The template resource types that you have permissions to work with for this update stack action, such as AWS::EC2::Instance , AWS::EC2::* , or Custom::MyCustomInstance .
If the list of resource types doesn't include a resource that you're updating, the stack update fails. By default, AWS CloudFormation grants permissions to all resource types. AWS Identity and Access Management (IAM) uses this parameter for AWS CloudFormation-specific condition keys in IAM policies. For more information, see Controlling Access with AWS Identity and Access Management .
(string) --
:type RoleARN: string
:param RoleARN: The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation assumes to update the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. AWS CloudFormation always uses this role for all future operations on the stack. As long as users have permission to operate on the stack, AWS CloudFormation uses this role even if the users don't have permission to pass it. Ensure that the role grants least privilege.
If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
:type StackPolicyBody: string
:param StackPolicyBody: Structure containing a new stack policy body. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
You might update the stack policy, for example, in order to protect a new resource that you created during a stack update. If you do not specify a stack policy, the current policy that is associated with the stack is unchanged.
:type StackPolicyURL: string
:param StackPolicyURL: Location of a file containing the updated stack policy. The URL must point to a policy (max size: 16KB) located in an S3 bucket in the same region as the stack. You can specify either the StackPolicyBody or the StackPolicyURL parameter, but not both.
You might update the stack policy, for example, in order to protect a new resource that you created during a stack update. If you do not specify a stack policy, the current policy that is associated with the stack is unchanged.
:type NotificationARNs: list
:param NotificationARNs: Amazon Simple Notification Service topic Amazon Resource Names (ARNs) that AWS CloudFormation associates with the stack. Specify an empty list to remove all notification topics.
(string) --
:type Tags: list
:param Tags: Key-value pairs to associate with this stack. AWS CloudFormation also propagates these tags to supported resources in the stack. You can specify a maximum number of 10 tags.
If you don't specify this parameter, AWS CloudFormation doesn't modify the stack's tags. If you specify an empty value, AWS CloudFormation removes all associated tags.
(dict) --The Tag type enables you to specify a key-value pair that can be used to store information about an AWS CloudFormation stack.
Key (string) --
Required . A string used to identify this tag. You can specify a maximum of 128 characters for a tag key. Tags owned by Amazon Web Services (AWS) have the reserved prefix: aws: .
Value (string) --
Required . A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value.
:type ClientRequestToken: string
:param ClientRequestToken: A unique identifier for this UpdateStack request. Specify this token if you plan to retry requests so that AWS CloudFormation knows that you're not attempting to update a stack with the same name. You might retry UpdateStack requests to ensure that AWS CloudFormation successfully received them.
:rtype: dict
:return: {
'StackId': 'string'
} | entailment |
def create_case(subject=None, serviceCode=None, severityCode=None, categoryCode=None, communicationBody=None, ccEmailAddresses=None, language=None, issueType=None, attachmentSetId=None):
"""
Creates a new case in the AWS Support Center. This operation is modeled on the behavior of the AWS Support Center Create Case page. Its parameters require you to specify the following information:
A successful CreateCase request returns an AWS Support case number. Case numbers are used by the DescribeCases operation to retrieve existing AWS Support cases.
See also: AWS API Documentation
:example: response = client.create_case(
subject='string',
serviceCode='string',
severityCode='string',
categoryCode='string',
communicationBody='string',
ccEmailAddresses=[
'string',
],
language='string',
issueType='string',
attachmentSetId='string'
)
:type subject: string
:param subject: [REQUIRED]
The title of the AWS Support case.
:type serviceCode: string
:param serviceCode: The code for the AWS service returned by the call to DescribeServices .
:type severityCode: string
:param severityCode: The code for the severity level returned by the call to DescribeSeverityLevels .
Note
The availability of severity levels depends on each customer's support subscription. In other words, your subscription may not necessarily require the urgent level of response time.
:type categoryCode: string
:param categoryCode: The category of problem for the AWS Support case.
:type communicationBody: string
:param communicationBody: [REQUIRED]
The communication body text when you create an AWS Support case by calling CreateCase .
:type ccEmailAddresses: list
:param ccEmailAddresses: A list of email addresses that AWS Support copies on case correspondence.
(string) --
:type language: string
:param language: The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ('en') and Japanese ('ja'). Language parameters must be passed explicitly for operations that take them.
:type issueType: string
:param issueType: The type of issue for the case. You can specify either 'customer-service' or 'technical.' If you do not indicate a value, the default is 'technical.'
:type attachmentSetId: string
:param attachmentSetId: The ID of a set of one or more attachments for the case. Create the set by using AddAttachmentsToSet .
:rtype: dict
:return: {
'caseId': 'string'
}
:returns:
subject (string) -- [REQUIRED]
The title of the AWS Support case.
serviceCode (string) -- The code for the AWS service returned by the call to DescribeServices .
severityCode (string) -- The code for the severity level returned by the call to DescribeSeverityLevels .
Note
The availability of severity levels depends on each customer's support subscription. In other words, your subscription may not necessarily require the urgent level of response time.
categoryCode (string) -- The category of problem for the AWS Support case.
communicationBody (string) -- [REQUIRED]
The communication body text when you create an AWS Support case by calling CreateCase .
ccEmailAddresses (list) -- A list of email addresses that AWS Support copies on case correspondence.
(string) --
language (string) -- The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.
issueType (string) -- The type of issue for the case. You can specify either "customer-service" or "technical." If you do not indicate a value, the default is "technical."
attachmentSetId (string) -- The ID of a set of one or more attachments for the case. Create the set by using AddAttachmentsToSet .
"""
pass | Creates a new case in the AWS Support Center. This operation is modeled on the behavior of the AWS Support Center Create Case page. Its parameters require you to specify the following information:
A successful CreateCase request returns an AWS Support case number. Case numbers are used by the DescribeCases operation to retrieve existing AWS Support cases.
See also: AWS API Documentation
:example: response = client.create_case(
subject='string',
serviceCode='string',
severityCode='string',
categoryCode='string',
communicationBody='string',
ccEmailAddresses=[
'string',
],
language='string',
issueType='string',
attachmentSetId='string'
)
:type subject: string
:param subject: [REQUIRED]
The title of the AWS Support case.
:type serviceCode: string
:param serviceCode: The code for the AWS service returned by the call to DescribeServices .
:type severityCode: string
:param severityCode: The code for the severity level returned by the call to DescribeSeverityLevels .
Note
The availability of severity levels depends on each customer's support subscription. In other words, your subscription may not necessarily require the urgent level of response time.
:type categoryCode: string
:param categoryCode: The category of problem for the AWS Support case.
:type communicationBody: string
:param communicationBody: [REQUIRED]
The communication body text when you create an AWS Support case by calling CreateCase .
:type ccEmailAddresses: list
:param ccEmailAddresses: A list of email addresses that AWS Support copies on case correspondence.
(string) --
:type language: string
:param language: The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ('en') and Japanese ('ja'). Language parameters must be passed explicitly for operations that take them.
:type issueType: string
:param issueType: The type of issue for the case. You can specify either 'customer-service' or 'technical.' If you do not indicate a value, the default is 'technical.'
:type attachmentSetId: string
:param attachmentSetId: The ID of a set of one or more attachments for the case. Create the set by using AddAttachmentsToSet .
:rtype: dict
:return: {
'caseId': 'string'
}
:returns:
subject (string) -- [REQUIRED]
The title of the AWS Support case.
serviceCode (string) -- The code for the AWS service returned by the call to DescribeServices .
severityCode (string) -- The code for the severity level returned by the call to DescribeSeverityLevels .
Note
The availability of severity levels depends on each customer's support subscription. In other words, your subscription may not necessarily require the urgent level of response time.
categoryCode (string) -- The category of problem for the AWS Support case.
communicationBody (string) -- [REQUIRED]
The communication body text when you create an AWS Support case by calling CreateCase .
ccEmailAddresses (list) -- A list of email addresses that AWS Support copies on case correspondence.
(string) --
language (string) -- The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.
issueType (string) -- The type of issue for the case. You can specify either "customer-service" or "technical." If you do not indicate a value, the default is "technical."
attachmentSetId (string) -- The ID of a set of one or more attachments for the case. Create the set by using AddAttachmentsToSet . | entailment |
def describe_cases(caseIdList=None, displayId=None, afterTime=None, beforeTime=None, includeResolvedCases=None, nextToken=None, maxResults=None, language=None, includeCommunications=None):
"""
Returns a list of cases that you specify by passing one or more case IDs. In addition, you can filter the cases by date by setting values for the afterTime and beforeTime request parameters. You can set values for the includeResolvedCases and includeCommunications request parameters to control how much information is returned.
Case data is available for 12 months after creation. If a case was created more than 12 months ago, a request for data might cause an error.
The response returns the following in JSON format:
See also: AWS API Documentation
:example: response = client.describe_cases(
caseIdList=[
'string',
],
displayId='string',
afterTime='string',
beforeTime='string',
includeResolvedCases=True|False,
nextToken='string',
maxResults=123,
language='string',
includeCommunications=True|False
)
:type caseIdList: list
:param caseIdList: A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.
(string) --
:type displayId: string
:param displayId: The ID displayed for a case in the AWS Support Center user interface.
:type afterTime: string
:param afterTime: The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
:type beforeTime: string
:param beforeTime: The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
:type includeResolvedCases: boolean
:param includeResolvedCases: Specifies whether resolved support cases should be included in the DescribeCases results. The default is false .
:type nextToken: string
:param nextToken: A resumption point for pagination.
:type maxResults: integer
:param maxResults: The maximum number of results to return before paginating.
:type language: string
:param language: The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ('en') and Japanese ('ja'). Language parameters must be passed explicitly for operations that take them.
:type includeCommunications: boolean
:param includeCommunications: Specifies whether communications should be included in the DescribeCases results. The default is true .
:rtype: dict
:return: {
'cases': [
{
'caseId': 'string',
'displayId': 'string',
'subject': 'string',
'status': 'string',
'serviceCode': 'string',
'categoryCode': 'string',
'severityCode': 'string',
'submittedBy': 'string',
'timeCreated': 'string',
'recentCommunications': {
'communications': [
{
'caseId': 'string',
'body': 'string',
'submittedBy': 'string',
'timeCreated': 'string',
'attachmentSet': [
{
'attachmentId': 'string',
'fileName': 'string'
},
]
},
],
'nextToken': 'string'
},
'ccEmailAddresses': [
'string',
],
'language': 'string'
},
],
'nextToken': 'string'
}
:returns:
caseIdList (list) -- A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.
(string) --
displayId (string) -- The ID displayed for a case in the AWS Support Center user interface.
afterTime (string) -- The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
beforeTime (string) -- The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
includeResolvedCases (boolean) -- Specifies whether resolved support cases should be included in the DescribeCases results. The default is false .
nextToken (string) -- A resumption point for pagination.
maxResults (integer) -- The maximum number of results to return before paginating.
language (string) -- The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.
includeCommunications (boolean) -- Specifies whether communications should be included in the DescribeCases results. The default is true .
"""
pass | Returns a list of cases that you specify by passing one or more case IDs. In addition, you can filter the cases by date by setting values for the afterTime and beforeTime request parameters. You can set values for the includeResolvedCases and includeCommunications request parameters to control how much information is returned.
Case data is available for 12 months after creation. If a case was created more than 12 months ago, a request for data might cause an error.
The response returns the following in JSON format:
See also: AWS API Documentation
:example: response = client.describe_cases(
caseIdList=[
'string',
],
displayId='string',
afterTime='string',
beforeTime='string',
includeResolvedCases=True|False,
nextToken='string',
maxResults=123,
language='string',
includeCommunications=True|False
)
:type caseIdList: list
:param caseIdList: A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.
(string) --
:type displayId: string
:param displayId: The ID displayed for a case in the AWS Support Center user interface.
:type afterTime: string
:param afterTime: The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
:type beforeTime: string
:param beforeTime: The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
:type includeResolvedCases: boolean
:param includeResolvedCases: Specifies whether resolved support cases should be included in the DescribeCases results. The default is false .
:type nextToken: string
:param nextToken: A resumption point for pagination.
:type maxResults: integer
:param maxResults: The maximum number of results to return before paginating.
:type language: string
:param language: The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ('en') and Japanese ('ja'). Language parameters must be passed explicitly for operations that take them.
:type includeCommunications: boolean
:param includeCommunications: Specifies whether communications should be included in the DescribeCases results. The default is true .
:rtype: dict
:return: {
'cases': [
{
'caseId': 'string',
'displayId': 'string',
'subject': 'string',
'status': 'string',
'serviceCode': 'string',
'categoryCode': 'string',
'severityCode': 'string',
'submittedBy': 'string',
'timeCreated': 'string',
'recentCommunications': {
'communications': [
{
'caseId': 'string',
'body': 'string',
'submittedBy': 'string',
'timeCreated': 'string',
'attachmentSet': [
{
'attachmentId': 'string',
'fileName': 'string'
},
]
},
],
'nextToken': 'string'
},
'ccEmailAddresses': [
'string',
],
'language': 'string'
},
],
'nextToken': 'string'
}
:returns:
caseIdList (list) -- A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.
(string) --
displayId (string) -- The ID displayed for a case in the AWS Support Center user interface.
afterTime (string) -- The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
beforeTime (string) -- The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
includeResolvedCases (boolean) -- Specifies whether resolved support cases should be included in the DescribeCases results. The default is false .
nextToken (string) -- A resumption point for pagination.
maxResults (integer) -- The maximum number of results to return before paginating.
language (string) -- The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.
includeCommunications (boolean) -- Specifies whether communications should be included in the DescribeCases results. The default is true . | entailment |
def create_user_pool(PoolName=None, Policies=None, LambdaConfig=None, AutoVerifiedAttributes=None, AliasAttributes=None, SmsVerificationMessage=None, EmailVerificationMessage=None, EmailVerificationSubject=None, SmsAuthenticationMessage=None, MfaConfiguration=None, DeviceConfiguration=None, EmailConfiguration=None, SmsConfiguration=None, UserPoolTags=None, AdminCreateUserConfig=None, Schema=None):
"""
Creates a new Amazon Cognito user pool and sets the password policy for the pool.
See also: AWS API Documentation
:example: response = client.create_user_pool(
PoolName='string',
Policies={
'PasswordPolicy': {
'MinimumLength': 123,
'RequireUppercase': True|False,
'RequireLowercase': True|False,
'RequireNumbers': True|False,
'RequireSymbols': True|False
}
},
LambdaConfig={
'PreSignUp': 'string',
'CustomMessage': 'string',
'PostConfirmation': 'string',
'PreAuthentication': 'string',
'PostAuthentication': 'string',
'DefineAuthChallenge': 'string',
'CreateAuthChallenge': 'string',
'VerifyAuthChallengeResponse': 'string'
},
AutoVerifiedAttributes=[
'phone_number'|'email',
],
AliasAttributes=[
'phone_number'|'email'|'preferred_username',
],
SmsVerificationMessage='string',
EmailVerificationMessage='string',
EmailVerificationSubject='string',
SmsAuthenticationMessage='string',
MfaConfiguration='OFF'|'ON'|'OPTIONAL',
DeviceConfiguration={
'ChallengeRequiredOnNewDevice': True|False,
'DeviceOnlyRememberedOnUserPrompt': True|False
},
EmailConfiguration={
'SourceArn': 'string',
'ReplyToEmailAddress': 'string'
},
SmsConfiguration={
'SnsCallerArn': 'string',
'ExternalId': 'string'
},
UserPoolTags={
'string': 'string'
},
AdminCreateUserConfig={
'AllowAdminCreateUserOnly': True|False,
'UnusedAccountValidityDays': 123,
'InviteMessageTemplate': {
'SMSMessage': 'string',
'EmailMessage': 'string',
'EmailSubject': 'string'
}
},
Schema=[
{
'Name': 'string',
'AttributeDataType': 'String'|'Number'|'DateTime'|'Boolean',
'DeveloperOnlyAttribute': True|False,
'Mutable': True|False,
'Required': True|False,
'NumberAttributeConstraints': {
'MinValue': 'string',
'MaxValue': 'string'
},
'StringAttributeConstraints': {
'MinLength': 'string',
'MaxLength': 'string'
}
},
]
)
:type PoolName: string
:param PoolName: [REQUIRED]
A string used to name the user pool.
:type Policies: dict
:param Policies: The policies associated with the new user pool.
PasswordPolicy (dict) --A container for information about the user pool password policy.
MinimumLength (integer) --The minimum length of the password policy that you have set. Cannot be less than 6.
RequireUppercase (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one uppercase letter in their password.
RequireLowercase (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one lowercase letter in their password.
RequireNumbers (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one number in their password.
RequireSymbols (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one symbol in their password.
:type LambdaConfig: dict
:param LambdaConfig: The Lambda trigger configuration information for the new user pool.
PreSignUp (string) --A pre-registration AWS Lambda trigger.
CustomMessage (string) --A custom Message AWS Lambda trigger.
PostConfirmation (string) --A post-confirmation AWS Lambda trigger.
PreAuthentication (string) --A pre-authentication AWS Lambda trigger.
PostAuthentication (string) --A post-authentication AWS Lambda trigger.
DefineAuthChallenge (string) --Defines the authentication challenge.
CreateAuthChallenge (string) --Creates an authentication challenge.
VerifyAuthChallengeResponse (string) --Verifies the authentication challenge response.
:type AutoVerifiedAttributes: list
:param AutoVerifiedAttributes: The attributes to be auto-verified. Possible values: email , phone_number .
(string) --
:type AliasAttributes: list
:param AliasAttributes: Attributes supported as an alias for this user pool. Possible values: phone_number , email , or preferred_username .
(string) --
:type SmsVerificationMessage: string
:param SmsVerificationMessage: A string representing the SMS verification message.
:type EmailVerificationMessage: string
:param EmailVerificationMessage: A string representing the email verification message.
:type EmailVerificationSubject: string
:param EmailVerificationSubject: A string representing the email verification subject.
:type SmsAuthenticationMessage: string
:param SmsAuthenticationMessage: A string representing the SMS authentication message.
:type MfaConfiguration: string
:param MfaConfiguration: Specifies MFA configuration details.
:type DeviceConfiguration: dict
:param DeviceConfiguration: The device configuration.
ChallengeRequiredOnNewDevice (boolean) --Indicates whether a challenge is required on a new device. Only applicable to a new device.
DeviceOnlyRememberedOnUserPrompt (boolean) --If true, a device is only remembered on user prompt.
:type EmailConfiguration: dict
:param EmailConfiguration: The email configuration.
SourceArn (string) --The Amazon Resource Name (ARN) of the email source.
ReplyToEmailAddress (string) --The REPLY-TO email address.
:type SmsConfiguration: dict
:param SmsConfiguration: The SMS configuration.
SnsCallerArn (string) -- [REQUIRED]The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller.
ExternalId (string) --The external ID.
:type UserPoolTags: dict
:param UserPoolTags: The cost allocation tags for the user pool. For more information, see Adding Cost Allocation Tags to Your User Pool
(string) --
(string) --
:type AdminCreateUserConfig: dict
:param AdminCreateUserConfig: The configuration for AdminCreateUser requests.
AllowAdminCreateUserOnly (boolean) --Set to True if only the administrator is allowed to create user profiles. Set to False if users can sign themselves up via an app.
UnusedAccountValidityDays (integer) --The user account expiration limit, in days, after which the account is no longer usable. To reset the account after that time limit, you must call AdminCreateUser again, specifying 'RESEND' for the MessageAction parameter. The default value for this parameter is 7.
InviteMessageTemplate (dict) --The message template to be used for the welcome message to new users.
SMSMessage (string) --The message template for SMS messages.
EmailMessage (string) --The message template for email messages.
EmailSubject (string) --The subject line for email messages.
:type Schema: list
:param Schema: An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.
(dict) --Contains information about the schema attribute.
Name (string) --A schema attribute of the name type.
AttributeDataType (string) --The attribute data type.
DeveloperOnlyAttribute (boolean) --Specifies whether the attribute type is developer only.
Mutable (boolean) --Specifies whether the attribute can be changed once it has been created.
Required (boolean) --Specifies whether a user pool attribute is required. If the attribute is required and the user does not provide a value, registration or sign-in will fail.
NumberAttributeConstraints (dict) --Specifies the constraints for an attribute of the number type.
MinValue (string) --The minimum value of an attribute that is of the number data type.
MaxValue (string) --The maximum value of an attribute that is of the number data type.
StringAttributeConstraints (dict) --Specifies the constraints for an attribute of the string type.
MinLength (string) --The minimum length of an attribute value of the string type.
MaxLength (string) --The maximum length of an attribute value of the string type.
:rtype: dict
:return: {
'UserPool': {
'Id': 'string',
'Name': 'string',
'Policies': {
'PasswordPolicy': {
'MinimumLength': 123,
'RequireUppercase': True|False,
'RequireLowercase': True|False,
'RequireNumbers': True|False,
'RequireSymbols': True|False
}
},
'LambdaConfig': {
'PreSignUp': 'string',
'CustomMessage': 'string',
'PostConfirmation': 'string',
'PreAuthentication': 'string',
'PostAuthentication': 'string',
'DefineAuthChallenge': 'string',
'CreateAuthChallenge': 'string',
'VerifyAuthChallengeResponse': 'string'
},
'Status': 'Enabled'|'Disabled',
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1),
'SchemaAttributes': [
{
'Name': 'string',
'AttributeDataType': 'String'|'Number'|'DateTime'|'Boolean',
'DeveloperOnlyAttribute': True|False,
'Mutable': True|False,
'Required': True|False,
'NumberAttributeConstraints': {
'MinValue': 'string',
'MaxValue': 'string'
},
'StringAttributeConstraints': {
'MinLength': 'string',
'MaxLength': 'string'
}
},
],
'AutoVerifiedAttributes': [
'phone_number'|'email',
],
'AliasAttributes': [
'phone_number'|'email'|'preferred_username',
],
'SmsVerificationMessage': 'string',
'EmailVerificationMessage': 'string',
'EmailVerificationSubject': 'string',
'SmsAuthenticationMessage': 'string',
'MfaConfiguration': 'OFF'|'ON'|'OPTIONAL',
'DeviceConfiguration': {
'ChallengeRequiredOnNewDevice': True|False,
'DeviceOnlyRememberedOnUserPrompt': True|False
},
'EstimatedNumberOfUsers': 123,
'EmailConfiguration': {
'SourceArn': 'string',
'ReplyToEmailAddress': 'string'
},
'SmsConfiguration': {
'SnsCallerArn': 'string',
'ExternalId': 'string'
},
'UserPoolTags': {
'string': 'string'
},
'SmsConfigurationFailure': 'string',
'EmailConfigurationFailure': 'string',
'AdminCreateUserConfig': {
'AllowAdminCreateUserOnly': True|False,
'UnusedAccountValidityDays': 123,
'InviteMessageTemplate': {
'SMSMessage': 'string',
'EmailMessage': 'string',
'EmailSubject': 'string'
}
}
}
}
:returns:
(string) --
"""
pass | Creates a new Amazon Cognito user pool and sets the password policy for the pool.
See also: AWS API Documentation
:example: response = client.create_user_pool(
PoolName='string',
Policies={
'PasswordPolicy': {
'MinimumLength': 123,
'RequireUppercase': True|False,
'RequireLowercase': True|False,
'RequireNumbers': True|False,
'RequireSymbols': True|False
}
},
LambdaConfig={
'PreSignUp': 'string',
'CustomMessage': 'string',
'PostConfirmation': 'string',
'PreAuthentication': 'string',
'PostAuthentication': 'string',
'DefineAuthChallenge': 'string',
'CreateAuthChallenge': 'string',
'VerifyAuthChallengeResponse': 'string'
},
AutoVerifiedAttributes=[
'phone_number'|'email',
],
AliasAttributes=[
'phone_number'|'email'|'preferred_username',
],
SmsVerificationMessage='string',
EmailVerificationMessage='string',
EmailVerificationSubject='string',
SmsAuthenticationMessage='string',
MfaConfiguration='OFF'|'ON'|'OPTIONAL',
DeviceConfiguration={
'ChallengeRequiredOnNewDevice': True|False,
'DeviceOnlyRememberedOnUserPrompt': True|False
},
EmailConfiguration={
'SourceArn': 'string',
'ReplyToEmailAddress': 'string'
},
SmsConfiguration={
'SnsCallerArn': 'string',
'ExternalId': 'string'
},
UserPoolTags={
'string': 'string'
},
AdminCreateUserConfig={
'AllowAdminCreateUserOnly': True|False,
'UnusedAccountValidityDays': 123,
'InviteMessageTemplate': {
'SMSMessage': 'string',
'EmailMessage': 'string',
'EmailSubject': 'string'
}
},
Schema=[
{
'Name': 'string',
'AttributeDataType': 'String'|'Number'|'DateTime'|'Boolean',
'DeveloperOnlyAttribute': True|False,
'Mutable': True|False,
'Required': True|False,
'NumberAttributeConstraints': {
'MinValue': 'string',
'MaxValue': 'string'
},
'StringAttributeConstraints': {
'MinLength': 'string',
'MaxLength': 'string'
}
},
]
)
:type PoolName: string
:param PoolName: [REQUIRED]
A string used to name the user pool.
:type Policies: dict
:param Policies: The policies associated with the new user pool.
PasswordPolicy (dict) --A container for information about the user pool password policy.
MinimumLength (integer) --The minimum length of the password policy that you have set. Cannot be less than 6.
RequireUppercase (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one uppercase letter in their password.
RequireLowercase (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one lowercase letter in their password.
RequireNumbers (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one number in their password.
RequireSymbols (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one symbol in their password.
:type LambdaConfig: dict
:param LambdaConfig: The Lambda trigger configuration information for the new user pool.
PreSignUp (string) --A pre-registration AWS Lambda trigger.
CustomMessage (string) --A custom Message AWS Lambda trigger.
PostConfirmation (string) --A post-confirmation AWS Lambda trigger.
PreAuthentication (string) --A pre-authentication AWS Lambda trigger.
PostAuthentication (string) --A post-authentication AWS Lambda trigger.
DefineAuthChallenge (string) --Defines the authentication challenge.
CreateAuthChallenge (string) --Creates an authentication challenge.
VerifyAuthChallengeResponse (string) --Verifies the authentication challenge response.
:type AutoVerifiedAttributes: list
:param AutoVerifiedAttributes: The attributes to be auto-verified. Possible values: email , phone_number .
(string) --
:type AliasAttributes: list
:param AliasAttributes: Attributes supported as an alias for this user pool. Possible values: phone_number , email , or preferred_username .
(string) --
:type SmsVerificationMessage: string
:param SmsVerificationMessage: A string representing the SMS verification message.
:type EmailVerificationMessage: string
:param EmailVerificationMessage: A string representing the email verification message.
:type EmailVerificationSubject: string
:param EmailVerificationSubject: A string representing the email verification subject.
:type SmsAuthenticationMessage: string
:param SmsAuthenticationMessage: A string representing the SMS authentication message.
:type MfaConfiguration: string
:param MfaConfiguration: Specifies MFA configuration details.
:type DeviceConfiguration: dict
:param DeviceConfiguration: The device configuration.
ChallengeRequiredOnNewDevice (boolean) --Indicates whether a challenge is required on a new device. Only applicable to a new device.
DeviceOnlyRememberedOnUserPrompt (boolean) --If true, a device is only remembered on user prompt.
:type EmailConfiguration: dict
:param EmailConfiguration: The email configuration.
SourceArn (string) --The Amazon Resource Name (ARN) of the email source.
ReplyToEmailAddress (string) --The REPLY-TO email address.
:type SmsConfiguration: dict
:param SmsConfiguration: The SMS configuration.
SnsCallerArn (string) -- [REQUIRED]The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller.
ExternalId (string) --The external ID.
:type UserPoolTags: dict
:param UserPoolTags: The cost allocation tags for the user pool. For more information, see Adding Cost Allocation Tags to Your User Pool
(string) --
(string) --
:type AdminCreateUserConfig: dict
:param AdminCreateUserConfig: The configuration for AdminCreateUser requests.
AllowAdminCreateUserOnly (boolean) --Set to True if only the administrator is allowed to create user profiles. Set to False if users can sign themselves up via an app.
UnusedAccountValidityDays (integer) --The user account expiration limit, in days, after which the account is no longer usable. To reset the account after that time limit, you must call AdminCreateUser again, specifying 'RESEND' for the MessageAction parameter. The default value for this parameter is 7.
InviteMessageTemplate (dict) --The message template to be used for the welcome message to new users.
SMSMessage (string) --The message template for SMS messages.
EmailMessage (string) --The message template for email messages.
EmailSubject (string) --The subject line for email messages.
:type Schema: list
:param Schema: An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.
(dict) --Contains information about the schema attribute.
Name (string) --A schema attribute of the name type.
AttributeDataType (string) --The attribute data type.
DeveloperOnlyAttribute (boolean) --Specifies whether the attribute type is developer only.
Mutable (boolean) --Specifies whether the attribute can be changed once it has been created.
Required (boolean) --Specifies whether a user pool attribute is required. If the attribute is required and the user does not provide a value, registration or sign-in will fail.
NumberAttributeConstraints (dict) --Specifies the constraints for an attribute of the number type.
MinValue (string) --The minimum value of an attribute that is of the number data type.
MaxValue (string) --The maximum value of an attribute that is of the number data type.
StringAttributeConstraints (dict) --Specifies the constraints for an attribute of the string type.
MinLength (string) --The minimum length of an attribute value of the string type.
MaxLength (string) --The maximum length of an attribute value of the string type.
:rtype: dict
:return: {
'UserPool': {
'Id': 'string',
'Name': 'string',
'Policies': {
'PasswordPolicy': {
'MinimumLength': 123,
'RequireUppercase': True|False,
'RequireLowercase': True|False,
'RequireNumbers': True|False,
'RequireSymbols': True|False
}
},
'LambdaConfig': {
'PreSignUp': 'string',
'CustomMessage': 'string',
'PostConfirmation': 'string',
'PreAuthentication': 'string',
'PostAuthentication': 'string',
'DefineAuthChallenge': 'string',
'CreateAuthChallenge': 'string',
'VerifyAuthChallengeResponse': 'string'
},
'Status': 'Enabled'|'Disabled',
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1),
'SchemaAttributes': [
{
'Name': 'string',
'AttributeDataType': 'String'|'Number'|'DateTime'|'Boolean',
'DeveloperOnlyAttribute': True|False,
'Mutable': True|False,
'Required': True|False,
'NumberAttributeConstraints': {
'MinValue': 'string',
'MaxValue': 'string'
},
'StringAttributeConstraints': {
'MinLength': 'string',
'MaxLength': 'string'
}
},
],
'AutoVerifiedAttributes': [
'phone_number'|'email',
],
'AliasAttributes': [
'phone_number'|'email'|'preferred_username',
],
'SmsVerificationMessage': 'string',
'EmailVerificationMessage': 'string',
'EmailVerificationSubject': 'string',
'SmsAuthenticationMessage': 'string',
'MfaConfiguration': 'OFF'|'ON'|'OPTIONAL',
'DeviceConfiguration': {
'ChallengeRequiredOnNewDevice': True|False,
'DeviceOnlyRememberedOnUserPrompt': True|False
},
'EstimatedNumberOfUsers': 123,
'EmailConfiguration': {
'SourceArn': 'string',
'ReplyToEmailAddress': 'string'
},
'SmsConfiguration': {
'SnsCallerArn': 'string',
'ExternalId': 'string'
},
'UserPoolTags': {
'string': 'string'
},
'SmsConfigurationFailure': 'string',
'EmailConfigurationFailure': 'string',
'AdminCreateUserConfig': {
'AllowAdminCreateUserOnly': True|False,
'UnusedAccountValidityDays': 123,
'InviteMessageTemplate': {
'SMSMessage': 'string',
'EmailMessage': 'string',
'EmailSubject': 'string'
}
}
}
}
:returns:
(string) -- | entailment |
def create_user_pool_client(UserPoolId=None, ClientName=None, GenerateSecret=None, RefreshTokenValidity=None, ReadAttributes=None, WriteAttributes=None, ExplicitAuthFlows=None, SupportedIdentityProviders=None, CallbackURLs=None, LogoutURLs=None, DefaultRedirectURI=None, AllowedOAuthFlows=None, AllowedOAuthScopes=None, AllowedOAuthFlowsUserPoolClient=None):
"""
Creates the user pool client.
See also: AWS API Documentation
:example: response = client.create_user_pool_client(
UserPoolId='string',
ClientName='string',
GenerateSecret=True|False,
RefreshTokenValidity=123,
ReadAttributes=[
'string',
],
WriteAttributes=[
'string',
],
ExplicitAuthFlows=[
'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY',
],
SupportedIdentityProviders=[
'string',
],
CallbackURLs=[
'string',
],
LogoutURLs=[
'string',
],
DefaultRedirectURI='string',
AllowedOAuthFlows=[
'code'|'implicit'|'client_credentials',
],
AllowedOAuthScopes=[
'string',
],
AllowedOAuthFlowsUserPoolClient=True|False
)
:type UserPoolId: string
:param UserPoolId: [REQUIRED]
The user pool ID for the user pool where you want to create a user pool client.
:type ClientName: string
:param ClientName: [REQUIRED]
The client name for the user pool client you would like to create.
:type GenerateSecret: boolean
:param GenerateSecret: Boolean to specify whether you want to generate a secret for the user pool client being created.
:type RefreshTokenValidity: integer
:param RefreshTokenValidity: The time limit, in days, after which the refresh token is no longer valid and cannot be used.
:type ReadAttributes: list
:param ReadAttributes: The read attributes.
(string) --
:type WriteAttributes: list
:param WriteAttributes: The write attributes.
(string) --
:type ExplicitAuthFlows: list
:param ExplicitAuthFlows: The explicit authentication flows.
(string) --
:type SupportedIdentityProviders: list
:param SupportedIdentityProviders: A list of provider names for the identity providers that are supported on this client.
(string) --
:type CallbackURLs: list
:param CallbackURLs: A list of allowed callback URLs for the identity providers.
(string) --
:type LogoutURLs: list
:param LogoutURLs: A list of allowed logout URLs for the identity providers.
(string) --
:type DefaultRedirectURI: string
:param DefaultRedirectURI: The default redirect URI. Must be in the CallbackURLs list.
:type AllowedOAuthFlows: list
:param AllowedOAuthFlows: Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.
Set to token to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.
(string) --
:type AllowedOAuthScopes: list
:param AllowedOAuthScopes: A list of allowed OAuth scopes. Currently supported values are 'phone' , 'email' , 'openid' , and 'Cognito' .
(string) --
:type AllowedOAuthFlowsUserPoolClient: boolean
:param AllowedOAuthFlowsUserPoolClient: Set to True if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.
:rtype: dict
:return: {
'UserPoolClient': {
'UserPoolId': 'string',
'ClientName': 'string',
'ClientId': 'string',
'ClientSecret': 'string',
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1),
'RefreshTokenValidity': 123,
'ReadAttributes': [
'string',
],
'WriteAttributes': [
'string',
],
'ExplicitAuthFlows': [
'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY',
],
'SupportedIdentityProviders': [
'string',
],
'CallbackURLs': [
'string',
],
'LogoutURLs': [
'string',
],
'DefaultRedirectURI': 'string',
'AllowedOAuthFlows': [
'code'|'implicit'|'client_credentials',
],
'AllowedOAuthScopes': [
'string',
],
'AllowedOAuthFlowsUserPoolClient': True|False
}
}
:returns:
(string) --
"""
pass | Creates the user pool client.
See also: AWS API Documentation
:example: response = client.create_user_pool_client(
UserPoolId='string',
ClientName='string',
GenerateSecret=True|False,
RefreshTokenValidity=123,
ReadAttributes=[
'string',
],
WriteAttributes=[
'string',
],
ExplicitAuthFlows=[
'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY',
],
SupportedIdentityProviders=[
'string',
],
CallbackURLs=[
'string',
],
LogoutURLs=[
'string',
],
DefaultRedirectURI='string',
AllowedOAuthFlows=[
'code'|'implicit'|'client_credentials',
],
AllowedOAuthScopes=[
'string',
],
AllowedOAuthFlowsUserPoolClient=True|False
)
:type UserPoolId: string
:param UserPoolId: [REQUIRED]
The user pool ID for the user pool where you want to create a user pool client.
:type ClientName: string
:param ClientName: [REQUIRED]
The client name for the user pool client you would like to create.
:type GenerateSecret: boolean
:param GenerateSecret: Boolean to specify whether you want to generate a secret for the user pool client being created.
:type RefreshTokenValidity: integer
:param RefreshTokenValidity: The time limit, in days, after which the refresh token is no longer valid and cannot be used.
:type ReadAttributes: list
:param ReadAttributes: The read attributes.
(string) --
:type WriteAttributes: list
:param WriteAttributes: The write attributes.
(string) --
:type ExplicitAuthFlows: list
:param ExplicitAuthFlows: The explicit authentication flows.
(string) --
:type SupportedIdentityProviders: list
:param SupportedIdentityProviders: A list of provider names for the identity providers that are supported on this client.
(string) --
:type CallbackURLs: list
:param CallbackURLs: A list of allowed callback URLs for the identity providers.
(string) --
:type LogoutURLs: list
:param LogoutURLs: A list of allowed logout URLs for the identity providers.
(string) --
:type DefaultRedirectURI: string
:param DefaultRedirectURI: The default redirect URI. Must be in the CallbackURLs list.
:type AllowedOAuthFlows: list
:param AllowedOAuthFlows: Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.
Set to token to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.
(string) --
:type AllowedOAuthScopes: list
:param AllowedOAuthScopes: A list of allowed OAuth scopes. Currently supported values are 'phone' , 'email' , 'openid' , and 'Cognito' .
(string) --
:type AllowedOAuthFlowsUserPoolClient: boolean
:param AllowedOAuthFlowsUserPoolClient: Set to True if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.
:rtype: dict
:return: {
'UserPoolClient': {
'UserPoolId': 'string',
'ClientName': 'string',
'ClientId': 'string',
'ClientSecret': 'string',
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1),
'RefreshTokenValidity': 123,
'ReadAttributes': [
'string',
],
'WriteAttributes': [
'string',
],
'ExplicitAuthFlows': [
'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY',
],
'SupportedIdentityProviders': [
'string',
],
'CallbackURLs': [
'string',
],
'LogoutURLs': [
'string',
],
'DefaultRedirectURI': 'string',
'AllowedOAuthFlows': [
'code'|'implicit'|'client_credentials',
],
'AllowedOAuthScopes': [
'string',
],
'AllowedOAuthFlowsUserPoolClient': True|False
}
}
:returns:
(string) -- | entailment |
def update_user_pool(UserPoolId=None, Policies=None, LambdaConfig=None, AutoVerifiedAttributes=None, SmsVerificationMessage=None, EmailVerificationMessage=None, EmailVerificationSubject=None, SmsAuthenticationMessage=None, MfaConfiguration=None, DeviceConfiguration=None, EmailConfiguration=None, SmsConfiguration=None, UserPoolTags=None, AdminCreateUserConfig=None):
"""
Updates the specified user pool with the specified attributes.
See also: AWS API Documentation
:example: response = client.update_user_pool(
UserPoolId='string',
Policies={
'PasswordPolicy': {
'MinimumLength': 123,
'RequireUppercase': True|False,
'RequireLowercase': True|False,
'RequireNumbers': True|False,
'RequireSymbols': True|False
}
},
LambdaConfig={
'PreSignUp': 'string',
'CustomMessage': 'string',
'PostConfirmation': 'string',
'PreAuthentication': 'string',
'PostAuthentication': 'string',
'DefineAuthChallenge': 'string',
'CreateAuthChallenge': 'string',
'VerifyAuthChallengeResponse': 'string'
},
AutoVerifiedAttributes=[
'phone_number'|'email',
],
SmsVerificationMessage='string',
EmailVerificationMessage='string',
EmailVerificationSubject='string',
SmsAuthenticationMessage='string',
MfaConfiguration='OFF'|'ON'|'OPTIONAL',
DeviceConfiguration={
'ChallengeRequiredOnNewDevice': True|False,
'DeviceOnlyRememberedOnUserPrompt': True|False
},
EmailConfiguration={
'SourceArn': 'string',
'ReplyToEmailAddress': 'string'
},
SmsConfiguration={
'SnsCallerArn': 'string',
'ExternalId': 'string'
},
UserPoolTags={
'string': 'string'
},
AdminCreateUserConfig={
'AllowAdminCreateUserOnly': True|False,
'UnusedAccountValidityDays': 123,
'InviteMessageTemplate': {
'SMSMessage': 'string',
'EmailMessage': 'string',
'EmailSubject': 'string'
}
}
)
:type UserPoolId: string
:param UserPoolId: [REQUIRED]
The user pool ID for the user pool you want to update.
:type Policies: dict
:param Policies: A container with the policies you wish to update in a user pool.
PasswordPolicy (dict) --A container for information about the user pool password policy.
MinimumLength (integer) --The minimum length of the password policy that you have set. Cannot be less than 6.
RequireUppercase (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one uppercase letter in their password.
RequireLowercase (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one lowercase letter in their password.
RequireNumbers (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one number in their password.
RequireSymbols (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one symbol in their password.
:type LambdaConfig: dict
:param LambdaConfig: The AWS Lambda configuration information from the request to update the user pool.
PreSignUp (string) --A pre-registration AWS Lambda trigger.
CustomMessage (string) --A custom Message AWS Lambda trigger.
PostConfirmation (string) --A post-confirmation AWS Lambda trigger.
PreAuthentication (string) --A pre-authentication AWS Lambda trigger.
PostAuthentication (string) --A post-authentication AWS Lambda trigger.
DefineAuthChallenge (string) --Defines the authentication challenge.
CreateAuthChallenge (string) --Creates an authentication challenge.
VerifyAuthChallengeResponse (string) --Verifies the authentication challenge response.
:type AutoVerifiedAttributes: list
:param AutoVerifiedAttributes: The attributes that are automatically verified when the Amazon Cognito service makes a request to update user pools.
(string) --
:type SmsVerificationMessage: string
:param SmsVerificationMessage: A container with information about the SMS verification message.
:type EmailVerificationMessage: string
:param EmailVerificationMessage: The contents of the email verification message.
:type EmailVerificationSubject: string
:param EmailVerificationSubject: The subject of the email verification message.
:type SmsAuthenticationMessage: string
:param SmsAuthenticationMessage: The contents of the SMS authentication message.
:type MfaConfiguration: string
:param MfaConfiguration: Can be one of the following values:
OFF - MFA tokens are not required and cannot be specified during user registration.
ON - MFA tokens are required for all user registrations. You can only specify required when you are initially creating a user pool.
OPTIONAL - Users have the option when registering to create an MFA token.
:type DeviceConfiguration: dict
:param DeviceConfiguration: Device configuration.
ChallengeRequiredOnNewDevice (boolean) --Indicates whether a challenge is required on a new device. Only applicable to a new device.
DeviceOnlyRememberedOnUserPrompt (boolean) --If true, a device is only remembered on user prompt.
:type EmailConfiguration: dict
:param EmailConfiguration: Email configuration.
SourceArn (string) --The Amazon Resource Name (ARN) of the email source.
ReplyToEmailAddress (string) --The REPLY-TO email address.
:type SmsConfiguration: dict
:param SmsConfiguration: SMS configuration.
SnsCallerArn (string) -- [REQUIRED]The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller.
ExternalId (string) --The external ID.
:type UserPoolTags: dict
:param UserPoolTags: The cost allocation tags for the user pool. For more information, see Adding Cost Allocation Tags to Your User Pool
(string) --
(string) --
:type AdminCreateUserConfig: dict
:param AdminCreateUserConfig: The configuration for AdminCreateUser requests.
AllowAdminCreateUserOnly (boolean) --Set to True if only the administrator is allowed to create user profiles. Set to False if users can sign themselves up via an app.
UnusedAccountValidityDays (integer) --The user account expiration limit, in days, after which the account is no longer usable. To reset the account after that time limit, you must call AdminCreateUser again, specifying 'RESEND' for the MessageAction parameter. The default value for this parameter is 7.
InviteMessageTemplate (dict) --The message template to be used for the welcome message to new users.
SMSMessage (string) --The message template for SMS messages.
EmailMessage (string) --The message template for email messages.
EmailSubject (string) --The subject line for email messages.
:rtype: dict
:return: {}
"""
pass | Updates the specified user pool with the specified attributes.
See also: AWS API Documentation
:example: response = client.update_user_pool(
UserPoolId='string',
Policies={
'PasswordPolicy': {
'MinimumLength': 123,
'RequireUppercase': True|False,
'RequireLowercase': True|False,
'RequireNumbers': True|False,
'RequireSymbols': True|False
}
},
LambdaConfig={
'PreSignUp': 'string',
'CustomMessage': 'string',
'PostConfirmation': 'string',
'PreAuthentication': 'string',
'PostAuthentication': 'string',
'DefineAuthChallenge': 'string',
'CreateAuthChallenge': 'string',
'VerifyAuthChallengeResponse': 'string'
},
AutoVerifiedAttributes=[
'phone_number'|'email',
],
SmsVerificationMessage='string',
EmailVerificationMessage='string',
EmailVerificationSubject='string',
SmsAuthenticationMessage='string',
MfaConfiguration='OFF'|'ON'|'OPTIONAL',
DeviceConfiguration={
'ChallengeRequiredOnNewDevice': True|False,
'DeviceOnlyRememberedOnUserPrompt': True|False
},
EmailConfiguration={
'SourceArn': 'string',
'ReplyToEmailAddress': 'string'
},
SmsConfiguration={
'SnsCallerArn': 'string',
'ExternalId': 'string'
},
UserPoolTags={
'string': 'string'
},
AdminCreateUserConfig={
'AllowAdminCreateUserOnly': True|False,
'UnusedAccountValidityDays': 123,
'InviteMessageTemplate': {
'SMSMessage': 'string',
'EmailMessage': 'string',
'EmailSubject': 'string'
}
}
)
:type UserPoolId: string
:param UserPoolId: [REQUIRED]
The user pool ID for the user pool you want to update.
:type Policies: dict
:param Policies: A container with the policies you wish to update in a user pool.
PasswordPolicy (dict) --A container for information about the user pool password policy.
MinimumLength (integer) --The minimum length of the password policy that you have set. Cannot be less than 6.
RequireUppercase (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one uppercase letter in their password.
RequireLowercase (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one lowercase letter in their password.
RequireNumbers (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one number in their password.
RequireSymbols (boolean) --In the password policy that you have set, refers to whether you have required users to use at least one symbol in their password.
:type LambdaConfig: dict
:param LambdaConfig: The AWS Lambda configuration information from the request to update the user pool.
PreSignUp (string) --A pre-registration AWS Lambda trigger.
CustomMessage (string) --A custom Message AWS Lambda trigger.
PostConfirmation (string) --A post-confirmation AWS Lambda trigger.
PreAuthentication (string) --A pre-authentication AWS Lambda trigger.
PostAuthentication (string) --A post-authentication AWS Lambda trigger.
DefineAuthChallenge (string) --Defines the authentication challenge.
CreateAuthChallenge (string) --Creates an authentication challenge.
VerifyAuthChallengeResponse (string) --Verifies the authentication challenge response.
:type AutoVerifiedAttributes: list
:param AutoVerifiedAttributes: The attributes that are automatically verified when the Amazon Cognito service makes a request to update user pools.
(string) --
:type SmsVerificationMessage: string
:param SmsVerificationMessage: A container with information about the SMS verification message.
:type EmailVerificationMessage: string
:param EmailVerificationMessage: The contents of the email verification message.
:type EmailVerificationSubject: string
:param EmailVerificationSubject: The subject of the email verification message.
:type SmsAuthenticationMessage: string
:param SmsAuthenticationMessage: The contents of the SMS authentication message.
:type MfaConfiguration: string
:param MfaConfiguration: Can be one of the following values:
OFF - MFA tokens are not required and cannot be specified during user registration.
ON - MFA tokens are required for all user registrations. You can only specify required when you are initially creating a user pool.
OPTIONAL - Users have the option when registering to create an MFA token.
:type DeviceConfiguration: dict
:param DeviceConfiguration: Device configuration.
ChallengeRequiredOnNewDevice (boolean) --Indicates whether a challenge is required on a new device. Only applicable to a new device.
DeviceOnlyRememberedOnUserPrompt (boolean) --If true, a device is only remembered on user prompt.
:type EmailConfiguration: dict
:param EmailConfiguration: Email configuration.
SourceArn (string) --The Amazon Resource Name (ARN) of the email source.
ReplyToEmailAddress (string) --The REPLY-TO email address.
:type SmsConfiguration: dict
:param SmsConfiguration: SMS configuration.
SnsCallerArn (string) -- [REQUIRED]The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller.
ExternalId (string) --The external ID.
:type UserPoolTags: dict
:param UserPoolTags: The cost allocation tags for the user pool. For more information, see Adding Cost Allocation Tags to Your User Pool
(string) --
(string) --
:type AdminCreateUserConfig: dict
:param AdminCreateUserConfig: The configuration for AdminCreateUser requests.
AllowAdminCreateUserOnly (boolean) --Set to True if only the administrator is allowed to create user profiles. Set to False if users can sign themselves up via an app.
UnusedAccountValidityDays (integer) --The user account expiration limit, in days, after which the account is no longer usable. To reset the account after that time limit, you must call AdminCreateUser again, specifying 'RESEND' for the MessageAction parameter. The default value for this parameter is 7.
InviteMessageTemplate (dict) --The message template to be used for the welcome message to new users.
SMSMessage (string) --The message template for SMS messages.
EmailMessage (string) --The message template for email messages.
EmailSubject (string) --The subject line for email messages.
:rtype: dict
:return: {} | entailment |
def update_user_pool_client(UserPoolId=None, ClientId=None, ClientName=None, RefreshTokenValidity=None, ReadAttributes=None, WriteAttributes=None, ExplicitAuthFlows=None, SupportedIdentityProviders=None, CallbackURLs=None, LogoutURLs=None, DefaultRedirectURI=None, AllowedOAuthFlows=None, AllowedOAuthScopes=None, AllowedOAuthFlowsUserPoolClient=None):
"""
Allows the developer to update the specified user pool client and password policy.
See also: AWS API Documentation
:example: response = client.update_user_pool_client(
UserPoolId='string',
ClientId='string',
ClientName='string',
RefreshTokenValidity=123,
ReadAttributes=[
'string',
],
WriteAttributes=[
'string',
],
ExplicitAuthFlows=[
'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY',
],
SupportedIdentityProviders=[
'string',
],
CallbackURLs=[
'string',
],
LogoutURLs=[
'string',
],
DefaultRedirectURI='string',
AllowedOAuthFlows=[
'code'|'implicit'|'client_credentials',
],
AllowedOAuthScopes=[
'string',
],
AllowedOAuthFlowsUserPoolClient=True|False
)
:type UserPoolId: string
:param UserPoolId: [REQUIRED]
The user pool ID for the user pool where you want to update the user pool client.
:type ClientId: string
:param ClientId: [REQUIRED]
The ID of the client associated with the user pool.
:type ClientName: string
:param ClientName: The client name from the update user pool client request.
:type RefreshTokenValidity: integer
:param RefreshTokenValidity: The time limit, in days, after which the refresh token is no longer valid and cannot be used.
:type ReadAttributes: list
:param ReadAttributes: The read-only attributes of the user pool.
(string) --
:type WriteAttributes: list
:param WriteAttributes: The writeable attributes of the user pool.
(string) --
:type ExplicitAuthFlows: list
:param ExplicitAuthFlows: Explicit authentication flows.
(string) --
:type SupportedIdentityProviders: list
:param SupportedIdentityProviders: A list of provider names for the identity providers that are supported on this client.
(string) --
:type CallbackURLs: list
:param CallbackURLs: A list of allowed callback URLs for the identity providers.
(string) --
:type LogoutURLs: list
:param LogoutURLs: A list ofallowed logout URLs for the identity providers.
(string) --
:type DefaultRedirectURI: string
:param DefaultRedirectURI: The default redirect URI. Must be in the CallbackURLs list.
:type AllowedOAuthFlows: list
:param AllowedOAuthFlows: Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.
Set to token to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.
(string) --
:type AllowedOAuthScopes: list
:param AllowedOAuthScopes: A list of allowed OAuth scopes. Currently supported values are 'phone' , 'email' , 'openid' , and 'Cognito' .
(string) --
:type AllowedOAuthFlowsUserPoolClient: boolean
:param AllowedOAuthFlowsUserPoolClient: Set to TRUE if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.
:rtype: dict
:return: {
'UserPoolClient': {
'UserPoolId': 'string',
'ClientName': 'string',
'ClientId': 'string',
'ClientSecret': 'string',
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1),
'RefreshTokenValidity': 123,
'ReadAttributes': [
'string',
],
'WriteAttributes': [
'string',
],
'ExplicitAuthFlows': [
'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY',
],
'SupportedIdentityProviders': [
'string',
],
'CallbackURLs': [
'string',
],
'LogoutURLs': [
'string',
],
'DefaultRedirectURI': 'string',
'AllowedOAuthFlows': [
'code'|'implicit'|'client_credentials',
],
'AllowedOAuthScopes': [
'string',
],
'AllowedOAuthFlowsUserPoolClient': True|False
}
}
:returns:
(string) --
"""
pass | Allows the developer to update the specified user pool client and password policy.
See also: AWS API Documentation
:example: response = client.update_user_pool_client(
UserPoolId='string',
ClientId='string',
ClientName='string',
RefreshTokenValidity=123,
ReadAttributes=[
'string',
],
WriteAttributes=[
'string',
],
ExplicitAuthFlows=[
'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY',
],
SupportedIdentityProviders=[
'string',
],
CallbackURLs=[
'string',
],
LogoutURLs=[
'string',
],
DefaultRedirectURI='string',
AllowedOAuthFlows=[
'code'|'implicit'|'client_credentials',
],
AllowedOAuthScopes=[
'string',
],
AllowedOAuthFlowsUserPoolClient=True|False
)
:type UserPoolId: string
:param UserPoolId: [REQUIRED]
The user pool ID for the user pool where you want to update the user pool client.
:type ClientId: string
:param ClientId: [REQUIRED]
The ID of the client associated with the user pool.
:type ClientName: string
:param ClientName: The client name from the update user pool client request.
:type RefreshTokenValidity: integer
:param RefreshTokenValidity: The time limit, in days, after which the refresh token is no longer valid and cannot be used.
:type ReadAttributes: list
:param ReadAttributes: The read-only attributes of the user pool.
(string) --
:type WriteAttributes: list
:param WriteAttributes: The writeable attributes of the user pool.
(string) --
:type ExplicitAuthFlows: list
:param ExplicitAuthFlows: Explicit authentication flows.
(string) --
:type SupportedIdentityProviders: list
:param SupportedIdentityProviders: A list of provider names for the identity providers that are supported on this client.
(string) --
:type CallbackURLs: list
:param CallbackURLs: A list of allowed callback URLs for the identity providers.
(string) --
:type LogoutURLs: list
:param LogoutURLs: A list ofallowed logout URLs for the identity providers.
(string) --
:type DefaultRedirectURI: string
:param DefaultRedirectURI: The default redirect URI. Must be in the CallbackURLs list.
:type AllowedOAuthFlows: list
:param AllowedOAuthFlows: Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.
Set to token to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.
(string) --
:type AllowedOAuthScopes: list
:param AllowedOAuthScopes: A list of allowed OAuth scopes. Currently supported values are 'phone' , 'email' , 'openid' , and 'Cognito' .
(string) --
:type AllowedOAuthFlowsUserPoolClient: boolean
:param AllowedOAuthFlowsUserPoolClient: Set to TRUE if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.
:rtype: dict
:return: {
'UserPoolClient': {
'UserPoolId': 'string',
'ClientName': 'string',
'ClientId': 'string',
'ClientSecret': 'string',
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1),
'RefreshTokenValidity': 123,
'ReadAttributes': [
'string',
],
'WriteAttributes': [
'string',
],
'ExplicitAuthFlows': [
'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY',
],
'SupportedIdentityProviders': [
'string',
],
'CallbackURLs': [
'string',
],
'LogoutURLs': [
'string',
],
'DefaultRedirectURI': 'string',
'AllowedOAuthFlows': [
'code'|'implicit'|'client_credentials',
],
'AllowedOAuthScopes': [
'string',
],
'AllowedOAuthFlowsUserPoolClient': True|False
}
}
:returns:
(string) -- | entailment |
def copy_object(ACL=None, Bucket=None, CacheControl=None, ContentDisposition=None, ContentEncoding=None, ContentLanguage=None, ContentType=None, CopySource=None, CopySourceIfMatch=None, CopySourceIfModifiedSince=None, CopySourceIfNoneMatch=None, CopySourceIfUnmodifiedSince=None, Expires=None, GrantFullControl=None, GrantRead=None, GrantReadACP=None, GrantWriteACP=None, Key=None, Metadata=None, MetadataDirective=None, TaggingDirective=None, ServerSideEncryption=None, StorageClass=None, WebsiteRedirectLocation=None, SSECustomerAlgorithm=None, SSECustomerKey=None, SSECustomerKeyMD5=None, SSEKMSKeyId=None, CopySourceSSECustomerAlgorithm=None, CopySourceSSECustomerKey=None, CopySourceSSECustomerKeyMD5=None, RequestPayer=None, Tagging=None):
"""
Creates a copy of an object that is already stored in Amazon S3.
See also: AWS API Documentation
:example: response = client.copy_object(
ACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'aws-exec-read'|'bucket-owner-read'|'bucket-owner-full-control',
Bucket='string',
CacheControl='string',
ContentDisposition='string',
ContentEncoding='string',
ContentLanguage='string',
ContentType='string',
CopySource='string' or {'Bucket': 'string', 'Key': 'string', 'VersionId': 'string'},
CopySourceIfMatch='string',
CopySourceIfModifiedSince=datetime(2015, 1, 1),
CopySourceIfNoneMatch='string',
CopySourceIfUnmodifiedSince=datetime(2015, 1, 1),
Expires=datetime(2015, 1, 1),
GrantFullControl='string',
GrantRead='string',
GrantReadACP='string',
GrantWriteACP='string',
Key='string',
Metadata={
'string': 'string'
},
MetadataDirective='COPY'|'REPLACE',
TaggingDirective='COPY'|'REPLACE',
ServerSideEncryption='AES256'|'aws:kms',
StorageClass='STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA',
WebsiteRedirectLocation='string',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
SSEKMSKeyId='string',
CopySourceSSECustomerAlgorithm='string',
CopySourceSSECustomerKey='string',
RequestPayer='requester',
Tagging='string'
)
:type ACL: string
:param ACL: The canned ACL to apply to the object.
:type Bucket: string
:param Bucket: [REQUIRED]
:type CacheControl: string
:param CacheControl: Specifies caching behavior along the request/reply chain.
:type ContentDisposition: string
:param ContentDisposition: Specifies presentational information for the object.
:type ContentEncoding: string
:param ContentEncoding: Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
:type ContentLanguage: string
:param ContentLanguage: The language the content is in.
:type ContentType: string
:param ContentType: A standard MIME type describing the format of the object data.
:type CopySource: str or dict
:param CopySource: [REQUIRED] The name of the source bucket, key name of the source object, and optional version ID of the source object. You can either provide this value as a string or a dictionary. The string form is {bucket}/{key} or {bucket}/{key}?versionId={versionId} if you want to copy a specific version. You can also provide this value as a dictionary. The dictionary format is recommended over the string format because it is more explicit. The dictionary format is: {'Bucket': 'bucket', 'Key': 'key', 'VersionId': 'id'}. Note that the VersionId key is optional and may be omitted.
:type CopySourceIfMatch: string
:param CopySourceIfMatch: Copies the object if its entity tag (ETag) matches the specified tag.
:type CopySourceIfModifiedSince: datetime
:param CopySourceIfModifiedSince: Copies the object if it has been modified since the specified time.
:type CopySourceIfNoneMatch: string
:param CopySourceIfNoneMatch: Copies the object if its entity tag (ETag) is different than the specified ETag.
:type CopySourceIfUnmodifiedSince: datetime
:param CopySourceIfUnmodifiedSince: Copies the object if it hasn't been modified since the specified time.
:type Expires: datetime
:param Expires: The date and time at which the object is no longer cacheable.
:type GrantFullControl: string
:param GrantFullControl: Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
:type GrantRead: string
:param GrantRead: Allows grantee to read the object data and its metadata.
:type GrantReadACP: string
:param GrantReadACP: Allows grantee to read the object ACL.
:type GrantWriteACP: string
:param GrantWriteACP: Allows grantee to write the ACL for the applicable object.
:type Key: string
:param Key: [REQUIRED]
:type Metadata: dict
:param Metadata: A map of metadata to store with the object in S3.
(string) --
(string) --
:type MetadataDirective: string
:param MetadataDirective: Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request.
:type TaggingDirective: string
:param TaggingDirective: Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request.
:type ServerSideEncryption: string
:param ServerSideEncryption: The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
:type StorageClass: string
:param StorageClass: The type of storage to use for the object. Defaults to 'STANDARD'.
:type WebsiteRedirectLocation: string
:param WebsiteRedirectLocation: If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
:type SSECustomerAlgorithm: string
:param SSECustomerAlgorithm: Specifies the algorithm to use to when encrypting the object (e.g., AES256).
:type SSECustomerKey: string
:param SSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side -encryption -customer-algorithm header.
:type SSECustomerKeyMD5: string
:param SSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type SSEKMSKeyId: string
:param SSEKMSKeyId: Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. Documentation on configuring any of the officially supported AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
:type CopySourceSSECustomerAlgorithm: string
:param CopySourceSSECustomerAlgorithm: Specifies the algorithm to use when decrypting the source object (e.g., AES256).
:type CopySourceSSECustomerKey: string
:param CopySourceSSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.
:type CopySourceSSECustomerKeyMD5: string
:param CopySourceSSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:type Tagging: string
:param Tagging: The tag-set for the object destination object this value must be used in conjunction with the TaggingDirective. The tag-set must be encoded as URL Query parameters
:rtype: dict
:return: {
'CopyObjectResult': {
'ETag': 'string',
'LastModified': datetime(2015, 1, 1)
},
'Expiration': 'string',
'CopySourceVersionId': 'string',
'VersionId': 'string',
'ServerSideEncryption': 'AES256'|'aws:kms',
'SSECustomerAlgorithm': 'string',
'SSECustomerKeyMD5': 'string',
'SSEKMSKeyId': 'string',
'RequestCharged': 'requester'
}
:returns:
(dict) --
CopyObjectResult (dict) --
ETag (string) --
LastModified (datetime) --
Expiration (string) -- If the object expiration is configured, the response includes this header.
CopySourceVersionId (string) --
VersionId (string) -- Version ID of the newly created copy.
ServerSideEncryption (string) -- The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
SSECustomerAlgorithm (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) -- If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request.
"""
pass | Creates a copy of an object that is already stored in Amazon S3.
See also: AWS API Documentation
:example: response = client.copy_object(
ACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'aws-exec-read'|'bucket-owner-read'|'bucket-owner-full-control',
Bucket='string',
CacheControl='string',
ContentDisposition='string',
ContentEncoding='string',
ContentLanguage='string',
ContentType='string',
CopySource='string' or {'Bucket': 'string', 'Key': 'string', 'VersionId': 'string'},
CopySourceIfMatch='string',
CopySourceIfModifiedSince=datetime(2015, 1, 1),
CopySourceIfNoneMatch='string',
CopySourceIfUnmodifiedSince=datetime(2015, 1, 1),
Expires=datetime(2015, 1, 1),
GrantFullControl='string',
GrantRead='string',
GrantReadACP='string',
GrantWriteACP='string',
Key='string',
Metadata={
'string': 'string'
},
MetadataDirective='COPY'|'REPLACE',
TaggingDirective='COPY'|'REPLACE',
ServerSideEncryption='AES256'|'aws:kms',
StorageClass='STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA',
WebsiteRedirectLocation='string',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
SSEKMSKeyId='string',
CopySourceSSECustomerAlgorithm='string',
CopySourceSSECustomerKey='string',
RequestPayer='requester',
Tagging='string'
)
:type ACL: string
:param ACL: The canned ACL to apply to the object.
:type Bucket: string
:param Bucket: [REQUIRED]
:type CacheControl: string
:param CacheControl: Specifies caching behavior along the request/reply chain.
:type ContentDisposition: string
:param ContentDisposition: Specifies presentational information for the object.
:type ContentEncoding: string
:param ContentEncoding: Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
:type ContentLanguage: string
:param ContentLanguage: The language the content is in.
:type ContentType: string
:param ContentType: A standard MIME type describing the format of the object data.
:type CopySource: str or dict
:param CopySource: [REQUIRED] The name of the source bucket, key name of the source object, and optional version ID of the source object. You can either provide this value as a string or a dictionary. The string form is {bucket}/{key} or {bucket}/{key}?versionId={versionId} if you want to copy a specific version. You can also provide this value as a dictionary. The dictionary format is recommended over the string format because it is more explicit. The dictionary format is: {'Bucket': 'bucket', 'Key': 'key', 'VersionId': 'id'}. Note that the VersionId key is optional and may be omitted.
:type CopySourceIfMatch: string
:param CopySourceIfMatch: Copies the object if its entity tag (ETag) matches the specified tag.
:type CopySourceIfModifiedSince: datetime
:param CopySourceIfModifiedSince: Copies the object if it has been modified since the specified time.
:type CopySourceIfNoneMatch: string
:param CopySourceIfNoneMatch: Copies the object if its entity tag (ETag) is different than the specified ETag.
:type CopySourceIfUnmodifiedSince: datetime
:param CopySourceIfUnmodifiedSince: Copies the object if it hasn't been modified since the specified time.
:type Expires: datetime
:param Expires: The date and time at which the object is no longer cacheable.
:type GrantFullControl: string
:param GrantFullControl: Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
:type GrantRead: string
:param GrantRead: Allows grantee to read the object data and its metadata.
:type GrantReadACP: string
:param GrantReadACP: Allows grantee to read the object ACL.
:type GrantWriteACP: string
:param GrantWriteACP: Allows grantee to write the ACL for the applicable object.
:type Key: string
:param Key: [REQUIRED]
:type Metadata: dict
:param Metadata: A map of metadata to store with the object in S3.
(string) --
(string) --
:type MetadataDirective: string
:param MetadataDirective: Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request.
:type TaggingDirective: string
:param TaggingDirective: Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request.
:type ServerSideEncryption: string
:param ServerSideEncryption: The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
:type StorageClass: string
:param StorageClass: The type of storage to use for the object. Defaults to 'STANDARD'.
:type WebsiteRedirectLocation: string
:param WebsiteRedirectLocation: If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
:type SSECustomerAlgorithm: string
:param SSECustomerAlgorithm: Specifies the algorithm to use to when encrypting the object (e.g., AES256).
:type SSECustomerKey: string
:param SSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side -encryption -customer-algorithm header.
:type SSECustomerKeyMD5: string
:param SSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type SSEKMSKeyId: string
:param SSEKMSKeyId: Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. Documentation on configuring any of the officially supported AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
:type CopySourceSSECustomerAlgorithm: string
:param CopySourceSSECustomerAlgorithm: Specifies the algorithm to use when decrypting the source object (e.g., AES256).
:type CopySourceSSECustomerKey: string
:param CopySourceSSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.
:type CopySourceSSECustomerKeyMD5: string
:param CopySourceSSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:type Tagging: string
:param Tagging: The tag-set for the object destination object this value must be used in conjunction with the TaggingDirective. The tag-set must be encoded as URL Query parameters
:rtype: dict
:return: {
'CopyObjectResult': {
'ETag': 'string',
'LastModified': datetime(2015, 1, 1)
},
'Expiration': 'string',
'CopySourceVersionId': 'string',
'VersionId': 'string',
'ServerSideEncryption': 'AES256'|'aws:kms',
'SSECustomerAlgorithm': 'string',
'SSECustomerKeyMD5': 'string',
'SSEKMSKeyId': 'string',
'RequestCharged': 'requester'
}
:returns:
(dict) --
CopyObjectResult (dict) --
ETag (string) --
LastModified (datetime) --
Expiration (string) -- If the object expiration is configured, the response includes this header.
CopySourceVersionId (string) --
VersionId (string) -- Version ID of the newly created copy.
ServerSideEncryption (string) -- The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
SSECustomerAlgorithm (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) -- If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request. | entailment |
def create_multipart_upload(ACL=None, Bucket=None, CacheControl=None, ContentDisposition=None, ContentEncoding=None, ContentLanguage=None, ContentType=None, Expires=None, GrantFullControl=None, GrantRead=None, GrantReadACP=None, GrantWriteACP=None, Key=None, Metadata=None, ServerSideEncryption=None, StorageClass=None, WebsiteRedirectLocation=None, SSECustomerAlgorithm=None, SSECustomerKey=None, SSECustomerKeyMD5=None, SSEKMSKeyId=None, RequestPayer=None):
"""
Initiates a multipart upload and returns an upload ID.
Note: After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.
See also: AWS API Documentation
:example: response = client.create_multipart_upload(
ACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'aws-exec-read'|'bucket-owner-read'|'bucket-owner-full-control',
Bucket='string',
CacheControl='string',
ContentDisposition='string',
ContentEncoding='string',
ContentLanguage='string',
ContentType='string',
Expires=datetime(2015, 1, 1),
GrantFullControl='string',
GrantRead='string',
GrantReadACP='string',
GrantWriteACP='string',
Key='string',
Metadata={
'string': 'string'
},
ServerSideEncryption='AES256'|'aws:kms',
StorageClass='STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA',
WebsiteRedirectLocation='string',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
SSEKMSKeyId='string',
RequestPayer='requester'
)
:type ACL: string
:param ACL: The canned ACL to apply to the object.
:type Bucket: string
:param Bucket: [REQUIRED]
:type CacheControl: string
:param CacheControl: Specifies caching behavior along the request/reply chain.
:type ContentDisposition: string
:param ContentDisposition: Specifies presentational information for the object.
:type ContentEncoding: string
:param ContentEncoding: Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
:type ContentLanguage: string
:param ContentLanguage: The language the content is in.
:type ContentType: string
:param ContentType: A standard MIME type describing the format of the object data.
:type Expires: datetime
:param Expires: The date and time at which the object is no longer cacheable.
:type GrantFullControl: string
:param GrantFullControl: Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
:type GrantRead: string
:param GrantRead: Allows grantee to read the object data and its metadata.
:type GrantReadACP: string
:param GrantReadACP: Allows grantee to read the object ACL.
:type GrantWriteACP: string
:param GrantWriteACP: Allows grantee to write the ACL for the applicable object.
:type Key: string
:param Key: [REQUIRED]
:type Metadata: dict
:param Metadata: A map of metadata to store with the object in S3.
(string) --
(string) --
:type ServerSideEncryption: string
:param ServerSideEncryption: The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
:type StorageClass: string
:param StorageClass: The type of storage to use for the object. Defaults to 'STANDARD'.
:type WebsiteRedirectLocation: string
:param WebsiteRedirectLocation: If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
:type SSECustomerAlgorithm: string
:param SSECustomerAlgorithm: Specifies the algorithm to use to when encrypting the object (e.g., AES256).
:type SSECustomerKey: string
:param SSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side -encryption -customer-algorithm header.
:type SSECustomerKeyMD5: string
:param SSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type SSEKMSKeyId: string
:param SSEKMSKeyId: Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. Documentation on configuring any of the officially supported AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:rtype: dict
:return: {
'AbortDate': datetime(2015, 1, 1),
'AbortRuleId': 'string',
'Bucket': 'string',
'Key': 'string',
'UploadId': 'string',
'ServerSideEncryption': 'AES256'|'aws:kms',
'SSECustomerAlgorithm': 'string',
'SSECustomerKeyMD5': 'string',
'SSEKMSKeyId': 'string',
'RequestCharged': 'requester'
}
:returns:
(dict) --
AbortDate (datetime) -- Date when multipart upload will become eligible for abort operation by lifecycle.
AbortRuleId (string) -- Id of the lifecycle rule that makes a multipart upload eligible for abort operation.
Bucket (string) -- Name of the bucket to which the multipart upload was initiated.
Key (string) -- Object key for which the multipart upload was initiated.
UploadId (string) -- ID for the initiated multipart upload.
ServerSideEncryption (string) -- The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
SSECustomerAlgorithm (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) -- If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request.
"""
pass | Initiates a multipart upload and returns an upload ID.
Note: After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.
See also: AWS API Documentation
:example: response = client.create_multipart_upload(
ACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'aws-exec-read'|'bucket-owner-read'|'bucket-owner-full-control',
Bucket='string',
CacheControl='string',
ContentDisposition='string',
ContentEncoding='string',
ContentLanguage='string',
ContentType='string',
Expires=datetime(2015, 1, 1),
GrantFullControl='string',
GrantRead='string',
GrantReadACP='string',
GrantWriteACP='string',
Key='string',
Metadata={
'string': 'string'
},
ServerSideEncryption='AES256'|'aws:kms',
StorageClass='STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA',
WebsiteRedirectLocation='string',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
SSEKMSKeyId='string',
RequestPayer='requester'
)
:type ACL: string
:param ACL: The canned ACL to apply to the object.
:type Bucket: string
:param Bucket: [REQUIRED]
:type CacheControl: string
:param CacheControl: Specifies caching behavior along the request/reply chain.
:type ContentDisposition: string
:param ContentDisposition: Specifies presentational information for the object.
:type ContentEncoding: string
:param ContentEncoding: Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
:type ContentLanguage: string
:param ContentLanguage: The language the content is in.
:type ContentType: string
:param ContentType: A standard MIME type describing the format of the object data.
:type Expires: datetime
:param Expires: The date and time at which the object is no longer cacheable.
:type GrantFullControl: string
:param GrantFullControl: Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
:type GrantRead: string
:param GrantRead: Allows grantee to read the object data and its metadata.
:type GrantReadACP: string
:param GrantReadACP: Allows grantee to read the object ACL.
:type GrantWriteACP: string
:param GrantWriteACP: Allows grantee to write the ACL for the applicable object.
:type Key: string
:param Key: [REQUIRED]
:type Metadata: dict
:param Metadata: A map of metadata to store with the object in S3.
(string) --
(string) --
:type ServerSideEncryption: string
:param ServerSideEncryption: The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
:type StorageClass: string
:param StorageClass: The type of storage to use for the object. Defaults to 'STANDARD'.
:type WebsiteRedirectLocation: string
:param WebsiteRedirectLocation: If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
:type SSECustomerAlgorithm: string
:param SSECustomerAlgorithm: Specifies the algorithm to use to when encrypting the object (e.g., AES256).
:type SSECustomerKey: string
:param SSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side -encryption -customer-algorithm header.
:type SSECustomerKeyMD5: string
:param SSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type SSEKMSKeyId: string
:param SSEKMSKeyId: Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. Documentation on configuring any of the officially supported AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:rtype: dict
:return: {
'AbortDate': datetime(2015, 1, 1),
'AbortRuleId': 'string',
'Bucket': 'string',
'Key': 'string',
'UploadId': 'string',
'ServerSideEncryption': 'AES256'|'aws:kms',
'SSECustomerAlgorithm': 'string',
'SSECustomerKeyMD5': 'string',
'SSEKMSKeyId': 'string',
'RequestCharged': 'requester'
}
:returns:
(dict) --
AbortDate (datetime) -- Date when multipart upload will become eligible for abort operation by lifecycle.
AbortRuleId (string) -- Id of the lifecycle rule that makes a multipart upload eligible for abort operation.
Bucket (string) -- Name of the bucket to which the multipart upload was initiated.
Key (string) -- Object key for which the multipart upload was initiated.
UploadId (string) -- ID for the initiated multipart upload.
ServerSideEncryption (string) -- The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
SSECustomerAlgorithm (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) -- If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request. | entailment |
def get_object(Bucket=None, IfMatch=None, IfModifiedSince=None, IfNoneMatch=None, IfUnmodifiedSince=None, Key=None, Range=None, ResponseCacheControl=None, ResponseContentDisposition=None, ResponseContentEncoding=None, ResponseContentLanguage=None, ResponseContentType=None, ResponseExpires=None, VersionId=None, SSECustomerAlgorithm=None, SSECustomerKey=None, SSECustomerKeyMD5=None, RequestPayer=None, PartNumber=None):
"""
Retrieves objects from Amazon S3.
See also: AWS API Documentation
:example: response = client.get_object(
Bucket='string',
IfMatch='string',
IfModifiedSince=datetime(2015, 1, 1),
IfNoneMatch='string',
IfUnmodifiedSince=datetime(2015, 1, 1),
Key='string',
Range='string',
ResponseCacheControl='string',
ResponseContentDisposition='string',
ResponseContentEncoding='string',
ResponseContentLanguage='string',
ResponseContentType='string',
ResponseExpires=datetime(2015, 1, 1),
VersionId='string',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
RequestPayer='requester',
PartNumber=123
)
:type Bucket: string
:param Bucket: [REQUIRED]
:type IfMatch: string
:param IfMatch: Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).
:type IfModifiedSince: datetime
:param IfModifiedSince: Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).
:type IfNoneMatch: string
:param IfNoneMatch: Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).
:type IfUnmodifiedSince: datetime
:param IfUnmodifiedSince: Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).
:type Key: string
:param Key: [REQUIRED]
:type Range: string
:param Range: Downloads the specified range bytes of an object. For more information about the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
:type ResponseCacheControl: string
:param ResponseCacheControl: Sets the Cache-Control header of the response.
:type ResponseContentDisposition: string
:param ResponseContentDisposition: Sets the Content-Disposition header of the response
:type ResponseContentEncoding: string
:param ResponseContentEncoding: Sets the Content-Encoding header of the response.
:type ResponseContentLanguage: string
:param ResponseContentLanguage: Sets the Content-Language header of the response.
:type ResponseContentType: string
:param ResponseContentType: Sets the Content-Type header of the response.
:type ResponseExpires: datetime
:param ResponseExpires: Sets the Expires header of the response.
:type VersionId: string
:param VersionId: VersionId used to reference a specific version of the object.
:type SSECustomerAlgorithm: string
:param SSECustomerAlgorithm: Specifies the algorithm to use to when encrypting the object (e.g., AES256).
:type SSECustomerKey: string
:param SSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side -encryption -customer-algorithm header.
:type SSECustomerKeyMD5: string
:param SSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:type PartNumber: integer
:param PartNumber: Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.
:rtype: dict
:return: {
'Body': StreamingBody(),
'DeleteMarker': True|False,
'AcceptRanges': 'string',
'Expiration': 'string',
'Restore': 'string',
'LastModified': datetime(2015, 1, 1),
'ContentLength': 123,
'ETag': 'string',
'MissingMeta': 123,
'VersionId': 'string',
'CacheControl': 'string',
'ContentDisposition': 'string',
'ContentEncoding': 'string',
'ContentLanguage': 'string',
'ContentRange': 'string',
'ContentType': 'string',
'Expires': datetime(2015, 1, 1),
'WebsiteRedirectLocation': 'string',
'ServerSideEncryption': 'AES256'|'aws:kms',
'Metadata': {
'string': 'string'
},
'SSECustomerAlgorithm': 'string',
'SSECustomerKeyMD5': 'string',
'SSEKMSKeyId': 'string',
'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA',
'RequestCharged': 'requester',
'ReplicationStatus': 'COMPLETE'|'PENDING'|'FAILED'|'REPLICA',
'PartsCount': 123,
'TagCount': 123
}
:returns:
(dict) --
Body (StreamingBody) -- Object data.
DeleteMarker (boolean) -- Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.
AcceptRanges (string) --
Expiration (string) -- If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
Restore (string) -- Provides information about object restoration operation and expiration time of the restored object copy.
LastModified (datetime) -- Last modified date of the object
ContentLength (integer) -- Size of the body in bytes.
ETag (string) -- An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL
MissingMeta (integer) -- This is set to the number of metadata entries not returned in x-amz-meta headers. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.
VersionId (string) -- Version of the object.
CacheControl (string) -- Specifies caching behavior along the request/reply chain.
ContentDisposition (string) -- Specifies presentational information for the object.
ContentEncoding (string) -- Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
ContentLanguage (string) -- The language the content is in.
ContentRange (string) -- The portion of the object returned in the response.
ContentType (string) -- A standard MIME type describing the format of the object data.
Expires (datetime) -- The date and time at which the object is no longer cacheable.
WebsiteRedirectLocation (string) -- If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
ServerSideEncryption (string) -- The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
Metadata (dict) -- A map of metadata to store with the object in S3.
(string) --
(string) --
SSECustomerAlgorithm (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) -- If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
StorageClass (string) --
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request.
ReplicationStatus (string) --
PartsCount (integer) -- The count of parts this object has.
TagCount (integer) -- The number of tags, if any, on the object.
"""
pass | Retrieves objects from Amazon S3.
See also: AWS API Documentation
:example: response = client.get_object(
Bucket='string',
IfMatch='string',
IfModifiedSince=datetime(2015, 1, 1),
IfNoneMatch='string',
IfUnmodifiedSince=datetime(2015, 1, 1),
Key='string',
Range='string',
ResponseCacheControl='string',
ResponseContentDisposition='string',
ResponseContentEncoding='string',
ResponseContentLanguage='string',
ResponseContentType='string',
ResponseExpires=datetime(2015, 1, 1),
VersionId='string',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
RequestPayer='requester',
PartNumber=123
)
:type Bucket: string
:param Bucket: [REQUIRED]
:type IfMatch: string
:param IfMatch: Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).
:type IfModifiedSince: datetime
:param IfModifiedSince: Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).
:type IfNoneMatch: string
:param IfNoneMatch: Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).
:type IfUnmodifiedSince: datetime
:param IfUnmodifiedSince: Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).
:type Key: string
:param Key: [REQUIRED]
:type Range: string
:param Range: Downloads the specified range bytes of an object. For more information about the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
:type ResponseCacheControl: string
:param ResponseCacheControl: Sets the Cache-Control header of the response.
:type ResponseContentDisposition: string
:param ResponseContentDisposition: Sets the Content-Disposition header of the response
:type ResponseContentEncoding: string
:param ResponseContentEncoding: Sets the Content-Encoding header of the response.
:type ResponseContentLanguage: string
:param ResponseContentLanguage: Sets the Content-Language header of the response.
:type ResponseContentType: string
:param ResponseContentType: Sets the Content-Type header of the response.
:type ResponseExpires: datetime
:param ResponseExpires: Sets the Expires header of the response.
:type VersionId: string
:param VersionId: VersionId used to reference a specific version of the object.
:type SSECustomerAlgorithm: string
:param SSECustomerAlgorithm: Specifies the algorithm to use to when encrypting the object (e.g., AES256).
:type SSECustomerKey: string
:param SSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side -encryption -customer-algorithm header.
:type SSECustomerKeyMD5: string
:param SSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:type PartNumber: integer
:param PartNumber: Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.
:rtype: dict
:return: {
'Body': StreamingBody(),
'DeleteMarker': True|False,
'AcceptRanges': 'string',
'Expiration': 'string',
'Restore': 'string',
'LastModified': datetime(2015, 1, 1),
'ContentLength': 123,
'ETag': 'string',
'MissingMeta': 123,
'VersionId': 'string',
'CacheControl': 'string',
'ContentDisposition': 'string',
'ContentEncoding': 'string',
'ContentLanguage': 'string',
'ContentRange': 'string',
'ContentType': 'string',
'Expires': datetime(2015, 1, 1),
'WebsiteRedirectLocation': 'string',
'ServerSideEncryption': 'AES256'|'aws:kms',
'Metadata': {
'string': 'string'
},
'SSECustomerAlgorithm': 'string',
'SSECustomerKeyMD5': 'string',
'SSEKMSKeyId': 'string',
'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA',
'RequestCharged': 'requester',
'ReplicationStatus': 'COMPLETE'|'PENDING'|'FAILED'|'REPLICA',
'PartsCount': 123,
'TagCount': 123
}
:returns:
(dict) --
Body (StreamingBody) -- Object data.
DeleteMarker (boolean) -- Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.
AcceptRanges (string) --
Expiration (string) -- If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
Restore (string) -- Provides information about object restoration operation and expiration time of the restored object copy.
LastModified (datetime) -- Last modified date of the object
ContentLength (integer) -- Size of the body in bytes.
ETag (string) -- An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL
MissingMeta (integer) -- This is set to the number of metadata entries not returned in x-amz-meta headers. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.
VersionId (string) -- Version of the object.
CacheControl (string) -- Specifies caching behavior along the request/reply chain.
ContentDisposition (string) -- Specifies presentational information for the object.
ContentEncoding (string) -- Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
ContentLanguage (string) -- The language the content is in.
ContentRange (string) -- The portion of the object returned in the response.
ContentType (string) -- A standard MIME type describing the format of the object data.
Expires (datetime) -- The date and time at which the object is no longer cacheable.
WebsiteRedirectLocation (string) -- If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
ServerSideEncryption (string) -- The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
Metadata (dict) -- A map of metadata to store with the object in S3.
(string) --
(string) --
SSECustomerAlgorithm (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) -- If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
StorageClass (string) --
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request.
ReplicationStatus (string) --
PartsCount (integer) -- The count of parts this object has.
TagCount (integer) -- The number of tags, if any, on the object. | entailment |
def head_object(Bucket=None, IfMatch=None, IfModifiedSince=None, IfNoneMatch=None, IfUnmodifiedSince=None, Key=None, Range=None, VersionId=None, SSECustomerAlgorithm=None, SSECustomerKey=None, SSECustomerKeyMD5=None, RequestPayer=None, PartNumber=None):
"""
The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you're only interested in an object's metadata. To use HEAD, you must have READ access to the object.
See also: AWS API Documentation
:example: response = client.head_object(
Bucket='string',
IfMatch='string',
IfModifiedSince=datetime(2015, 1, 1),
IfNoneMatch='string',
IfUnmodifiedSince=datetime(2015, 1, 1),
Key='string',
Range='string',
VersionId='string',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
RequestPayer='requester',
PartNumber=123
)
:type Bucket: string
:param Bucket: [REQUIRED]
:type IfMatch: string
:param IfMatch: Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).
:type IfModifiedSince: datetime
:param IfModifiedSince: Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).
:type IfNoneMatch: string
:param IfNoneMatch: Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).
:type IfUnmodifiedSince: datetime
:param IfUnmodifiedSince: Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).
:type Key: string
:param Key: [REQUIRED]
:type Range: string
:param Range: Downloads the specified range bytes of an object. For more information about the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
:type VersionId: string
:param VersionId: VersionId used to reference a specific version of the object.
:type SSECustomerAlgorithm: string
:param SSECustomerAlgorithm: Specifies the algorithm to use to when encrypting the object (e.g., AES256).
:type SSECustomerKey: string
:param SSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side -encryption -customer-algorithm header.
:type SSECustomerKeyMD5: string
:param SSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:type PartNumber: integer
:param PartNumber: Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.
:rtype: dict
:return: {
'DeleteMarker': True|False,
'AcceptRanges': 'string',
'Expiration': 'string',
'Restore': 'string',
'LastModified': datetime(2015, 1, 1),
'ContentLength': 123,
'ETag': 'string',
'MissingMeta': 123,
'VersionId': 'string',
'CacheControl': 'string',
'ContentDisposition': 'string',
'ContentEncoding': 'string',
'ContentLanguage': 'string',
'ContentType': 'string',
'Expires': datetime(2015, 1, 1),
'WebsiteRedirectLocation': 'string',
'ServerSideEncryption': 'AES256'|'aws:kms',
'Metadata': {
'string': 'string'
},
'SSECustomerAlgorithm': 'string',
'SSECustomerKeyMD5': 'string',
'SSEKMSKeyId': 'string',
'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA',
'RequestCharged': 'requester',
'ReplicationStatus': 'COMPLETE'|'PENDING'|'FAILED'|'REPLICA',
'PartsCount': 123
}
:returns:
(dict) --
DeleteMarker (boolean) -- Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.
AcceptRanges (string) --
Expiration (string) -- If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
Restore (string) -- Provides information about object restoration operation and expiration time of the restored object copy.
LastModified (datetime) -- Last modified date of the object
ContentLength (integer) -- Size of the body in bytes.
ETag (string) -- An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL
MissingMeta (integer) -- This is set to the number of metadata entries not returned in x-amz-meta headers. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.
VersionId (string) -- Version of the object.
CacheControl (string) -- Specifies caching behavior along the request/reply chain.
ContentDisposition (string) -- Specifies presentational information for the object.
ContentEncoding (string) -- Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
ContentLanguage (string) -- The language the content is in.
ContentType (string) -- A standard MIME type describing the format of the object data.
Expires (datetime) -- The date and time at which the object is no longer cacheable.
WebsiteRedirectLocation (string) -- If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
ServerSideEncryption (string) -- The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
Metadata (dict) -- A map of metadata to store with the object in S3.
(string) --
(string) --
SSECustomerAlgorithm (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) -- If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
StorageClass (string) --
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request.
ReplicationStatus (string) --
PartsCount (integer) -- The count of parts this object has.
"""
pass | The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you're only interested in an object's metadata. To use HEAD, you must have READ access to the object.
See also: AWS API Documentation
:example: response = client.head_object(
Bucket='string',
IfMatch='string',
IfModifiedSince=datetime(2015, 1, 1),
IfNoneMatch='string',
IfUnmodifiedSince=datetime(2015, 1, 1),
Key='string',
Range='string',
VersionId='string',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
RequestPayer='requester',
PartNumber=123
)
:type Bucket: string
:param Bucket: [REQUIRED]
:type IfMatch: string
:param IfMatch: Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).
:type IfModifiedSince: datetime
:param IfModifiedSince: Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).
:type IfNoneMatch: string
:param IfNoneMatch: Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).
:type IfUnmodifiedSince: datetime
:param IfUnmodifiedSince: Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).
:type Key: string
:param Key: [REQUIRED]
:type Range: string
:param Range: Downloads the specified range bytes of an object. For more information about the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
:type VersionId: string
:param VersionId: VersionId used to reference a specific version of the object.
:type SSECustomerAlgorithm: string
:param SSECustomerAlgorithm: Specifies the algorithm to use to when encrypting the object (e.g., AES256).
:type SSECustomerKey: string
:param SSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side -encryption -customer-algorithm header.
:type SSECustomerKeyMD5: string
:param SSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:type PartNumber: integer
:param PartNumber: Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.
:rtype: dict
:return: {
'DeleteMarker': True|False,
'AcceptRanges': 'string',
'Expiration': 'string',
'Restore': 'string',
'LastModified': datetime(2015, 1, 1),
'ContentLength': 123,
'ETag': 'string',
'MissingMeta': 123,
'VersionId': 'string',
'CacheControl': 'string',
'ContentDisposition': 'string',
'ContentEncoding': 'string',
'ContentLanguage': 'string',
'ContentType': 'string',
'Expires': datetime(2015, 1, 1),
'WebsiteRedirectLocation': 'string',
'ServerSideEncryption': 'AES256'|'aws:kms',
'Metadata': {
'string': 'string'
},
'SSECustomerAlgorithm': 'string',
'SSECustomerKeyMD5': 'string',
'SSEKMSKeyId': 'string',
'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA',
'RequestCharged': 'requester',
'ReplicationStatus': 'COMPLETE'|'PENDING'|'FAILED'|'REPLICA',
'PartsCount': 123
}
:returns:
(dict) --
DeleteMarker (boolean) -- Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.
AcceptRanges (string) --
Expiration (string) -- If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
Restore (string) -- Provides information about object restoration operation and expiration time of the restored object copy.
LastModified (datetime) -- Last modified date of the object
ContentLength (integer) -- Size of the body in bytes.
ETag (string) -- An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL
MissingMeta (integer) -- This is set to the number of metadata entries not returned in x-amz-meta headers. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.
VersionId (string) -- Version of the object.
CacheControl (string) -- Specifies caching behavior along the request/reply chain.
ContentDisposition (string) -- Specifies presentational information for the object.
ContentEncoding (string) -- Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
ContentLanguage (string) -- The language the content is in.
ContentType (string) -- A standard MIME type describing the format of the object data.
Expires (datetime) -- The date and time at which the object is no longer cacheable.
WebsiteRedirectLocation (string) -- If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
ServerSideEncryption (string) -- The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
Metadata (dict) -- A map of metadata to store with the object in S3.
(string) --
(string) --
SSECustomerAlgorithm (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) -- If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
StorageClass (string) --
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request.
ReplicationStatus (string) --
PartsCount (integer) -- The count of parts this object has. | entailment |
def list_objects_v2(Bucket=None, Delimiter=None, EncodingType=None, MaxKeys=None, Prefix=None, ContinuationToken=None, FetchOwner=None, StartAfter=None, RequestPayer=None):
"""
Returns some or all (up to 1000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend you use this revised API for new application development.
See also: AWS API Documentation
:example: response = client.list_objects_v2(
Bucket='string',
Delimiter='string',
EncodingType='url',
MaxKeys=123,
Prefix='string',
ContinuationToken='string',
FetchOwner=True|False,
StartAfter='string',
RequestPayer='requester'
)
:type Bucket: string
:param Bucket: [REQUIRED] Name of the bucket to list.
:type Delimiter: string
:param Delimiter: A delimiter is a character you use to group keys.
:type EncodingType: string
:param EncodingType: Encoding type used by Amazon S3 to encode object keys in the response.
:type MaxKeys: integer
:param MaxKeys: Sets the maximum number of keys returned in the response. The response might contain fewer keys but will never contain more.
:type Prefix: string
:param Prefix: Limits the response to keys that begin with the specified prefix.
:type ContinuationToken: string
:param ContinuationToken: ContinuationToken indicates Amazon S3 that the list is being continued on this bucket with a token. ContinuationToken is obfuscated and is not a real key
:type FetchOwner: boolean
:param FetchOwner: The owner field is not present in listV2 by default, if you want to return owner field with each key in the result then set the fetch owner field to true
:type StartAfter: string
:param StartAfter: StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. StartAfter can be any key in the bucket
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the list objects request in V2 style. Bucket owners need not specify this parameter in their requests.
:rtype: dict
:return: {
'IsTruncated': True|False,
'Contents': [
{
'Key': 'string',
'LastModified': datetime(2015, 1, 1),
'ETag': 'string',
'Size': 123,
'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'GLACIER',
'Owner': {
'DisplayName': 'string',
'ID': 'string'
}
},
],
'Name': 'string',
'Prefix': 'string',
'Delimiter': 'string',
'MaxKeys': 123,
'CommonPrefixes': [
{
'Prefix': 'string'
},
],
'EncodingType': 'url',
'KeyCount': 123,
'ContinuationToken': 'string',
'NextContinuationToken': 'string',
'StartAfter': 'string'
}
:returns:
(dict) --
IsTruncated (boolean) -- A flag that indicates whether or not Amazon S3 returned all of the results that satisfied the search criteria.
Contents (list) -- Metadata about each object returned.
(dict) --
Key (string) --
LastModified (datetime) --
ETag (string) --
Size (integer) --
StorageClass (string) -- The class of storage used to store the object.
Owner (dict) --
DisplayName (string) --
ID (string) --
Name (string) -- Name of the bucket to list.
Prefix (string) -- Limits the response to keys that begin with the specified prefix.
Delimiter (string) -- A delimiter is a character you use to group keys.
MaxKeys (integer) -- Sets the maximum number of keys returned in the response. The response might contain fewer keys but will never contain more.
CommonPrefixes (list) -- CommonPrefixes contains all (if there are any) keys between Prefix and the next occurrence of the string specified by delimiter
(dict) --
Prefix (string) --
EncodingType (string) -- Encoding type used by Amazon S3 to encode object keys in the response.
KeyCount (integer) -- KeyCount is the number of keys returned with this request. KeyCount will always be less than equals to MaxKeys field. Say you ask for 50 keys, your result will include less than equals 50 keys
ContinuationToken (string) -- ContinuationToken indicates Amazon S3 that the list is being continued on this bucket with a token. ContinuationToken is obfuscated and is not a real key
NextContinuationToken (string) -- NextContinuationToken is sent when isTruncated is true which means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken is obfuscated and is not a real key
StartAfter (string) -- StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. StartAfter can be any key in the bucket
"""
pass | Returns some or all (up to 1000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend you use this revised API for new application development.
See also: AWS API Documentation
:example: response = client.list_objects_v2(
Bucket='string',
Delimiter='string',
EncodingType='url',
MaxKeys=123,
Prefix='string',
ContinuationToken='string',
FetchOwner=True|False,
StartAfter='string',
RequestPayer='requester'
)
:type Bucket: string
:param Bucket: [REQUIRED] Name of the bucket to list.
:type Delimiter: string
:param Delimiter: A delimiter is a character you use to group keys.
:type EncodingType: string
:param EncodingType: Encoding type used by Amazon S3 to encode object keys in the response.
:type MaxKeys: integer
:param MaxKeys: Sets the maximum number of keys returned in the response. The response might contain fewer keys but will never contain more.
:type Prefix: string
:param Prefix: Limits the response to keys that begin with the specified prefix.
:type ContinuationToken: string
:param ContinuationToken: ContinuationToken indicates Amazon S3 that the list is being continued on this bucket with a token. ContinuationToken is obfuscated and is not a real key
:type FetchOwner: boolean
:param FetchOwner: The owner field is not present in listV2 by default, if you want to return owner field with each key in the result then set the fetch owner field to true
:type StartAfter: string
:param StartAfter: StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. StartAfter can be any key in the bucket
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the list objects request in V2 style. Bucket owners need not specify this parameter in their requests.
:rtype: dict
:return: {
'IsTruncated': True|False,
'Contents': [
{
'Key': 'string',
'LastModified': datetime(2015, 1, 1),
'ETag': 'string',
'Size': 123,
'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'GLACIER',
'Owner': {
'DisplayName': 'string',
'ID': 'string'
}
},
],
'Name': 'string',
'Prefix': 'string',
'Delimiter': 'string',
'MaxKeys': 123,
'CommonPrefixes': [
{
'Prefix': 'string'
},
],
'EncodingType': 'url',
'KeyCount': 123,
'ContinuationToken': 'string',
'NextContinuationToken': 'string',
'StartAfter': 'string'
}
:returns:
(dict) --
IsTruncated (boolean) -- A flag that indicates whether or not Amazon S3 returned all of the results that satisfied the search criteria.
Contents (list) -- Metadata about each object returned.
(dict) --
Key (string) --
LastModified (datetime) --
ETag (string) --
Size (integer) --
StorageClass (string) -- The class of storage used to store the object.
Owner (dict) --
DisplayName (string) --
ID (string) --
Name (string) -- Name of the bucket to list.
Prefix (string) -- Limits the response to keys that begin with the specified prefix.
Delimiter (string) -- A delimiter is a character you use to group keys.
MaxKeys (integer) -- Sets the maximum number of keys returned in the response. The response might contain fewer keys but will never contain more.
CommonPrefixes (list) -- CommonPrefixes contains all (if there are any) keys between Prefix and the next occurrence of the string specified by delimiter
(dict) --
Prefix (string) --
EncodingType (string) -- Encoding type used by Amazon S3 to encode object keys in the response.
KeyCount (integer) -- KeyCount is the number of keys returned with this request. KeyCount will always be less than equals to MaxKeys field. Say you ask for 50 keys, your result will include less than equals 50 keys
ContinuationToken (string) -- ContinuationToken indicates Amazon S3 that the list is being continued on this bucket with a token. ContinuationToken is obfuscated and is not a real key
NextContinuationToken (string) -- NextContinuationToken is sent when isTruncated is true which means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken is obfuscated and is not a real key
StartAfter (string) -- StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. StartAfter can be any key in the bucket | entailment |
def put_object(ACL=None, Body=None, Bucket=None, CacheControl=None, ContentDisposition=None, ContentEncoding=None, ContentLanguage=None, ContentLength=None, ContentMD5=None, ContentType=None, Expires=None, GrantFullControl=None, GrantRead=None, GrantReadACP=None, GrantWriteACP=None, Key=None, Metadata=None, ServerSideEncryption=None, StorageClass=None, WebsiteRedirectLocation=None, SSECustomerAlgorithm=None, SSECustomerKey=None, SSECustomerKeyMD5=None, SSEKMSKeyId=None, RequestPayer=None, Tagging=None):
"""
Adds an object to a bucket.
See also: AWS API Documentation
:example: response = client.put_object(
ACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'aws-exec-read'|'bucket-owner-read'|'bucket-owner-full-control',
Body=b'bytes'|file,
Bucket='string',
CacheControl='string',
ContentDisposition='string',
ContentEncoding='string',
ContentLanguage='string',
ContentLength=123,
ContentMD5='string',
ContentType='string',
Expires=datetime(2015, 1, 1),
GrantFullControl='string',
GrantRead='string',
GrantReadACP='string',
GrantWriteACP='string',
Key='string',
Metadata={
'string': 'string'
},
ServerSideEncryption='AES256'|'aws:kms',
StorageClass='STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA',
WebsiteRedirectLocation='string',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
SSEKMSKeyId='string',
RequestPayer='requester',
Tagging='string'
)
:type ACL: string
:param ACL: The canned ACL to apply to the object.
:type Body: bytes or seekable file-like object
:param Body: Object data.
:type Bucket: string
:param Bucket: [REQUIRED] Name of the bucket to which the PUT operation was initiated.
:type CacheControl: string
:param CacheControl: Specifies caching behavior along the request/reply chain.
:type ContentDisposition: string
:param ContentDisposition: Specifies presentational information for the object.
:type ContentEncoding: string
:param ContentEncoding: Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
:type ContentLanguage: string
:param ContentLanguage: The language the content is in.
:type ContentLength: integer
:param ContentLength: Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.
:type ContentMD5: string
:param ContentMD5: The base64-encoded 128-bit MD5 digest of the part data.
:type ContentType: string
:param ContentType: A standard MIME type describing the format of the object data.
:type Expires: datetime
:param Expires: The date and time at which the object is no longer cacheable.
:type GrantFullControl: string
:param GrantFullControl: Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
:type GrantRead: string
:param GrantRead: Allows grantee to read the object data and its metadata.
:type GrantReadACP: string
:param GrantReadACP: Allows grantee to read the object ACL.
:type GrantWriteACP: string
:param GrantWriteACP: Allows grantee to write the ACL for the applicable object.
:type Key: string
:param Key: [REQUIRED] Object key for which the PUT operation was initiated.
:type Metadata: dict
:param Metadata: A map of metadata to store with the object in S3.
(string) --
(string) --
:type ServerSideEncryption: string
:param ServerSideEncryption: The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
:type StorageClass: string
:param StorageClass: The type of storage to use for the object. Defaults to 'STANDARD'.
:type WebsiteRedirectLocation: string
:param WebsiteRedirectLocation: If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
:type SSECustomerAlgorithm: string
:param SSECustomerAlgorithm: Specifies the algorithm to use to when encrypting the object (e.g., AES256).
:type SSECustomerKey: string
:param SSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side -encryption -customer-algorithm header.
:type SSECustomerKeyMD5: string
:param SSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type SSEKMSKeyId: string
:param SSEKMSKeyId: Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. Documentation on configuring any of the officially supported AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:type Tagging: string
:param Tagging: The tag-set for the object. The tag-set must be encoded as URL Query parameters
:rtype: dict
:return: {
'Expiration': 'string',
'ETag': 'string',
'ServerSideEncryption': 'AES256'|'aws:kms',
'VersionId': 'string',
'SSECustomerAlgorithm': 'string',
'SSECustomerKeyMD5': 'string',
'SSEKMSKeyId': 'string',
'RequestCharged': 'requester'
}
:returns:
(dict) --
Expiration (string) -- If the object expiration is configured, this will contain the expiration date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
ETag (string) -- Entity tag for the uploaded object.
ServerSideEncryption (string) -- The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
VersionId (string) -- Version of the object.
SSECustomerAlgorithm (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) -- If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request.
"""
pass | Adds an object to a bucket.
See also: AWS API Documentation
:example: response = client.put_object(
ACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'aws-exec-read'|'bucket-owner-read'|'bucket-owner-full-control',
Body=b'bytes'|file,
Bucket='string',
CacheControl='string',
ContentDisposition='string',
ContentEncoding='string',
ContentLanguage='string',
ContentLength=123,
ContentMD5='string',
ContentType='string',
Expires=datetime(2015, 1, 1),
GrantFullControl='string',
GrantRead='string',
GrantReadACP='string',
GrantWriteACP='string',
Key='string',
Metadata={
'string': 'string'
},
ServerSideEncryption='AES256'|'aws:kms',
StorageClass='STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA',
WebsiteRedirectLocation='string',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
SSEKMSKeyId='string',
RequestPayer='requester',
Tagging='string'
)
:type ACL: string
:param ACL: The canned ACL to apply to the object.
:type Body: bytes or seekable file-like object
:param Body: Object data.
:type Bucket: string
:param Bucket: [REQUIRED] Name of the bucket to which the PUT operation was initiated.
:type CacheControl: string
:param CacheControl: Specifies caching behavior along the request/reply chain.
:type ContentDisposition: string
:param ContentDisposition: Specifies presentational information for the object.
:type ContentEncoding: string
:param ContentEncoding: Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
:type ContentLanguage: string
:param ContentLanguage: The language the content is in.
:type ContentLength: integer
:param ContentLength: Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.
:type ContentMD5: string
:param ContentMD5: The base64-encoded 128-bit MD5 digest of the part data.
:type ContentType: string
:param ContentType: A standard MIME type describing the format of the object data.
:type Expires: datetime
:param Expires: The date and time at which the object is no longer cacheable.
:type GrantFullControl: string
:param GrantFullControl: Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
:type GrantRead: string
:param GrantRead: Allows grantee to read the object data and its metadata.
:type GrantReadACP: string
:param GrantReadACP: Allows grantee to read the object ACL.
:type GrantWriteACP: string
:param GrantWriteACP: Allows grantee to write the ACL for the applicable object.
:type Key: string
:param Key: [REQUIRED] Object key for which the PUT operation was initiated.
:type Metadata: dict
:param Metadata: A map of metadata to store with the object in S3.
(string) --
(string) --
:type ServerSideEncryption: string
:param ServerSideEncryption: The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
:type StorageClass: string
:param StorageClass: The type of storage to use for the object. Defaults to 'STANDARD'.
:type WebsiteRedirectLocation: string
:param WebsiteRedirectLocation: If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
:type SSECustomerAlgorithm: string
:param SSECustomerAlgorithm: Specifies the algorithm to use to when encrypting the object (e.g., AES256).
:type SSECustomerKey: string
:param SSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side -encryption -customer-algorithm header.
:type SSECustomerKeyMD5: string
:param SSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type SSEKMSKeyId: string
:param SSEKMSKeyId: Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. Documentation on configuring any of the officially supported AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:type Tagging: string
:param Tagging: The tag-set for the object. The tag-set must be encoded as URL Query parameters
:rtype: dict
:return: {
'Expiration': 'string',
'ETag': 'string',
'ServerSideEncryption': 'AES256'|'aws:kms',
'VersionId': 'string',
'SSECustomerAlgorithm': 'string',
'SSECustomerKeyMD5': 'string',
'SSEKMSKeyId': 'string',
'RequestCharged': 'requester'
}
:returns:
(dict) --
Expiration (string) -- If the object expiration is configured, this will contain the expiration date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
ETag (string) -- Entity tag for the uploaded object.
ServerSideEncryption (string) -- The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
VersionId (string) -- Version of the object.
SSECustomerAlgorithm (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) -- If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request. | entailment |
def put_object_acl(ACL=None, AccessControlPolicy=None, Bucket=None, GrantFullControl=None, GrantRead=None, GrantReadACP=None, GrantWrite=None, GrantWriteACP=None, Key=None, RequestPayer=None, VersionId=None):
"""
uses the acl subresource to set the access control list (ACL) permissions for an object that already exists in a bucket
See also: AWS API Documentation
:example: response = client.put_object_acl(
ACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'aws-exec-read'|'bucket-owner-read'|'bucket-owner-full-control',
AccessControlPolicy={
'Grants': [
{
'Grantee': {
'DisplayName': 'string',
'EmailAddress': 'string',
'ID': 'string',
'Type': 'CanonicalUser'|'AmazonCustomerByEmail'|'Group',
'URI': 'string'
},
'Permission': 'FULL_CONTROL'|'WRITE'|'WRITE_ACP'|'READ'|'READ_ACP'
},
],
'Owner': {
'DisplayName': 'string',
'ID': 'string'
}
},
Bucket='string',
GrantFullControl='string',
GrantRead='string',
GrantReadACP='string',
GrantWrite='string',
GrantWriteACP='string',
Key='string',
RequestPayer='requester',
VersionId='string'
)
:type ACL: string
:param ACL: The canned ACL to apply to the object.
:type AccessControlPolicy: dict
:param AccessControlPolicy:
Grants (list) -- A list of grants.
(dict) --
Grantee (dict) --
DisplayName (string) -- Screen name of the grantee.
EmailAddress (string) -- Email address of the grantee.
ID (string) -- The canonical user ID of the grantee.
Type (string) -- [REQUIRED] Type of grantee
URI (string) -- URI of the grantee group.
Permission (string) -- Specifies the permission given to the grantee.
Owner (dict) --
DisplayName (string) --
ID (string) --
:type Bucket: string
:param Bucket: [REQUIRED]
:type GrantFullControl: string
:param GrantFullControl: Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.
:type GrantRead: string
:param GrantRead: Allows grantee to list the objects in the bucket.
:type GrantReadACP: string
:param GrantReadACP: Allows grantee to read the bucket ACL.
:type GrantWrite: string
:param GrantWrite: Allows grantee to create, overwrite, and delete any object in the bucket.
:type GrantWriteACP: string
:param GrantWriteACP: Allows grantee to write the ACL for the applicable bucket.
:type Key: string
:param Key: [REQUIRED]
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:type VersionId: string
:param VersionId: VersionId used to reference a specific version of the object.
:rtype: dict
:return: {
'RequestCharged': 'requester'
}
:returns:
(dict) --
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request.
"""
pass | uses the acl subresource to set the access control list (ACL) permissions for an object that already exists in a bucket
See also: AWS API Documentation
:example: response = client.put_object_acl(
ACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'aws-exec-read'|'bucket-owner-read'|'bucket-owner-full-control',
AccessControlPolicy={
'Grants': [
{
'Grantee': {
'DisplayName': 'string',
'EmailAddress': 'string',
'ID': 'string',
'Type': 'CanonicalUser'|'AmazonCustomerByEmail'|'Group',
'URI': 'string'
},
'Permission': 'FULL_CONTROL'|'WRITE'|'WRITE_ACP'|'READ'|'READ_ACP'
},
],
'Owner': {
'DisplayName': 'string',
'ID': 'string'
}
},
Bucket='string',
GrantFullControl='string',
GrantRead='string',
GrantReadACP='string',
GrantWrite='string',
GrantWriteACP='string',
Key='string',
RequestPayer='requester',
VersionId='string'
)
:type ACL: string
:param ACL: The canned ACL to apply to the object.
:type AccessControlPolicy: dict
:param AccessControlPolicy:
Grants (list) -- A list of grants.
(dict) --
Grantee (dict) --
DisplayName (string) -- Screen name of the grantee.
EmailAddress (string) -- Email address of the grantee.
ID (string) -- The canonical user ID of the grantee.
Type (string) -- [REQUIRED] Type of grantee
URI (string) -- URI of the grantee group.
Permission (string) -- Specifies the permission given to the grantee.
Owner (dict) --
DisplayName (string) --
ID (string) --
:type Bucket: string
:param Bucket: [REQUIRED]
:type GrantFullControl: string
:param GrantFullControl: Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.
:type GrantRead: string
:param GrantRead: Allows grantee to list the objects in the bucket.
:type GrantReadACP: string
:param GrantReadACP: Allows grantee to read the bucket ACL.
:type GrantWrite: string
:param GrantWrite: Allows grantee to create, overwrite, and delete any object in the bucket.
:type GrantWriteACP: string
:param GrantWriteACP: Allows grantee to write the ACL for the applicable bucket.
:type Key: string
:param Key: [REQUIRED]
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:type VersionId: string
:param VersionId: VersionId used to reference a specific version of the object.
:rtype: dict
:return: {
'RequestCharged': 'requester'
}
:returns:
(dict) --
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request. | entailment |
def upload_part(Body=None, Bucket=None, ContentLength=None, ContentMD5=None, Key=None, PartNumber=None, UploadId=None, SSECustomerAlgorithm=None, SSECustomerKey=None, SSECustomerKeyMD5=None, RequestPayer=None):
"""
Uploads a part in a multipart upload.
Note: After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.
See also: AWS API Documentation
:example: response = client.upload_part(
Body=b'bytes'|file,
Bucket='string',
ContentLength=123,
ContentMD5='string',
Key='string',
PartNumber=123,
UploadId='string',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
RequestPayer='requester'
)
:type Body: bytes or seekable file-like object
:param Body: Object data.
:type Bucket: string
:param Bucket: [REQUIRED] Name of the bucket to which the multipart upload was initiated.
:type ContentLength: integer
:param ContentLength: Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.
:type ContentMD5: string
:param ContentMD5: The base64-encoded 128-bit MD5 digest of the part data.
:type Key: string
:param Key: [REQUIRED] Object key for which the multipart upload was initiated.
:type PartNumber: integer
:param PartNumber: [REQUIRED] Part number of part being uploaded. This is a positive integer between 1 and 10,000.
:type UploadId: string
:param UploadId: [REQUIRED] Upload ID identifying the multipart upload whose part is being uploaded.
:type SSECustomerAlgorithm: string
:param SSECustomerAlgorithm: Specifies the algorithm to use to when encrypting the object (e.g., AES256).
:type SSECustomerKey: string
:param SSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side -encryption -customer-algorithm header. This must be the same encryption key specified in the initiate multipart upload request.
:type SSECustomerKeyMD5: string
:param SSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:rtype: dict
:return: {
'ServerSideEncryption': 'AES256'|'aws:kms',
'ETag': 'string',
'SSECustomerAlgorithm': 'string',
'SSECustomerKeyMD5': 'string',
'SSEKMSKeyId': 'string',
'RequestCharged': 'requester'
}
:returns:
(dict) --
ServerSideEncryption (string) -- The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
ETag (string) -- Entity tag for the uploaded object.
SSECustomerAlgorithm (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) -- If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request.
"""
pass | Uploads a part in a multipart upload.
Note: After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.
See also: AWS API Documentation
:example: response = client.upload_part(
Body=b'bytes'|file,
Bucket='string',
ContentLength=123,
ContentMD5='string',
Key='string',
PartNumber=123,
UploadId='string',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
RequestPayer='requester'
)
:type Body: bytes or seekable file-like object
:param Body: Object data.
:type Bucket: string
:param Bucket: [REQUIRED] Name of the bucket to which the multipart upload was initiated.
:type ContentLength: integer
:param ContentLength: Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.
:type ContentMD5: string
:param ContentMD5: The base64-encoded 128-bit MD5 digest of the part data.
:type Key: string
:param Key: [REQUIRED] Object key for which the multipart upload was initiated.
:type PartNumber: integer
:param PartNumber: [REQUIRED] Part number of part being uploaded. This is a positive integer between 1 and 10,000.
:type UploadId: string
:param UploadId: [REQUIRED] Upload ID identifying the multipart upload whose part is being uploaded.
:type SSECustomerAlgorithm: string
:param SSECustomerAlgorithm: Specifies the algorithm to use to when encrypting the object (e.g., AES256).
:type SSECustomerKey: string
:param SSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side -encryption -customer-algorithm header. This must be the same encryption key specified in the initiate multipart upload request.
:type SSECustomerKeyMD5: string
:param SSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:rtype: dict
:return: {
'ServerSideEncryption': 'AES256'|'aws:kms',
'ETag': 'string',
'SSECustomerAlgorithm': 'string',
'SSECustomerKeyMD5': 'string',
'SSEKMSKeyId': 'string',
'RequestCharged': 'requester'
}
:returns:
(dict) --
ServerSideEncryption (string) -- The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
ETag (string) -- Entity tag for the uploaded object.
SSECustomerAlgorithm (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) -- If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request. | entailment |
def upload_part_copy(Bucket=None, CopySource=None, CopySourceIfMatch=None, CopySourceIfModifiedSince=None, CopySourceIfNoneMatch=None, CopySourceIfUnmodifiedSince=None, CopySourceRange=None, Key=None, PartNumber=None, UploadId=None, SSECustomerAlgorithm=None, SSECustomerKey=None, SSECustomerKeyMD5=None, CopySourceSSECustomerAlgorithm=None, CopySourceSSECustomerKey=None, CopySourceSSECustomerKeyMD5=None, RequestPayer=None):
"""
Uploads a part by copying data from an existing object as data source.
See also: AWS API Documentation
:example: response = client.upload_part_copy(
Bucket='string',
CopySource='string' or {'Bucket': 'string', 'Key': 'string', 'VersionId': 'string'},
CopySourceIfMatch='string',
CopySourceIfModifiedSince=datetime(2015, 1, 1),
CopySourceIfNoneMatch='string',
CopySourceIfUnmodifiedSince=datetime(2015, 1, 1),
CopySourceRange='string',
Key='string',
PartNumber=123,
UploadId='string',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
CopySourceSSECustomerAlgorithm='string',
CopySourceSSECustomerKey='string',
RequestPayer='requester'
)
:type Bucket: string
:param Bucket: [REQUIRED]
:type CopySource: str or dict
:param CopySource: [REQUIRED] The name of the source bucket, key name of the source object, and optional version ID of the source object. You can either provide this value as a string or a dictionary. The string form is {bucket}/{key} or {bucket}/{key}?versionId={versionId} if you want to copy a specific version. You can also provide this value as a dictionary. The dictionary format is recommended over the string format because it is more explicit. The dictionary format is: {'Bucket': 'bucket', 'Key': 'key', 'VersionId': 'id'}. Note that the VersionId key is optional and may be omitted.
:type CopySourceIfMatch: string
:param CopySourceIfMatch: Copies the object if its entity tag (ETag) matches the specified tag.
:type CopySourceIfModifiedSince: datetime
:param CopySourceIfModifiedSince: Copies the object if it has been modified since the specified time.
:type CopySourceIfNoneMatch: string
:param CopySourceIfNoneMatch: Copies the object if its entity tag (ETag) is different than the specified ETag.
:type CopySourceIfUnmodifiedSince: datetime
:param CopySourceIfUnmodifiedSince: Copies the object if it hasn't been modified since the specified time.
:type CopySourceRange: string
:param CopySourceRange: The range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first ten bytes of the source. You can copy a range only if the source object is greater than 5 GB.
:type Key: string
:param Key: [REQUIRED]
:type PartNumber: integer
:param PartNumber: [REQUIRED] Part number of part being copied. This is a positive integer between 1 and 10,000.
:type UploadId: string
:param UploadId: [REQUIRED] Upload ID identifying the multipart upload whose part is being copied.
:type SSECustomerAlgorithm: string
:param SSECustomerAlgorithm: Specifies the algorithm to use to when encrypting the object (e.g., AES256).
:type SSECustomerKey: string
:param SSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side -encryption -customer-algorithm header. This must be the same encryption key specified in the initiate multipart upload request.
:type SSECustomerKeyMD5: string
:param SSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type CopySourceSSECustomerAlgorithm: string
:param CopySourceSSECustomerAlgorithm: Specifies the algorithm to use when decrypting the source object (e.g., AES256).
:type CopySourceSSECustomerKey: string
:param CopySourceSSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.
:type CopySourceSSECustomerKeyMD5: string
:param CopySourceSSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:rtype: dict
:return: {
'CopySourceVersionId': 'string',
'CopyPartResult': {
'ETag': 'string',
'LastModified': datetime(2015, 1, 1)
},
'ServerSideEncryption': 'AES256'|'aws:kms',
'SSECustomerAlgorithm': 'string',
'SSECustomerKeyMD5': 'string',
'SSEKMSKeyId': 'string',
'RequestCharged': 'requester'
}
:returns:
(dict) --
CopySourceVersionId (string) -- The version of the source object that was copied, if you have enabled versioning on the source bucket.
CopyPartResult (dict) --
ETag (string) -- Entity tag of the object.
LastModified (datetime) -- Date and time at which the object was uploaded.
ServerSideEncryption (string) -- The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
SSECustomerAlgorithm (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) -- If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request.
"""
pass | Uploads a part by copying data from an existing object as data source.
See also: AWS API Documentation
:example: response = client.upload_part_copy(
Bucket='string',
CopySource='string' or {'Bucket': 'string', 'Key': 'string', 'VersionId': 'string'},
CopySourceIfMatch='string',
CopySourceIfModifiedSince=datetime(2015, 1, 1),
CopySourceIfNoneMatch='string',
CopySourceIfUnmodifiedSince=datetime(2015, 1, 1),
CopySourceRange='string',
Key='string',
PartNumber=123,
UploadId='string',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
CopySourceSSECustomerAlgorithm='string',
CopySourceSSECustomerKey='string',
RequestPayer='requester'
)
:type Bucket: string
:param Bucket: [REQUIRED]
:type CopySource: str or dict
:param CopySource: [REQUIRED] The name of the source bucket, key name of the source object, and optional version ID of the source object. You can either provide this value as a string or a dictionary. The string form is {bucket}/{key} or {bucket}/{key}?versionId={versionId} if you want to copy a specific version. You can also provide this value as a dictionary. The dictionary format is recommended over the string format because it is more explicit. The dictionary format is: {'Bucket': 'bucket', 'Key': 'key', 'VersionId': 'id'}. Note that the VersionId key is optional and may be omitted.
:type CopySourceIfMatch: string
:param CopySourceIfMatch: Copies the object if its entity tag (ETag) matches the specified tag.
:type CopySourceIfModifiedSince: datetime
:param CopySourceIfModifiedSince: Copies the object if it has been modified since the specified time.
:type CopySourceIfNoneMatch: string
:param CopySourceIfNoneMatch: Copies the object if its entity tag (ETag) is different than the specified ETag.
:type CopySourceIfUnmodifiedSince: datetime
:param CopySourceIfUnmodifiedSince: Copies the object if it hasn't been modified since the specified time.
:type CopySourceRange: string
:param CopySourceRange: The range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first ten bytes of the source. You can copy a range only if the source object is greater than 5 GB.
:type Key: string
:param Key: [REQUIRED]
:type PartNumber: integer
:param PartNumber: [REQUIRED] Part number of part being copied. This is a positive integer between 1 and 10,000.
:type UploadId: string
:param UploadId: [REQUIRED] Upload ID identifying the multipart upload whose part is being copied.
:type SSECustomerAlgorithm: string
:param SSECustomerAlgorithm: Specifies the algorithm to use to when encrypting the object (e.g., AES256).
:type SSECustomerKey: string
:param SSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side -encryption -customer-algorithm header. This must be the same encryption key specified in the initiate multipart upload request.
:type SSECustomerKeyMD5: string
:param SSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type CopySourceSSECustomerAlgorithm: string
:param CopySourceSSECustomerAlgorithm: Specifies the algorithm to use when decrypting the source object (e.g., AES256).
:type CopySourceSSECustomerKey: string
:param CopySourceSSECustomerKey: Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.
:type CopySourceSSECustomerKeyMD5: string
:param CopySourceSSECustomerKeyMD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error. Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type RequestPayer: string
:param RequestPayer: Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
:rtype: dict
:return: {
'CopySourceVersionId': 'string',
'CopyPartResult': {
'ETag': 'string',
'LastModified': datetime(2015, 1, 1)
},
'ServerSideEncryption': 'AES256'|'aws:kms',
'SSECustomerAlgorithm': 'string',
'SSECustomerKeyMD5': 'string',
'SSEKMSKeyId': 'string',
'RequestCharged': 'requester'
}
:returns:
(dict) --
CopySourceVersionId (string) -- The version of the source object that was copied, if you have enabled versioning on the source bucket.
CopyPartResult (dict) --
ETag (string) -- Entity tag of the object.
LastModified (datetime) -- Date and time at which the object was uploaded.
ServerSideEncryption (string) -- The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
SSECustomerAlgorithm (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
SSECustomerKeyMD5 (string) -- If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
SSEKMSKeyId (string) -- If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request. | entailment |
def authorize_security_group_egress(DryRun=None, GroupId=None, SourceSecurityGroupName=None, SourceSecurityGroupOwnerId=None, IpProtocol=None, FromPort=None, ToPort=None, CidrIp=None, IpPermissions=None):
"""
[EC2-VPC only] Adds one or more egress rules to a security group for use with a VPC. Specifically, this action permits instances to send traffic to one or more destination IPv4 or IPv6 CIDR address ranges, or to one or more destination security groups for the same VPC. This action doesn't apply to security groups for use in EC2-Classic. For more information, see Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide . For more information about security group limits, see Amazon VPC Limits .
Each rule consists of the protocol (for example, TCP), plus either a CIDR range or a source group. For the TCP and UDP protocols, you must also specify the destination port or port range. For the ICMP protocol, you must also specify the ICMP type and code. You can use -1 for the type or code to mean all types or all codes.
Rule changes are propagated to affected instances as quickly as possible. However, a small delay might occur.
See also: AWS API Documentation
:example: response = client.authorize_security_group_egress(
DryRun=True|False,
GroupId='string',
SourceSecurityGroupName='string',
SourceSecurityGroupOwnerId='string',
IpProtocol='string',
FromPort=123,
ToPort=123,
CidrIp='string',
IpPermissions=[
{
'IpProtocol': 'string',
'FromPort': 123,
'ToPort': 123,
'UserIdGroupPairs': [
{
'UserId': 'string',
'GroupName': 'string',
'GroupId': 'string',
'VpcId': 'string',
'VpcPeeringConnectionId': 'string',
'PeeringStatus': 'string'
},
],
'IpRanges': [
{
'CidrIp': 'string'
},
],
'Ipv6Ranges': [
{
'CidrIpv6': 'string'
},
],
'PrefixListIds': [
{
'PrefixListId': 'string'
},
]
},
]
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type GroupId: string
:param GroupId: [REQUIRED]
The ID of the security group.
:type SourceSecurityGroupName: string
:param SourceSecurityGroupName: The name of a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.
:type SourceSecurityGroupOwnerId: string
:param SourceSecurityGroupOwnerId: The AWS account number for a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.
:type IpProtocol: string
:param IpProtocol: The IP protocol name or number. We recommend that you specify the protocol in a set of IP permissions instead.
:type FromPort: integer
:param FromPort: The start of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.
:type ToPort: integer
:param ToPort: The end of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.
:type CidrIp: string
:param CidrIp: The CIDR IPv4 address range. We recommend that you specify the CIDR range in a set of IP permissions instead.
:type IpPermissions: list
:param IpPermissions: A set of IP permissions. You can't specify a destination security group and a CIDR IP address range.
(dict) --Describes a security group rule.
IpProtocol (string) --The IP protocol name (tcp , udp , icmp ) or number (see Protocol Numbers ).
[EC2-VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or 58 (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For 58 (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules.
FromPort (integer) --The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types.
ToPort (integer) --The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes for the specified ICMP type.
UserIdGroupPairs (list) --One or more security group and AWS account ID pairs.
(dict) --Describes a security group and AWS account ID pair.
UserId (string) --The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.
[EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.
GroupName (string) --The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.
GroupId (string) --The ID of the security group.
VpcId (string) --The ID of the VPC for the referenced security group, if applicable.
VpcPeeringConnectionId (string) --The ID of the VPC peering connection, if applicable.
PeeringStatus (string) --The status of a VPC peering connection, if applicable.
IpRanges (list) --One or more IPv4 ranges.
(dict) --Describes an IPv4 range.
CidrIp (string) --The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.
Ipv6Ranges (list) --[EC2-VPC only] One or more IPv6 ranges.
(dict) --[EC2-VPC only] Describes an IPv6 range.
CidrIpv6 (string) --The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.
PrefixListIds (list) --(Valid for AuthorizeSecurityGroupEgress , RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
(dict) --The ID of the prefix.
PrefixListId (string) --The ID of the prefix.
"""
pass | [EC2-VPC only] Adds one or more egress rules to a security group for use with a VPC. Specifically, this action permits instances to send traffic to one or more destination IPv4 or IPv6 CIDR address ranges, or to one or more destination security groups for the same VPC. This action doesn't apply to security groups for use in EC2-Classic. For more information, see Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide . For more information about security group limits, see Amazon VPC Limits .
Each rule consists of the protocol (for example, TCP), plus either a CIDR range or a source group. For the TCP and UDP protocols, you must also specify the destination port or port range. For the ICMP protocol, you must also specify the ICMP type and code. You can use -1 for the type or code to mean all types or all codes.
Rule changes are propagated to affected instances as quickly as possible. However, a small delay might occur.
See also: AWS API Documentation
:example: response = client.authorize_security_group_egress(
DryRun=True|False,
GroupId='string',
SourceSecurityGroupName='string',
SourceSecurityGroupOwnerId='string',
IpProtocol='string',
FromPort=123,
ToPort=123,
CidrIp='string',
IpPermissions=[
{
'IpProtocol': 'string',
'FromPort': 123,
'ToPort': 123,
'UserIdGroupPairs': [
{
'UserId': 'string',
'GroupName': 'string',
'GroupId': 'string',
'VpcId': 'string',
'VpcPeeringConnectionId': 'string',
'PeeringStatus': 'string'
},
],
'IpRanges': [
{
'CidrIp': 'string'
},
],
'Ipv6Ranges': [
{
'CidrIpv6': 'string'
},
],
'PrefixListIds': [
{
'PrefixListId': 'string'
},
]
},
]
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type GroupId: string
:param GroupId: [REQUIRED]
The ID of the security group.
:type SourceSecurityGroupName: string
:param SourceSecurityGroupName: The name of a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.
:type SourceSecurityGroupOwnerId: string
:param SourceSecurityGroupOwnerId: The AWS account number for a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.
:type IpProtocol: string
:param IpProtocol: The IP protocol name or number. We recommend that you specify the protocol in a set of IP permissions instead.
:type FromPort: integer
:param FromPort: The start of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.
:type ToPort: integer
:param ToPort: The end of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.
:type CidrIp: string
:param CidrIp: The CIDR IPv4 address range. We recommend that you specify the CIDR range in a set of IP permissions instead.
:type IpPermissions: list
:param IpPermissions: A set of IP permissions. You can't specify a destination security group and a CIDR IP address range.
(dict) --Describes a security group rule.
IpProtocol (string) --The IP protocol name (tcp , udp , icmp ) or number (see Protocol Numbers ).
[EC2-VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or 58 (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For 58 (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules.
FromPort (integer) --The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types.
ToPort (integer) --The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes for the specified ICMP type.
UserIdGroupPairs (list) --One or more security group and AWS account ID pairs.
(dict) --Describes a security group and AWS account ID pair.
UserId (string) --The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.
[EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.
GroupName (string) --The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.
GroupId (string) --The ID of the security group.
VpcId (string) --The ID of the VPC for the referenced security group, if applicable.
VpcPeeringConnectionId (string) --The ID of the VPC peering connection, if applicable.
PeeringStatus (string) --The status of a VPC peering connection, if applicable.
IpRanges (list) --One or more IPv4 ranges.
(dict) --Describes an IPv4 range.
CidrIp (string) --The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.
Ipv6Ranges (list) --[EC2-VPC only] One or more IPv6 ranges.
(dict) --[EC2-VPC only] Describes an IPv6 range.
CidrIpv6 (string) --The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.
PrefixListIds (list) --(Valid for AuthorizeSecurityGroupEgress , RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
(dict) --The ID of the prefix.
PrefixListId (string) --The ID of the prefix. | entailment |
def authorize_security_group_ingress(DryRun=None, GroupName=None, GroupId=None, SourceSecurityGroupName=None, SourceSecurityGroupOwnerId=None, IpProtocol=None, FromPort=None, ToPort=None, CidrIp=None, IpPermissions=None):
"""
Adds one or more ingress rules to a security group.
Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.
[EC2-Classic] This action gives one or more IPv4 CIDR address ranges permission to access a security group in your account, or gives one or more security groups (called the source groups ) permission to access a security group for your account. A source group can be for your own AWS account, or another. You can have up to 100 rules per group.
[EC2-VPC] This action gives one or more IPv4 or IPv6 CIDR address ranges permission to access a security group in your VPC, or gives one or more other security groups (called the source groups ) permission to access a security group for your VPC. The security groups must all be for the same VPC or a peer VPC in a VPC peering connection. For more information about VPC security group limits, see Amazon VPC Limits .
See also: AWS API Documentation
:example: response = client.authorize_security_group_ingress(
DryRun=True|False,
GroupName='string',
GroupId='string',
SourceSecurityGroupName='string',
SourceSecurityGroupOwnerId='string',
IpProtocol='string',
FromPort=123,
ToPort=123,
CidrIp='string',
IpPermissions=[
{
'IpProtocol': 'string',
'FromPort': 123,
'ToPort': 123,
'UserIdGroupPairs': [
{
'UserId': 'string',
'GroupName': 'string',
'GroupId': 'string',
'VpcId': 'string',
'VpcPeeringConnectionId': 'string',
'PeeringStatus': 'string'
},
],
'IpRanges': [
{
'CidrIp': 'string'
},
],
'Ipv6Ranges': [
{
'CidrIpv6': 'string'
},
],
'PrefixListIds': [
{
'PrefixListId': 'string'
},
]
},
]
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type GroupName: string
:param GroupName: [EC2-Classic, default VPC] The name of the security group.
:type GroupId: string
:param GroupId: The ID of the security group. Required for a nondefault VPC.
:type SourceSecurityGroupName: string
:param SourceSecurityGroupName: [EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead. For EC2-VPC, the source security group must be in the same VPC.
:type SourceSecurityGroupOwnerId: string
:param SourceSecurityGroupOwnerId: [EC2-Classic] The AWS account number for the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead.
:type IpProtocol: string
:param IpProtocol: The IP protocol name (tcp , udp , icmp ) or number (see Protocol Numbers ). (VPC only) Use -1 to specify all protocols. If you specify -1 , or a protocol number other than tcp , udp , icmp , or 58 (ICMPv6), traffic on all ports is allowed, regardless of any ports you specify. For tcp , udp , and icmp , you must specify a port range. For protocol 58 (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed.
:type FromPort: integer
:param FromPort: The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. For the ICMP/ICMPv6 type number, use -1 to specify all types.
:type ToPort: integer
:param ToPort: The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code number. For the ICMP/ICMPv6 code number, use -1 to specify all codes.
:type CidrIp: string
:param CidrIp: The CIDR IPv4 address range. You can't specify this parameter when specifying a source security group.
:type IpPermissions: list
:param IpPermissions: A set of IP permissions. Can be used to specify multiple rules in a single command.
(dict) --Describes a security group rule.
IpProtocol (string) --The IP protocol name (tcp , udp , icmp ) or number (see Protocol Numbers ).
[EC2-VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or 58 (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For 58 (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules.
FromPort (integer) --The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types.
ToPort (integer) --The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes for the specified ICMP type.
UserIdGroupPairs (list) --One or more security group and AWS account ID pairs.
(dict) --Describes a security group and AWS account ID pair.
UserId (string) --The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.
[EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.
GroupName (string) --The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.
GroupId (string) --The ID of the security group.
VpcId (string) --The ID of the VPC for the referenced security group, if applicable.
VpcPeeringConnectionId (string) --The ID of the VPC peering connection, if applicable.
PeeringStatus (string) --The status of a VPC peering connection, if applicable.
IpRanges (list) --One or more IPv4 ranges.
(dict) --Describes an IPv4 range.
CidrIp (string) --The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.
Ipv6Ranges (list) --[EC2-VPC only] One or more IPv6 ranges.
(dict) --[EC2-VPC only] Describes an IPv6 range.
CidrIpv6 (string) --The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.
PrefixListIds (list) --(Valid for AuthorizeSecurityGroupEgress , RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
(dict) --The ID of the prefix.
PrefixListId (string) --The ID of the prefix.
"""
pass | Adds one or more ingress rules to a security group.
Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.
[EC2-Classic] This action gives one or more IPv4 CIDR address ranges permission to access a security group in your account, or gives one or more security groups (called the source groups ) permission to access a security group for your account. A source group can be for your own AWS account, or another. You can have up to 100 rules per group.
[EC2-VPC] This action gives one or more IPv4 or IPv6 CIDR address ranges permission to access a security group in your VPC, or gives one or more other security groups (called the source groups ) permission to access a security group for your VPC. The security groups must all be for the same VPC or a peer VPC in a VPC peering connection. For more information about VPC security group limits, see Amazon VPC Limits .
See also: AWS API Documentation
:example: response = client.authorize_security_group_ingress(
DryRun=True|False,
GroupName='string',
GroupId='string',
SourceSecurityGroupName='string',
SourceSecurityGroupOwnerId='string',
IpProtocol='string',
FromPort=123,
ToPort=123,
CidrIp='string',
IpPermissions=[
{
'IpProtocol': 'string',
'FromPort': 123,
'ToPort': 123,
'UserIdGroupPairs': [
{
'UserId': 'string',
'GroupName': 'string',
'GroupId': 'string',
'VpcId': 'string',
'VpcPeeringConnectionId': 'string',
'PeeringStatus': 'string'
},
],
'IpRanges': [
{
'CidrIp': 'string'
},
],
'Ipv6Ranges': [
{
'CidrIpv6': 'string'
},
],
'PrefixListIds': [
{
'PrefixListId': 'string'
},
]
},
]
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type GroupName: string
:param GroupName: [EC2-Classic, default VPC] The name of the security group.
:type GroupId: string
:param GroupId: The ID of the security group. Required for a nondefault VPC.
:type SourceSecurityGroupName: string
:param SourceSecurityGroupName: [EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead. For EC2-VPC, the source security group must be in the same VPC.
:type SourceSecurityGroupOwnerId: string
:param SourceSecurityGroupOwnerId: [EC2-Classic] The AWS account number for the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead.
:type IpProtocol: string
:param IpProtocol: The IP protocol name (tcp , udp , icmp ) or number (see Protocol Numbers ). (VPC only) Use -1 to specify all protocols. If you specify -1 , or a protocol number other than tcp , udp , icmp , or 58 (ICMPv6), traffic on all ports is allowed, regardless of any ports you specify. For tcp , udp , and icmp , you must specify a port range. For protocol 58 (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed.
:type FromPort: integer
:param FromPort: The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. For the ICMP/ICMPv6 type number, use -1 to specify all types.
:type ToPort: integer
:param ToPort: The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code number. For the ICMP/ICMPv6 code number, use -1 to specify all codes.
:type CidrIp: string
:param CidrIp: The CIDR IPv4 address range. You can't specify this parameter when specifying a source security group.
:type IpPermissions: list
:param IpPermissions: A set of IP permissions. Can be used to specify multiple rules in a single command.
(dict) --Describes a security group rule.
IpProtocol (string) --The IP protocol name (tcp , udp , icmp ) or number (see Protocol Numbers ).
[EC2-VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or 58 (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For 58 (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when authorizing rules.
FromPort (integer) --The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types.
ToPort (integer) --The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes for the specified ICMP type.
UserIdGroupPairs (list) --One or more security group and AWS account ID pairs.
(dict) --Describes a security group and AWS account ID pair.
UserId (string) --The ID of an AWS account. For a referenced security group in another VPC, the account ID of the referenced security group is returned.
[EC2-Classic] Required when adding or removing rules that reference a security group in another AWS account.
GroupName (string) --The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use the security group ID.
GroupId (string) --The ID of the security group.
VpcId (string) --The ID of the VPC for the referenced security group, if applicable.
VpcPeeringConnectionId (string) --The ID of the VPC peering connection, if applicable.
PeeringStatus (string) --The status of a VPC peering connection, if applicable.
IpRanges (list) --One or more IPv4 ranges.
(dict) --Describes an IPv4 range.
CidrIp (string) --The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix.
Ipv6Ranges (list) --[EC2-VPC only] One or more IPv6 ranges.
(dict) --[EC2-VPC only] Describes an IPv6 range.
CidrIpv6 (string) --The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix.
PrefixListIds (list) --(Valid for AuthorizeSecurityGroupEgress , RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
(dict) --The ID of the prefix.
PrefixListId (string) --The ID of the prefix. | entailment |
def create_network_interface(SubnetId=None, Description=None, PrivateIpAddress=None, Groups=None, PrivateIpAddresses=None, SecondaryPrivateIpAddressCount=None, Ipv6Addresses=None, Ipv6AddressCount=None, DryRun=None):
"""
Creates a network interface in the specified subnet.
For more information about network interfaces, see Elastic Network Interfaces in the Amazon Virtual Private Cloud User Guide .
See also: AWS API Documentation
Examples
This example creates a network interface for the specified subnet.
Expected Output:
:example: response = client.create_network_interface(
SubnetId='string',
Description='string',
PrivateIpAddress='string',
Groups=[
'string',
],
PrivateIpAddresses=[
{
'PrivateIpAddress': 'string',
'Primary': True|False
},
],
SecondaryPrivateIpAddressCount=123,
Ipv6Addresses=[
{
'Ipv6Address': 'string'
},
],
Ipv6AddressCount=123,
DryRun=True|False
)
:type SubnetId: string
:param SubnetId: [REQUIRED]
The ID of the subnet to associate with the network interface.
:type Description: string
:param Description: A description for the network interface.
:type PrivateIpAddress: string
:param PrivateIpAddress: The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in privateIpAddresses as primary (only one IP address can be designated as primary).
:type Groups: list
:param Groups: The IDs of one or more security groups.
(string) --
:type PrivateIpAddresses: list
:param PrivateIpAddresses: One or more private IPv4 addresses.
(dict) --Describes a secondary private IPv4 address for a network interface.
PrivateIpAddress (string) -- [REQUIRED]The private IPv4 addresses.
Primary (boolean) --Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.
:type SecondaryPrivateIpAddressCount: integer
:param SecondaryPrivateIpAddressCount: The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using privateIpAddresses .
The number of IP addresses you can assign to a network interface varies by instance type. For more information, see IP Addresses Per ENI Per Instance Type in the Amazon Virtual Private Cloud User Guide .
:type Ipv6Addresses: list
:param Ipv6Addresses: One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.
(dict) --Describes an IPv6 address.
Ipv6Address (string) --The IPv6 address.
:type Ipv6AddressCount: integer
:param Ipv6AddressCount: The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses. If your subnet has the AssignIpv6AddressOnCreation attribute set to true , you can specify 0 to override this setting.
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:rtype: dict
:return: {
'NetworkInterface': {
'NetworkInterfaceId': 'string',
'SubnetId': 'string',
'VpcId': 'string',
'AvailabilityZone': 'string',
'Description': 'string',
'OwnerId': 'string',
'RequesterId': 'string',
'RequesterManaged': True|False,
'Status': 'available'|'attaching'|'in-use'|'detaching',
'MacAddress': 'string',
'PrivateIpAddress': 'string',
'PrivateDnsName': 'string',
'SourceDestCheck': True|False,
'Groups': [
{
'GroupName': 'string',
'GroupId': 'string'
},
],
'Attachment': {
'AttachmentId': 'string',
'InstanceId': 'string',
'InstanceOwnerId': 'string',
'DeviceIndex': 123,
'Status': 'attaching'|'attached'|'detaching'|'detached',
'AttachTime': datetime(2015, 1, 1),
'DeleteOnTermination': True|False
},
'Association': {
'PublicIp': 'string',
'PublicDnsName': 'string',
'IpOwnerId': 'string',
'AllocationId': 'string',
'AssociationId': 'string'
},
'TagSet': [
{
'Key': 'string',
'Value': 'string'
},
],
'PrivateIpAddresses': [
{
'PrivateIpAddress': 'string',
'PrivateDnsName': 'string',
'Primary': True|False,
'Association': {
'PublicIp': 'string',
'PublicDnsName': 'string',
'IpOwnerId': 'string',
'AllocationId': 'string',
'AssociationId': 'string'
}
},
],
'Ipv6Addresses': [
{
'Ipv6Address': 'string'
},
],
'InterfaceType': 'interface'|'natGateway'
}
}
"""
pass | Creates a network interface in the specified subnet.
For more information about network interfaces, see Elastic Network Interfaces in the Amazon Virtual Private Cloud User Guide .
See also: AWS API Documentation
Examples
This example creates a network interface for the specified subnet.
Expected Output:
:example: response = client.create_network_interface(
SubnetId='string',
Description='string',
PrivateIpAddress='string',
Groups=[
'string',
],
PrivateIpAddresses=[
{
'PrivateIpAddress': 'string',
'Primary': True|False
},
],
SecondaryPrivateIpAddressCount=123,
Ipv6Addresses=[
{
'Ipv6Address': 'string'
},
],
Ipv6AddressCount=123,
DryRun=True|False
)
:type SubnetId: string
:param SubnetId: [REQUIRED]
The ID of the subnet to associate with the network interface.
:type Description: string
:param Description: A description for the network interface.
:type PrivateIpAddress: string
:param PrivateIpAddress: The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in privateIpAddresses as primary (only one IP address can be designated as primary).
:type Groups: list
:param Groups: The IDs of one or more security groups.
(string) --
:type PrivateIpAddresses: list
:param PrivateIpAddresses: One or more private IPv4 addresses.
(dict) --Describes a secondary private IPv4 address for a network interface.
PrivateIpAddress (string) -- [REQUIRED]The private IPv4 addresses.
Primary (boolean) --Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.
:type SecondaryPrivateIpAddressCount: integer
:param SecondaryPrivateIpAddressCount: The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using privateIpAddresses .
The number of IP addresses you can assign to a network interface varies by instance type. For more information, see IP Addresses Per ENI Per Instance Type in the Amazon Virtual Private Cloud User Guide .
:type Ipv6Addresses: list
:param Ipv6Addresses: One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.
(dict) --Describes an IPv6 address.
Ipv6Address (string) --The IPv6 address.
:type Ipv6AddressCount: integer
:param Ipv6AddressCount: The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses. If your subnet has the AssignIpv6AddressOnCreation attribute set to true , you can specify 0 to override this setting.
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:rtype: dict
:return: {
'NetworkInterface': {
'NetworkInterfaceId': 'string',
'SubnetId': 'string',
'VpcId': 'string',
'AvailabilityZone': 'string',
'Description': 'string',
'OwnerId': 'string',
'RequesterId': 'string',
'RequesterManaged': True|False,
'Status': 'available'|'attaching'|'in-use'|'detaching',
'MacAddress': 'string',
'PrivateIpAddress': 'string',
'PrivateDnsName': 'string',
'SourceDestCheck': True|False,
'Groups': [
{
'GroupName': 'string',
'GroupId': 'string'
},
],
'Attachment': {
'AttachmentId': 'string',
'InstanceId': 'string',
'InstanceOwnerId': 'string',
'DeviceIndex': 123,
'Status': 'attaching'|'attached'|'detaching'|'detached',
'AttachTime': datetime(2015, 1, 1),
'DeleteOnTermination': True|False
},
'Association': {
'PublicIp': 'string',
'PublicDnsName': 'string',
'IpOwnerId': 'string',
'AllocationId': 'string',
'AssociationId': 'string'
},
'TagSet': [
{
'Key': 'string',
'Value': 'string'
},
],
'PrivateIpAddresses': [
{
'PrivateIpAddress': 'string',
'PrivateDnsName': 'string',
'Primary': True|False,
'Association': {
'PublicIp': 'string',
'PublicDnsName': 'string',
'IpOwnerId': 'string',
'AllocationId': 'string',
'AssociationId': 'string'
}
},
],
'Ipv6Addresses': [
{
'Ipv6Address': 'string'
},
],
'InterfaceType': 'interface'|'natGateway'
}
} | entailment |
def create_volume(DryRun=None, Size=None, SnapshotId=None, AvailabilityZone=None, VolumeType=None, Iops=None, Encrypted=None, KmsKeyId=None, TagSpecifications=None):
"""
Creates an EBS volume that can be attached to an instance in the same Availability Zone. The volume is created in the regional endpoint that you send the HTTP request to. For more information see Regions and Endpoints .
You can create a new empty volume or restore a volume from an EBS snapshot. Any AWS Marketplace product codes from the snapshot are propagated to the volume.
You can create encrypted volumes with the Encrypted parameter. Encrypted volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are also automatically encrypted. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide .
You can tag your volumes during creation. For more information, see Tagging Your Amazon EC2 Resources .
For more information, see Creating an Amazon EBS Volume in the Amazon Elastic Compute Cloud User Guide .
See also: AWS API Documentation
Examples
This example creates an 80 GiB General Purpose (SSD) volume in the Availability Zone us-east-1a.
Expected Output:
This example creates a new Provisioned IOPS (SSD) volume with 1000 provisioned IOPS from a snapshot in the Availability Zone us-east-1a.
Expected Output:
:example: response = client.create_volume(
DryRun=True|False,
Size=123,
SnapshotId='string',
AvailabilityZone='string',
VolumeType='standard'|'io1'|'gp2'|'sc1'|'st1',
Iops=123,
Encrypted=True|False,
KmsKeyId='string',
TagSpecifications=[
{
'ResourceType': 'customer-gateway'|'dhcp-options'|'image'|'instance'|'internet-gateway'|'network-acl'|'network-interface'|'reserved-instances'|'route-table'|'snapshot'|'spot-instances-request'|'subnet'|'security-group'|'volume'|'vpc'|'vpn-connection'|'vpn-gateway',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
},
]
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type Size: integer
:param Size: The size of the volume, in GiBs.
Constraints: 1-16384 for gp2 , 4-16384 for io1 , 500-16384 for st1 , 500-16384 for sc1 , and 1-1024 for standard . If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.
Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
:type SnapshotId: string
:param SnapshotId: The snapshot from which to create the volume.
:type AvailabilityZone: string
:param AvailabilityZone: [REQUIRED]
The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.
:type VolumeType: string
:param VolumeType: The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic volumes.
Default: standard
:type Iops: integer
:param Iops: Only valid for Provisioned IOPS SSD volumes. The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 50 IOPS/GiB.
Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes
:type Encrypted: boolean
:param Encrypted: Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide .
:type KmsKeyId: string
:param KmsKeyId: The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1 :012345678910 :key/abcd1234-a123-456a-a12b-a123b4cd56ef . If a KmsKeyId is specified, the Encrypted flag must also be set.
:type TagSpecifications: list
:param TagSpecifications: The tags to apply to the volume during creation.
(dict) --The tags to apply to a resource when the resource is being created.
ResourceType (string) --The type of resource to tag. Currently, the resource types that support tagging on creation are instance and volume .
Tags (list) --The tags to apply to the resource.
(dict) --Describes a tag.
Key (string) --The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:
Value (string) --The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
:rtype: dict
:return: {
'VolumeId': 'string',
'Size': 123,
'SnapshotId': 'string',
'AvailabilityZone': 'string',
'State': 'creating'|'available'|'in-use'|'deleting'|'deleted'|'error',
'CreateTime': datetime(2015, 1, 1),
'Attachments': [
{
'VolumeId': 'string',
'InstanceId': 'string',
'Device': 'string',
'State': 'attaching'|'attached'|'detaching'|'detached',
'AttachTime': datetime(2015, 1, 1),
'DeleteOnTermination': True|False
},
],
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
'Iops': 123,
'Encrypted': True|False,
'KmsKeyId': 'string'
}
"""
pass | Creates an EBS volume that can be attached to an instance in the same Availability Zone. The volume is created in the regional endpoint that you send the HTTP request to. For more information see Regions and Endpoints .
You can create a new empty volume or restore a volume from an EBS snapshot. Any AWS Marketplace product codes from the snapshot are propagated to the volume.
You can create encrypted volumes with the Encrypted parameter. Encrypted volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are also automatically encrypted. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide .
You can tag your volumes during creation. For more information, see Tagging Your Amazon EC2 Resources .
For more information, see Creating an Amazon EBS Volume in the Amazon Elastic Compute Cloud User Guide .
See also: AWS API Documentation
Examples
This example creates an 80 GiB General Purpose (SSD) volume in the Availability Zone us-east-1a.
Expected Output:
This example creates a new Provisioned IOPS (SSD) volume with 1000 provisioned IOPS from a snapshot in the Availability Zone us-east-1a.
Expected Output:
:example: response = client.create_volume(
DryRun=True|False,
Size=123,
SnapshotId='string',
AvailabilityZone='string',
VolumeType='standard'|'io1'|'gp2'|'sc1'|'st1',
Iops=123,
Encrypted=True|False,
KmsKeyId='string',
TagSpecifications=[
{
'ResourceType': 'customer-gateway'|'dhcp-options'|'image'|'instance'|'internet-gateway'|'network-acl'|'network-interface'|'reserved-instances'|'route-table'|'snapshot'|'spot-instances-request'|'subnet'|'security-group'|'volume'|'vpc'|'vpn-connection'|'vpn-gateway',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
},
]
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type Size: integer
:param Size: The size of the volume, in GiBs.
Constraints: 1-16384 for gp2 , 4-16384 for io1 , 500-16384 for st1 , 500-16384 for sc1 , and 1-1024 for standard . If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.
Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
:type SnapshotId: string
:param SnapshotId: The snapshot from which to create the volume.
:type AvailabilityZone: string
:param AvailabilityZone: [REQUIRED]
The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.
:type VolumeType: string
:param VolumeType: The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic volumes.
Default: standard
:type Iops: integer
:param Iops: Only valid for Provisioned IOPS SSD volumes. The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 50 IOPS/GiB.
Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes
:type Encrypted: boolean
:param Encrypted: Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide .
:type KmsKeyId: string
:param KmsKeyId: The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, the key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1 :012345678910 :key/abcd1234-a123-456a-a12b-a123b4cd56ef . If a KmsKeyId is specified, the Encrypted flag must also be set.
:type TagSpecifications: list
:param TagSpecifications: The tags to apply to the volume during creation.
(dict) --The tags to apply to a resource when the resource is being created.
ResourceType (string) --The type of resource to tag. Currently, the resource types that support tagging on creation are instance and volume .
Tags (list) --The tags to apply to the resource.
(dict) --Describes a tag.
Key (string) --The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:
Value (string) --The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
:rtype: dict
:return: {
'VolumeId': 'string',
'Size': 123,
'SnapshotId': 'string',
'AvailabilityZone': 'string',
'State': 'creating'|'available'|'in-use'|'deleting'|'deleted'|'error',
'CreateTime': datetime(2015, 1, 1),
'Attachments': [
{
'VolumeId': 'string',
'InstanceId': 'string',
'Device': 'string',
'State': 'attaching'|'attached'|'detaching'|'detached',
'AttachTime': datetime(2015, 1, 1),
'DeleteOnTermination': True|False
},
],
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
'Iops': 123,
'Encrypted': True|False,
'KmsKeyId': 'string'
} | entailment |
def describe_reserved_instances_offerings(DryRun=None, ReservedInstancesOfferingIds=None, InstanceType=None, AvailabilityZone=None, ProductDescription=None, Filters=None, InstanceTenancy=None, OfferingType=None, NextToken=None, MaxResults=None, IncludeMarketplace=None, MinDuration=None, MaxDuration=None, MaxInstanceCount=None, OfferingClass=None):
"""
Describes Reserved Instance offerings that are available for purchase. With Reserved Instances, you purchase the right to launch instances for a period of time. During that time period, you do not receive insufficient capacity errors, and you pay a lower usage rate than the rate charged for On-Demand instances for the actual time used.
If you have listed your own Reserved Instances for sale in the Reserved Instance Marketplace, they will be excluded from these results. This is to ensure that you do not purchase your own Reserved Instances.
For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide .
See also: AWS API Documentation
:example: response = client.describe_reserved_instances_offerings(
DryRun=True|False,
ReservedInstancesOfferingIds=[
'string',
],
InstanceType='t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
AvailabilityZone='string',
ProductDescription='Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
InstanceTenancy='default'|'dedicated'|'host',
OfferingType='Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
NextToken='string',
MaxResults=123,
IncludeMarketplace=True|False,
MinDuration=123,
MaxDuration=123,
MaxInstanceCount=123,
OfferingClass='standard'|'convertible'
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type ReservedInstancesOfferingIds: list
:param ReservedInstancesOfferingIds: One or more Reserved Instances offering IDs.
(string) --
:type InstanceType: string
:param InstanceType: The instance type that the reservation will cover (for example, m1.small ). For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide .
:type AvailabilityZone: string
:param AvailabilityZone: The Availability Zone in which the Reserved Instance can be used.
:type ProductDescription: string
:param ProductDescription: The Reserved Instance product platform description. Instances that include (Amazon VPC) in the description are for use with Amazon VPC.
:type Filters: list
:param Filters: One or more filters.
availability-zone - The Availability Zone where the Reserved Instance can be used.
duration - The duration of the Reserved Instance (for example, one year or three years), in seconds (31536000 | 94608000 ).
fixed-price - The purchase price of the Reserved Instance (for example, 9800.0).
instance-type - The instance type that is covered by the reservation.
marketplace - Set to true to show only Reserved Instance Marketplace offerings. When this filter is not used, which is the default behavior, all offerings from both AWS and the Reserved Instance Marketplace are listed.
product-description - The Reserved Instance product platform description. Instances that include (Amazon VPC) in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC. (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) | Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows with SQL Server Enterprise (Amazon VPC) )
reserved-instances-offering-id - The Reserved Instances offering ID.
scope - The scope of the Reserved Instance (Availability Zone or Region ).
usage-price - The usage price of the Reserved Instance, per hour (for example, 0.84).
(dict) --A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.
Name (string) --The name of the filter. Filter names are case-sensitive.
Values (list) --One or more filter values. Filter values are case-sensitive.
(string) --
:type InstanceTenancy: string
:param InstanceTenancy: The tenancy of the instances covered by the reservation. A Reserved Instance with a tenancy of dedicated is applied to instances that run in a VPC on single-tenant hardware (i.e., Dedicated Instances).
Important: The host value cannot be used with this parameter. Use the default or dedicated values only.
Default: default
:type OfferingType: string
:param OfferingType: The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the Medium Utilization Reserved Instance offering type.
:type NextToken: string
:param NextToken: The token to retrieve the next page of results.
:type MaxResults: integer
:param MaxResults: The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. The maximum is 100.
Default: 100
:type IncludeMarketplace: boolean
:param IncludeMarketplace: Include Reserved Instance Marketplace offerings in the response.
:type MinDuration: integer
:param MinDuration: The minimum duration (in seconds) to filter when searching for offerings.
Default: 2592000 (1 month)
:type MaxDuration: integer
:param MaxDuration: The maximum duration (in seconds) to filter when searching for offerings.
Default: 94608000 (3 years)
:type MaxInstanceCount: integer
:param MaxInstanceCount: The maximum number of instances to filter when searching for offerings.
Default: 20
:type OfferingClass: string
:param OfferingClass: The offering class of the Reserved Instance. Can be standard or convertible .
:rtype: dict
:return: {
'ReservedInstancesOfferings': [
{
'ReservedInstancesOfferingId': 'string',
'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
'AvailabilityZone': 'string',
'Duration': 123,
'UsagePrice': ...,
'FixedPrice': ...,
'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
'InstanceTenancy': 'default'|'dedicated'|'host',
'CurrencyCode': 'USD',
'OfferingType': 'Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
'RecurringCharges': [
{
'Frequency': 'Hourly',
'Amount': 123.0
},
],
'Marketplace': True|False,
'PricingDetails': [
{
'Price': 123.0,
'Count': 123
},
],
'OfferingClass': 'standard'|'convertible',
'Scope': 'Availability Zone'|'Region'
},
],
'NextToken': 'string'
}
"""
pass | Describes Reserved Instance offerings that are available for purchase. With Reserved Instances, you purchase the right to launch instances for a period of time. During that time period, you do not receive insufficient capacity errors, and you pay a lower usage rate than the rate charged for On-Demand instances for the actual time used.
If you have listed your own Reserved Instances for sale in the Reserved Instance Marketplace, they will be excluded from these results. This is to ensure that you do not purchase your own Reserved Instances.
For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide .
See also: AWS API Documentation
:example: response = client.describe_reserved_instances_offerings(
DryRun=True|False,
ReservedInstancesOfferingIds=[
'string',
],
InstanceType='t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
AvailabilityZone='string',
ProductDescription='Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
InstanceTenancy='default'|'dedicated'|'host',
OfferingType='Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
NextToken='string',
MaxResults=123,
IncludeMarketplace=True|False,
MinDuration=123,
MaxDuration=123,
MaxInstanceCount=123,
OfferingClass='standard'|'convertible'
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type ReservedInstancesOfferingIds: list
:param ReservedInstancesOfferingIds: One or more Reserved Instances offering IDs.
(string) --
:type InstanceType: string
:param InstanceType: The instance type that the reservation will cover (for example, m1.small ). For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide .
:type AvailabilityZone: string
:param AvailabilityZone: The Availability Zone in which the Reserved Instance can be used.
:type ProductDescription: string
:param ProductDescription: The Reserved Instance product platform description. Instances that include (Amazon VPC) in the description are for use with Amazon VPC.
:type Filters: list
:param Filters: One or more filters.
availability-zone - The Availability Zone where the Reserved Instance can be used.
duration - The duration of the Reserved Instance (for example, one year or three years), in seconds (31536000 | 94608000 ).
fixed-price - The purchase price of the Reserved Instance (for example, 9800.0).
instance-type - The instance type that is covered by the reservation.
marketplace - Set to true to show only Reserved Instance Marketplace offerings. When this filter is not used, which is the default behavior, all offerings from both AWS and the Reserved Instance Marketplace are listed.
product-description - The Reserved Instance product platform description. Instances that include (Amazon VPC) in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC. (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) | Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows with SQL Server Enterprise (Amazon VPC) )
reserved-instances-offering-id - The Reserved Instances offering ID.
scope - The scope of the Reserved Instance (Availability Zone or Region ).
usage-price - The usage price of the Reserved Instance, per hour (for example, 0.84).
(dict) --A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.
Name (string) --The name of the filter. Filter names are case-sensitive.
Values (list) --One or more filter values. Filter values are case-sensitive.
(string) --
:type InstanceTenancy: string
:param InstanceTenancy: The tenancy of the instances covered by the reservation. A Reserved Instance with a tenancy of dedicated is applied to instances that run in a VPC on single-tenant hardware (i.e., Dedicated Instances).
Important: The host value cannot be used with this parameter. Use the default or dedicated values only.
Default: default
:type OfferingType: string
:param OfferingType: The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the Medium Utilization Reserved Instance offering type.
:type NextToken: string
:param NextToken: The token to retrieve the next page of results.
:type MaxResults: integer
:param MaxResults: The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. The maximum is 100.
Default: 100
:type IncludeMarketplace: boolean
:param IncludeMarketplace: Include Reserved Instance Marketplace offerings in the response.
:type MinDuration: integer
:param MinDuration: The minimum duration (in seconds) to filter when searching for offerings.
Default: 2592000 (1 month)
:type MaxDuration: integer
:param MaxDuration: The maximum duration (in seconds) to filter when searching for offerings.
Default: 94608000 (3 years)
:type MaxInstanceCount: integer
:param MaxInstanceCount: The maximum number of instances to filter when searching for offerings.
Default: 20
:type OfferingClass: string
:param OfferingClass: The offering class of the Reserved Instance. Can be standard or convertible .
:rtype: dict
:return: {
'ReservedInstancesOfferings': [
{
'ReservedInstancesOfferingId': 'string',
'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
'AvailabilityZone': 'string',
'Duration': 123,
'UsagePrice': ...,
'FixedPrice': ...,
'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
'InstanceTenancy': 'default'|'dedicated'|'host',
'CurrencyCode': 'USD',
'OfferingType': 'Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
'RecurringCharges': [
{
'Frequency': 'Hourly',
'Amount': 123.0
},
],
'Marketplace': True|False,
'PricingDetails': [
{
'Price': 123.0,
'Count': 123
},
],
'OfferingClass': 'standard'|'convertible',
'Scope': 'Availability Zone'|'Region'
},
],
'NextToken': 'string'
} | entailment |
def describe_spot_price_history(DryRun=None, StartTime=None, EndTime=None, InstanceTypes=None, ProductDescriptions=None, Filters=None, AvailabilityZone=None, MaxResults=None, NextToken=None):
"""
Describes the Spot price history. For more information, see Spot Instance Pricing History in the Amazon Elastic Compute Cloud User Guide .
When you specify a start and end time, this operation returns the prices of the instance types within the time range that you specified and the time when the price changed. The price is valid within the time period that you specified; the response merely indicates the last time that the price changed.
See also: AWS API Documentation
Examples
This example returns the Spot Price history for m1.xlarge, Linux/UNIX (Amazon VPC) instances for a particular day in January.
Expected Output:
:example: response = client.describe_spot_price_history(
DryRun=True|False,
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
InstanceTypes=[
't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
],
ProductDescriptions=[
'string',
],
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
AvailabilityZone='string',
MaxResults=123,
NextToken='string'
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type StartTime: datetime
:param StartTime: The date and time, up to the past 90 days, from which to start retrieving the price history data, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).
:type EndTime: datetime
:param EndTime: The date and time, up to the current date, from which to stop retrieving the price history data, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).
:type InstanceTypes: list
:param InstanceTypes: Filters the results by the specified instance types. Note that T2 and HS1 instance types are not supported.
(string) --
:type ProductDescriptions: list
:param ProductDescriptions: Filters the results by the specified basic product descriptions.
(string) --
:type Filters: list
:param Filters: One or more filters.
availability-zone - The Availability Zone for which prices should be returned.
instance-type - The type of instance (for example, m3.medium ).
product-description - The product description for the Spot price (Linux/UNIX | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC) ).
spot-price - The Spot price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported).
timestamp - The timestamp of the Spot price history, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z). You can use wildcards (* and ?). Greater than or less than comparison is not supported.
(dict) --A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.
Name (string) --The name of the filter. Filter names are case-sensitive.
Values (list) --One or more filter values. Filter values are case-sensitive.
(string) --
:type AvailabilityZone: string
:param AvailabilityZone: Filters the results by the specified Availability Zone.
:type MaxResults: integer
:param MaxResults: The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.
:type NextToken: string
:param NextToken: The token for the next set of results.
:rtype: dict
:return: {
'SpotPriceHistory': [
{
'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
'SpotPrice': 'string',
'Timestamp': datetime(2015, 1, 1),
'AvailabilityZone': 'string'
},
],
'NextToken': 'string'
}
"""
pass | Describes the Spot price history. For more information, see Spot Instance Pricing History in the Amazon Elastic Compute Cloud User Guide .
When you specify a start and end time, this operation returns the prices of the instance types within the time range that you specified and the time when the price changed. The price is valid within the time period that you specified; the response merely indicates the last time that the price changed.
See also: AWS API Documentation
Examples
This example returns the Spot Price history for m1.xlarge, Linux/UNIX (Amazon VPC) instances for a particular day in January.
Expected Output:
:example: response = client.describe_spot_price_history(
DryRun=True|False,
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
InstanceTypes=[
't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
],
ProductDescriptions=[
'string',
],
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
AvailabilityZone='string',
MaxResults=123,
NextToken='string'
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type StartTime: datetime
:param StartTime: The date and time, up to the past 90 days, from which to start retrieving the price history data, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).
:type EndTime: datetime
:param EndTime: The date and time, up to the current date, from which to stop retrieving the price history data, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).
:type InstanceTypes: list
:param InstanceTypes: Filters the results by the specified instance types. Note that T2 and HS1 instance types are not supported.
(string) --
:type ProductDescriptions: list
:param ProductDescriptions: Filters the results by the specified basic product descriptions.
(string) --
:type Filters: list
:param Filters: One or more filters.
availability-zone - The Availability Zone for which prices should be returned.
instance-type - The type of instance (for example, m3.medium ).
product-description - The product description for the Spot price (Linux/UNIX | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC) ).
spot-price - The Spot price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported).
timestamp - The timestamp of the Spot price history, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z). You can use wildcards (* and ?). Greater than or less than comparison is not supported.
(dict) --A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.
Name (string) --The name of the filter. Filter names are case-sensitive.
Values (list) --One or more filter values. Filter values are case-sensitive.
(string) --
:type AvailabilityZone: string
:param AvailabilityZone: Filters the results by the specified Availability Zone.
:type MaxResults: integer
:param MaxResults: The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.
:type NextToken: string
:param NextToken: The token for the next set of results.
:rtype: dict
:return: {
'SpotPriceHistory': [
{
'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
'SpotPrice': 'string',
'Timestamp': datetime(2015, 1, 1),
'AvailabilityZone': 'string'
},
],
'NextToken': 'string'
} | entailment |
def import_image(DryRun=None, Description=None, DiskContainers=None, LicenseType=None, Hypervisor=None, Architecture=None, Platform=None, ClientData=None, ClientToken=None, RoleName=None):
"""
Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI). For more information, see Importing a VM as an Image Using VM Import/Export in the VM Import/Export User Guide .
See also: AWS API Documentation
:example: response = client.import_image(
DryRun=True|False,
Description='string',
DiskContainers=[
{
'Description': 'string',
'Format': 'string',
'Url': 'string',
'UserBucket': {
'S3Bucket': 'string',
'S3Key': 'string'
},
'DeviceName': 'string',
'SnapshotId': 'string'
},
],
LicenseType='string',
Hypervisor='string',
Architecture='string',
Platform='string',
ClientData={
'UploadStart': datetime(2015, 1, 1),
'UploadEnd': datetime(2015, 1, 1),
'UploadSize': 123.0,
'Comment': 'string'
},
ClientToken='string',
RoleName='string'
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type Description: string
:param Description: A description string for the import image task.
:type DiskContainers: list
:param DiskContainers: Information about the disk containers.
(dict) --Describes the disk container object for an import image task.
Description (string) --The description of the disk image.
Format (string) --The format of the disk image being imported.
Valid values: RAW | VHD | VMDK | OVA
Url (string) --The URL to the Amazon S3-based disk image being imported. The URL can either be a https URL (https://..) or an Amazon S3 URL (s3://..)
UserBucket (dict) --The S3 bucket for the disk image.
S3Bucket (string) --The name of the S3 bucket where the disk image is located.
S3Key (string) --The file name of the disk image.
DeviceName (string) --The block device mapping for the disk.
SnapshotId (string) --The ID of the EBS snapshot to be used for importing the snapshot.
:type LicenseType: string
:param LicenseType: The license type to be used for the Amazon Machine Image (AMI) after importing.
Note: You may only use BYOL if you have existing licenses with rights to use these licenses in a third party cloud like AWS. For more information, see Prerequisites in the VM Import/Export User Guide.
Valid values: AWS | BYOL
:type Hypervisor: string
:param Hypervisor: The target hypervisor platform.
Valid values: xen
:type Architecture: string
:param Architecture: The architecture of the virtual machine.
Valid values: i386 | x86_64
:type Platform: string
:param Platform: The operating system of the virtual machine.
Valid values: Windows | Linux
:type ClientData: dict
:param ClientData: The client-specific data.
UploadStart (datetime) --The time that the disk upload starts.
UploadEnd (datetime) --The time that the disk upload ends.
UploadSize (float) --The size of the uploaded disk image, in GiB.
Comment (string) --A user-defined comment about the disk upload.
:type ClientToken: string
:param ClientToken: The token to enable idempotency for VM import requests.
:type RoleName: string
:param RoleName: The name of the role to use when not using the default role, 'vmimport'.
:rtype: dict
:return: {
'ImportTaskId': 'string',
'Architecture': 'string',
'LicenseType': 'string',
'Platform': 'string',
'Hypervisor': 'string',
'Description': 'string',
'SnapshotDetails': [
{
'DiskImageSize': 123.0,
'Description': 'string',
'Format': 'string',
'Url': 'string',
'UserBucket': {
'S3Bucket': 'string',
'S3Key': 'string'
},
'DeviceName': 'string',
'SnapshotId': 'string',
'Progress': 'string',
'StatusMessage': 'string',
'Status': 'string'
},
],
'ImageId': 'string',
'Progress': 'string',
'StatusMessage': 'string',
'Status': 'string'
}
"""
pass | Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI). For more information, see Importing a VM as an Image Using VM Import/Export in the VM Import/Export User Guide .
See also: AWS API Documentation
:example: response = client.import_image(
DryRun=True|False,
Description='string',
DiskContainers=[
{
'Description': 'string',
'Format': 'string',
'Url': 'string',
'UserBucket': {
'S3Bucket': 'string',
'S3Key': 'string'
},
'DeviceName': 'string',
'SnapshotId': 'string'
},
],
LicenseType='string',
Hypervisor='string',
Architecture='string',
Platform='string',
ClientData={
'UploadStart': datetime(2015, 1, 1),
'UploadEnd': datetime(2015, 1, 1),
'UploadSize': 123.0,
'Comment': 'string'
},
ClientToken='string',
RoleName='string'
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type Description: string
:param Description: A description string for the import image task.
:type DiskContainers: list
:param DiskContainers: Information about the disk containers.
(dict) --Describes the disk container object for an import image task.
Description (string) --The description of the disk image.
Format (string) --The format of the disk image being imported.
Valid values: RAW | VHD | VMDK | OVA
Url (string) --The URL to the Amazon S3-based disk image being imported. The URL can either be a https URL (https://..) or an Amazon S3 URL (s3://..)
UserBucket (dict) --The S3 bucket for the disk image.
S3Bucket (string) --The name of the S3 bucket where the disk image is located.
S3Key (string) --The file name of the disk image.
DeviceName (string) --The block device mapping for the disk.
SnapshotId (string) --The ID of the EBS snapshot to be used for importing the snapshot.
:type LicenseType: string
:param LicenseType: The license type to be used for the Amazon Machine Image (AMI) after importing.
Note: You may only use BYOL if you have existing licenses with rights to use these licenses in a third party cloud like AWS. For more information, see Prerequisites in the VM Import/Export User Guide.
Valid values: AWS | BYOL
:type Hypervisor: string
:param Hypervisor: The target hypervisor platform.
Valid values: xen
:type Architecture: string
:param Architecture: The architecture of the virtual machine.
Valid values: i386 | x86_64
:type Platform: string
:param Platform: The operating system of the virtual machine.
Valid values: Windows | Linux
:type ClientData: dict
:param ClientData: The client-specific data.
UploadStart (datetime) --The time that the disk upload starts.
UploadEnd (datetime) --The time that the disk upload ends.
UploadSize (float) --The size of the uploaded disk image, in GiB.
Comment (string) --A user-defined comment about the disk upload.
:type ClientToken: string
:param ClientToken: The token to enable idempotency for VM import requests.
:type RoleName: string
:param RoleName: The name of the role to use when not using the default role, 'vmimport'.
:rtype: dict
:return: {
'ImportTaskId': 'string',
'Architecture': 'string',
'LicenseType': 'string',
'Platform': 'string',
'Hypervisor': 'string',
'Description': 'string',
'SnapshotDetails': [
{
'DiskImageSize': 123.0,
'Description': 'string',
'Format': 'string',
'Url': 'string',
'UserBucket': {
'S3Bucket': 'string',
'S3Key': 'string'
},
'DeviceName': 'string',
'SnapshotId': 'string',
'Progress': 'string',
'StatusMessage': 'string',
'Status': 'string'
},
],
'ImageId': 'string',
'Progress': 'string',
'StatusMessage': 'string',
'Status': 'string'
} | entailment |
def modify_image_attribute(DryRun=None, ImageId=None, Attribute=None, OperationType=None, UserIds=None, UserGroups=None, ProductCodes=None, Value=None, LaunchPermission=None, Description=None):
"""
Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.
See also: AWS API Documentation
:example: response = client.modify_image_attribute(
DryRun=True|False,
ImageId='string',
Attribute='string',
OperationType='add'|'remove',
UserIds=[
'string',
],
UserGroups=[
'string',
],
ProductCodes=[
'string',
],
Value='string',
LaunchPermission={
'Add': [
{
'UserId': 'string',
'Group': 'all'
},
],
'Remove': [
{
'UserId': 'string',
'Group': 'all'
},
]
},
Description={
'Value': 'string'
}
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type ImageId: string
:param ImageId: [REQUIRED]
The ID of the AMI.
:type Attribute: string
:param Attribute: The name of the attribute to modify.
:type OperationType: string
:param OperationType: The operation type.
:type UserIds: list
:param UserIds: One or more AWS account IDs. This is only valid when modifying the launchPermission attribute.
(string) --
:type UserGroups: list
:param UserGroups: One or more user groups. This is only valid when modifying the launchPermission attribute.
(string) --
:type ProductCodes: list
:param ProductCodes: One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the productCodes attribute.
(string) --
:type Value: string
:param Value: The value of the attribute being modified. This is only valid when modifying the description attribute.
:type LaunchPermission: dict
:param LaunchPermission: A launch permission modification.
Add (list) --The AWS account ID to add to the list of launch permissions for the AMI.
(dict) --Describes a launch permission.
UserId (string) --The AWS account ID.
Group (string) --The name of the group.
Remove (list) --The AWS account ID to remove from the list of launch permissions for the AMI.
(dict) --Describes a launch permission.
UserId (string) --The AWS account ID.
Group (string) --The name of the group.
:type Description: dict
:param Description: A description for the AMI.
Value (string) --The attribute value. Note that the value is case-sensitive.
"""
pass | Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.
See also: AWS API Documentation
:example: response = client.modify_image_attribute(
DryRun=True|False,
ImageId='string',
Attribute='string',
OperationType='add'|'remove',
UserIds=[
'string',
],
UserGroups=[
'string',
],
ProductCodes=[
'string',
],
Value='string',
LaunchPermission={
'Add': [
{
'UserId': 'string',
'Group': 'all'
},
],
'Remove': [
{
'UserId': 'string',
'Group': 'all'
},
]
},
Description={
'Value': 'string'
}
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type ImageId: string
:param ImageId: [REQUIRED]
The ID of the AMI.
:type Attribute: string
:param Attribute: The name of the attribute to modify.
:type OperationType: string
:param OperationType: The operation type.
:type UserIds: list
:param UserIds: One or more AWS account IDs. This is only valid when modifying the launchPermission attribute.
(string) --
:type UserGroups: list
:param UserGroups: One or more user groups. This is only valid when modifying the launchPermission attribute.
(string) --
:type ProductCodes: list
:param ProductCodes: One or more product codes. After you add a product code to an AMI, it can't be removed. This is only valid when modifying the productCodes attribute.
(string) --
:type Value: string
:param Value: The value of the attribute being modified. This is only valid when modifying the description attribute.
:type LaunchPermission: dict
:param LaunchPermission: A launch permission modification.
Add (list) --The AWS account ID to add to the list of launch permissions for the AMI.
(dict) --Describes a launch permission.
UserId (string) --The AWS account ID.
Group (string) --The name of the group.
Remove (list) --The AWS account ID to remove from the list of launch permissions for the AMI.
(dict) --Describes a launch permission.
UserId (string) --The AWS account ID.
Group (string) --The name of the group.
:type Description: dict
:param Description: A description for the AMI.
Value (string) --The attribute value. Note that the value is case-sensitive. | entailment |
def modify_instance_attribute(DryRun=None, InstanceId=None, Attribute=None, Value=None, BlockDeviceMappings=None, SourceDestCheck=None, DisableApiTermination=None, InstanceType=None, Kernel=None, Ramdisk=None, UserData=None, InstanceInitiatedShutdownBehavior=None, Groups=None, EbsOptimized=None, SriovNetSupport=None, EnaSupport=None):
"""
Modifies the specified attribute of the specified instance. You can specify only one attribute at a time.
To modify some attributes, the instance must be stopped. For more information, see Modifying Attributes of a Stopped Instance in the Amazon Elastic Compute Cloud User Guide .
See also: AWS API Documentation
:example: response = client.modify_instance_attribute(
DryRun=True|False,
InstanceId='string',
Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport',
Value='string',
BlockDeviceMappings=[
{
'DeviceName': 'string',
'Ebs': {
'VolumeId': 'string',
'DeleteOnTermination': True|False
},
'VirtualName': 'string',
'NoDevice': 'string'
},
],
SourceDestCheck={
'Value': True|False
},
DisableApiTermination={
'Value': True|False
},
InstanceType={
'Value': 'string'
},
Kernel={
'Value': 'string'
},
Ramdisk={
'Value': 'string'
},
UserData={
'Value': b'bytes'
},
InstanceInitiatedShutdownBehavior={
'Value': 'string'
},
Groups=[
'string',
],
EbsOptimized={
'Value': True|False
},
SriovNetSupport={
'Value': 'string'
},
EnaSupport={
'Value': True|False
}
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type InstanceId: string
:param InstanceId: [REQUIRED]
The ID of the instance.
:type Attribute: string
:param Attribute: The name of the attribute.
:type Value: string
:param Value: A new value for the attribute. Use only with the kernel , ramdisk , userData , disableApiTermination , or instanceInitiatedShutdownBehavior attribute.
:type BlockDeviceMappings: list
:param BlockDeviceMappings: Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination , the default is true and the volume is deleted when the instance is terminated.
To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide .
(dict) --Describes a block device mapping entry.
DeviceName (string) --The device name exposed to the instance (for example, /dev/sdh or xvdh ).
Ebs (dict) --Parameters used to automatically set up EBS volumes when the instance is launched.
VolumeId (string) --The ID of the EBS volume.
DeleteOnTermination (boolean) --Indicates whether the volume is deleted on instance termination.
VirtualName (string) --The virtual device name.
NoDevice (string) --suppress the specified device included in the block device mapping.
:type SourceDestCheck: dict
:param SourceDestCheck: Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.
Value (boolean) --The attribute value. The valid values are true or false .
:type DisableApiTermination: dict
:param DisableApiTermination: If the value is true , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.
Value (boolean) --The attribute value. The valid values are true or false .
:type InstanceType: dict
:param InstanceType: Changes the instance type to the specified value. For more information, see Instance Types . If the instance type is not valid, the error returned is InvalidInstanceAttributeValue .
Value (string) --The attribute value. Note that the value is case-sensitive.
:type Kernel: dict
:param Kernel: Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB .
Value (string) --The attribute value. Note that the value is case-sensitive.
:type Ramdisk: dict
:param Ramdisk: Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB .
Value (string) --The attribute value. Note that the value is case-sensitive.
:type UserData: dict
:param UserData: Changes the instance's user data to the specified value. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.
Value (bytes) --
:type InstanceInitiatedShutdownBehavior: dict
:param InstanceInitiatedShutdownBehavior: Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Value (string) --The attribute value. Note that the value is case-sensitive.
:type Groups: list
:param Groups: [EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.
(string) --
:type EbsOptimized: dict
:param EbsOptimized: Specifies whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
Value (boolean) --The attribute value. The valid values are true or false .
:type SriovNetSupport: dict
:param SriovNetSupport: Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.
There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.
This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.
Value (string) --The attribute value. Note that the value is case-sensitive.
:type EnaSupport: dict
:param EnaSupport: Set to true to enable enhanced networking with ENA for the instance.
This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.
Value (boolean) --The attribute value. The valid values are true or false .
"""
pass | Modifies the specified attribute of the specified instance. You can specify only one attribute at a time.
To modify some attributes, the instance must be stopped. For more information, see Modifying Attributes of a Stopped Instance in the Amazon Elastic Compute Cloud User Guide .
See also: AWS API Documentation
:example: response = client.modify_instance_attribute(
DryRun=True|False,
InstanceId='string',
Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport',
Value='string',
BlockDeviceMappings=[
{
'DeviceName': 'string',
'Ebs': {
'VolumeId': 'string',
'DeleteOnTermination': True|False
},
'VirtualName': 'string',
'NoDevice': 'string'
},
],
SourceDestCheck={
'Value': True|False
},
DisableApiTermination={
'Value': True|False
},
InstanceType={
'Value': 'string'
},
Kernel={
'Value': 'string'
},
Ramdisk={
'Value': 'string'
},
UserData={
'Value': b'bytes'
},
InstanceInitiatedShutdownBehavior={
'Value': 'string'
},
Groups=[
'string',
],
EbsOptimized={
'Value': True|False
},
SriovNetSupport={
'Value': 'string'
},
EnaSupport={
'Value': True|False
}
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type InstanceId: string
:param InstanceId: [REQUIRED]
The ID of the instance.
:type Attribute: string
:param Attribute: The name of the attribute.
:type Value: string
:param Value: A new value for the attribute. Use only with the kernel , ramdisk , userData , disableApiTermination , or instanceInitiatedShutdownBehavior attribute.
:type BlockDeviceMappings: list
:param BlockDeviceMappings: Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination , the default is true and the volume is deleted when the instance is terminated.
To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide .
(dict) --Describes a block device mapping entry.
DeviceName (string) --The device name exposed to the instance (for example, /dev/sdh or xvdh ).
Ebs (dict) --Parameters used to automatically set up EBS volumes when the instance is launched.
VolumeId (string) --The ID of the EBS volume.
DeleteOnTermination (boolean) --Indicates whether the volume is deleted on instance termination.
VirtualName (string) --The virtual device name.
NoDevice (string) --suppress the specified device included in the block device mapping.
:type SourceDestCheck: dict
:param SourceDestCheck: Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.
Value (boolean) --The attribute value. The valid values are true or false .
:type DisableApiTermination: dict
:param DisableApiTermination: If the value is true , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.
Value (boolean) --The attribute value. The valid values are true or false .
:type InstanceType: dict
:param InstanceType: Changes the instance type to the specified value. For more information, see Instance Types . If the instance type is not valid, the error returned is InvalidInstanceAttributeValue .
Value (string) --The attribute value. Note that the value is case-sensitive.
:type Kernel: dict
:param Kernel: Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB .
Value (string) --The attribute value. Note that the value is case-sensitive.
:type Ramdisk: dict
:param Ramdisk: Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB .
Value (string) --The attribute value. Note that the value is case-sensitive.
:type UserData: dict
:param UserData: Changes the instance's user data to the specified value. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.
Value (bytes) --
:type InstanceInitiatedShutdownBehavior: dict
:param InstanceInitiatedShutdownBehavior: Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Value (string) --The attribute value. Note that the value is case-sensitive.
:type Groups: list
:param Groups: [EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.
(string) --
:type EbsOptimized: dict
:param EbsOptimized: Specifies whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
Value (boolean) --The attribute value. The valid values are true or false .
:type SriovNetSupport: dict
:param SriovNetSupport: Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.
There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.
This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.
Value (string) --The attribute value. Note that the value is case-sensitive.
:type EnaSupport: dict
:param EnaSupport: Set to true to enable enhanced networking with ENA for the instance.
This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.
Value (boolean) --The attribute value. The valid values are true or false . | entailment |
def register_image(DryRun=None, ImageLocation=None, Name=None, Description=None, Architecture=None, KernelId=None, RamdiskId=None, BillingProducts=None, RootDeviceName=None, BlockDeviceMappings=None, VirtualizationType=None, SriovNetSupport=None, EnaSupport=None):
"""
Registers an AMI. When you're creating an AMI, this is the final step you must complete before you can launch an instance from the AMI. For more information about creating AMIs, see Creating Your Own AMIs in the Amazon Elastic Compute Cloud User Guide .
You can also use RegisterImage to create an Amazon EBS-backed Linux AMI from a snapshot of a root device volume. You specify the snapshot using the block device mapping. For more information, see Launching a Linux Instance from a Backup in the Amazon Elastic Compute Cloud User Guide .
You can't register an image where a secondary (non-root) snapshot has AWS Marketplace product codes.
Some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES), use the EC2 billing product code associated with an AMI to verify the subscription status for package updates. Creating an AMI from an EBS snapshot does not maintain this billing code, and subsequent instances launched from such an AMI will not be able to connect to package update infrastructure. To create an AMI that must retain billing codes, see CreateImage .
If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration. If you make changes to an image, deregister the previous image and register the new image.
See also: AWS API Documentation
:example: response = client.register_image(
DryRun=True|False,
ImageLocation='string',
Name='string',
Description='string',
Architecture='i386'|'x86_64',
KernelId='string',
RamdiskId='string',
BillingProducts=[
'string',
],
RootDeviceName='string',
BlockDeviceMappings=[
{
'VirtualName': 'string',
'DeviceName': 'string',
'Ebs': {
'SnapshotId': 'string',
'VolumeSize': 123,
'DeleteOnTermination': True|False,
'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
'Iops': 123,
'Encrypted': True|False
},
'NoDevice': 'string'
},
],
VirtualizationType='string',
SriovNetSupport='string',
EnaSupport=True|False
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type ImageLocation: string
:param ImageLocation: The full path to your AMI manifest in Amazon S3 storage.
:type Name: string
:param Name: [REQUIRED]
A name for your AMI.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
:type Description: string
:param Description: A description for your AMI.
:type Architecture: string
:param Architecture: The architecture of the AMI.
Default: For Amazon EBS-backed AMIs, i386 . For instance store-backed AMIs, the architecture specified in the manifest file.
:type KernelId: string
:param KernelId: The ID of the kernel.
:type RamdiskId: string
:param RamdiskId: The ID of the RAM disk.
:type BillingProducts: list
:param BillingProducts: The billing product codes. Your account must be authorized to specify billing product codes. Otherwise, you can use the AWS Marketplace to bill for the use of an AMI.
(string) --
:type RootDeviceName: string
:param RootDeviceName: The name of the root device (for example, /dev/sda1 , or /dev/xvda ).
:type BlockDeviceMappings: list
:param BlockDeviceMappings: One or more block device mapping entries.
(dict) --Describes a block device mapping.
VirtualName (string) --The virtual device name (ephemeral N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1 .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.
Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.
DeviceName (string) --The device name exposed to the instance (for example, /dev/sdh or xvdh ).
Ebs (dict) --Parameters used to automatically set up EBS volumes when the instance is launched.
SnapshotId (string) --The ID of the snapshot.
VolumeSize (integer) --The size of the volume, in GiB.
Constraints: 1-16384 for General Purpose SSD (gp2 ), 4-16384 for Provisioned IOPS SSD (io1 ), 500-16384 for Throughput Optimized HDD (st1 ), 500-16384 for Cold HDD (sc1 ), and 1-1024 for Magnetic (standard ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.
Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
DeleteOnTermination (boolean) --Indicates whether the EBS volume is deleted on instance termination.
VolumeType (string) --The volume type: gp2 , io1 , st1 , sc1 , or standard .
Default: standard
Iops (integer) --The number of I/O operations per second (IOPS) that the volume supports. For io1 , this represents the number of IOPS that are provisioned for the volume. For gp2 , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide .
Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for gp2 volumes.
Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2 , st1 , sc1 , or standard volumes.
Encrypted (boolean) --Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.
NoDevice (string) --Suppresses the specified device included in the block device mapping of the AMI.
:type VirtualizationType: string
:param VirtualizationType: The type of virtualization.
Default: paravirtual
:type SriovNetSupport: string
:param SriovNetSupport: Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.
There is no way to disable sriovNetSupport at this time.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
:type EnaSupport: boolean
:param EnaSupport: Set to true to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
:rtype: dict
:return: {
'ImageId': 'string'
}
"""
pass | Registers an AMI. When you're creating an AMI, this is the final step you must complete before you can launch an instance from the AMI. For more information about creating AMIs, see Creating Your Own AMIs in the Amazon Elastic Compute Cloud User Guide .
You can also use RegisterImage to create an Amazon EBS-backed Linux AMI from a snapshot of a root device volume. You specify the snapshot using the block device mapping. For more information, see Launching a Linux Instance from a Backup in the Amazon Elastic Compute Cloud User Guide .
You can't register an image where a secondary (non-root) snapshot has AWS Marketplace product codes.
Some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES), use the EC2 billing product code associated with an AMI to verify the subscription status for package updates. Creating an AMI from an EBS snapshot does not maintain this billing code, and subsequent instances launched from such an AMI will not be able to connect to package update infrastructure. To create an AMI that must retain billing codes, see CreateImage .
If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration. If you make changes to an image, deregister the previous image and register the new image.
See also: AWS API Documentation
:example: response = client.register_image(
DryRun=True|False,
ImageLocation='string',
Name='string',
Description='string',
Architecture='i386'|'x86_64',
KernelId='string',
RamdiskId='string',
BillingProducts=[
'string',
],
RootDeviceName='string',
BlockDeviceMappings=[
{
'VirtualName': 'string',
'DeviceName': 'string',
'Ebs': {
'SnapshotId': 'string',
'VolumeSize': 123,
'DeleteOnTermination': True|False,
'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
'Iops': 123,
'Encrypted': True|False
},
'NoDevice': 'string'
},
],
VirtualizationType='string',
SriovNetSupport='string',
EnaSupport=True|False
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type ImageLocation: string
:param ImageLocation: The full path to your AMI manifest in Amazon S3 storage.
:type Name: string
:param Name: [REQUIRED]
A name for your AMI.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
:type Description: string
:param Description: A description for your AMI.
:type Architecture: string
:param Architecture: The architecture of the AMI.
Default: For Amazon EBS-backed AMIs, i386 . For instance store-backed AMIs, the architecture specified in the manifest file.
:type KernelId: string
:param KernelId: The ID of the kernel.
:type RamdiskId: string
:param RamdiskId: The ID of the RAM disk.
:type BillingProducts: list
:param BillingProducts: The billing product codes. Your account must be authorized to specify billing product codes. Otherwise, you can use the AWS Marketplace to bill for the use of an AMI.
(string) --
:type RootDeviceName: string
:param RootDeviceName: The name of the root device (for example, /dev/sda1 , or /dev/xvda ).
:type BlockDeviceMappings: list
:param BlockDeviceMappings: One or more block device mapping entries.
(dict) --Describes a block device mapping.
VirtualName (string) --The virtual device name (ephemeral N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1 .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.
Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.
DeviceName (string) --The device name exposed to the instance (for example, /dev/sdh or xvdh ).
Ebs (dict) --Parameters used to automatically set up EBS volumes when the instance is launched.
SnapshotId (string) --The ID of the snapshot.
VolumeSize (integer) --The size of the volume, in GiB.
Constraints: 1-16384 for General Purpose SSD (gp2 ), 4-16384 for Provisioned IOPS SSD (io1 ), 500-16384 for Throughput Optimized HDD (st1 ), 500-16384 for Cold HDD (sc1 ), and 1-1024 for Magnetic (standard ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.
Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
DeleteOnTermination (boolean) --Indicates whether the EBS volume is deleted on instance termination.
VolumeType (string) --The volume type: gp2 , io1 , st1 , sc1 , or standard .
Default: standard
Iops (integer) --The number of I/O operations per second (IOPS) that the volume supports. For io1 , this represents the number of IOPS that are provisioned for the volume. For gp2 , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide .
Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for gp2 volumes.
Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2 , st1 , sc1 , or standard volumes.
Encrypted (boolean) --Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.
NoDevice (string) --Suppresses the specified device included in the block device mapping of the AMI.
:type VirtualizationType: string
:param VirtualizationType: The type of virtualization.
Default: paravirtual
:type SriovNetSupport: string
:param SriovNetSupport: Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.
There is no way to disable sriovNetSupport at this time.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
:type EnaSupport: boolean
:param EnaSupport: Set to true to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
:rtype: dict
:return: {
'ImageId': 'string'
} | entailment |
def replace_network_acl_entry(DryRun=None, NetworkAclId=None, RuleNumber=None, Protocol=None, RuleAction=None, Egress=None, CidrBlock=None, Ipv6CidrBlock=None, IcmpTypeCode=None, PortRange=None):
"""
Replaces an entry (rule) in a network ACL. For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide .
See also: AWS API Documentation
Examples
This example replaces an entry for the specified network ACL. The new rule 100 allows ingress traffic from 203.0.113.12/24 on UDP port 53 (DNS) into any associated subnet.
Expected Output:
:example: response = client.replace_network_acl_entry(
DryRun=True|False,
NetworkAclId='string',
RuleNumber=123,
Protocol='string',
RuleAction='allow'|'deny',
Egress=True|False,
CidrBlock='string',
Ipv6CidrBlock='string',
IcmpTypeCode={
'Type': 123,
'Code': 123
},
PortRange={
'From': 123,
'To': 123
}
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type NetworkAclId: string
:param NetworkAclId: [REQUIRED]
The ID of the ACL.
:type RuleNumber: integer
:param RuleNumber: [REQUIRED]
The rule number of the entry to replace.
:type Protocol: string
:param Protocol: [REQUIRED]
The IP protocol. You can specify all or -1 to mean all protocols. If you specify all , -1 , or a protocol number other than tcp , udp , or icmp , traffic on all ports is allowed, regardless of any ports or ICMP types or codes you specify. If you specify protocol 58 (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol 58 (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.
:type RuleAction: string
:param RuleAction: [REQUIRED]
Indicates whether to allow or deny the traffic that matches the rule.
:type Egress: boolean
:param Egress: [REQUIRED]
Indicates whether to replace the egress rule.
Default: If no value is specified, we replace the ingress rule.
:type CidrBlock: string
:param CidrBlock: The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24 ).
:type Ipv6CidrBlock: string
:param Ipv6CidrBlock: The IPv6 network range to allow or deny, in CIDR notation (for example 2001:bd8:1234:1a00::/64 ).
:type IcmpTypeCode: dict
:param IcmpTypeCode: ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying the ICMP (1) protocol, or protocol 58 (ICMPv6) with an IPv6 CIDR block.
Type (integer) --The ICMP type. A value of -1 means all types.
Code (integer) --The ICMP code. A value of -1 means all codes for the specified ICMP type.
:type PortRange: dict
:param PortRange: TCP or UDP protocols: The range of ports the rule applies to. Required if specifying TCP (6) or UDP (17) for the protocol.
From (integer) --The first port in the range.
To (integer) --The last port in the range.
:return: response = client.replace_network_acl_entry(
CidrBlock='203.0.113.12/24',
Egress=False,
NetworkAclId='acl-5fb85d36',
PortRange={
'From': 53,
'To': 53,
},
Protocol='udp',
RuleAction='allow',
RuleNumber=100,
)
print(response)
"""
pass | Replaces an entry (rule) in a network ACL. For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide .
See also: AWS API Documentation
Examples
This example replaces an entry for the specified network ACL. The new rule 100 allows ingress traffic from 203.0.113.12/24 on UDP port 53 (DNS) into any associated subnet.
Expected Output:
:example: response = client.replace_network_acl_entry(
DryRun=True|False,
NetworkAclId='string',
RuleNumber=123,
Protocol='string',
RuleAction='allow'|'deny',
Egress=True|False,
CidrBlock='string',
Ipv6CidrBlock='string',
IcmpTypeCode={
'Type': 123,
'Code': 123
},
PortRange={
'From': 123,
'To': 123
}
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type NetworkAclId: string
:param NetworkAclId: [REQUIRED]
The ID of the ACL.
:type RuleNumber: integer
:param RuleNumber: [REQUIRED]
The rule number of the entry to replace.
:type Protocol: string
:param Protocol: [REQUIRED]
The IP protocol. You can specify all or -1 to mean all protocols. If you specify all , -1 , or a protocol number other than tcp , udp , or icmp , traffic on all ports is allowed, regardless of any ports or ICMP types or codes you specify. If you specify protocol 58 (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol 58 (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.
:type RuleAction: string
:param RuleAction: [REQUIRED]
Indicates whether to allow or deny the traffic that matches the rule.
:type Egress: boolean
:param Egress: [REQUIRED]
Indicates whether to replace the egress rule.
Default: If no value is specified, we replace the ingress rule.
:type CidrBlock: string
:param CidrBlock: The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24 ).
:type Ipv6CidrBlock: string
:param Ipv6CidrBlock: The IPv6 network range to allow or deny, in CIDR notation (for example 2001:bd8:1234:1a00::/64 ).
:type IcmpTypeCode: dict
:param IcmpTypeCode: ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying the ICMP (1) protocol, or protocol 58 (ICMPv6) with an IPv6 CIDR block.
Type (integer) --The ICMP type. A value of -1 means all types.
Code (integer) --The ICMP code. A value of -1 means all codes for the specified ICMP type.
:type PortRange: dict
:param PortRange: TCP or UDP protocols: The range of ports the rule applies to. Required if specifying TCP (6) or UDP (17) for the protocol.
From (integer) --The first port in the range.
To (integer) --The last port in the range.
:return: response = client.replace_network_acl_entry(
CidrBlock='203.0.113.12/24',
Egress=False,
NetworkAclId='acl-5fb85d36',
PortRange={
'From': 53,
'To': 53,
},
Protocol='udp',
RuleAction='allow',
RuleNumber=100,
)
print(response) | entailment |
def replace_route(DryRun=None, RouteTableId=None, DestinationCidrBlock=None, GatewayId=None, DestinationIpv6CidrBlock=None, EgressOnlyInternetGatewayId=None, InstanceId=None, NetworkInterfaceId=None, VpcPeeringConnectionId=None, NatGatewayId=None):
"""
Replaces an existing route within a route table in a VPC. You must provide only one of the following: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, or egress-only Internet gateway.
For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide .
See also: AWS API Documentation
Examples
This example replaces the specified route in the specified table table. The new route matches the specified CIDR and sends the traffic to the specified virtual private gateway.
Expected Output:
:example: response = client.replace_route(
DryRun=True|False,
RouteTableId='string',
DestinationCidrBlock='string',
GatewayId='string',
DestinationIpv6CidrBlock='string',
EgressOnlyInternetGatewayId='string',
InstanceId='string',
NetworkInterfaceId='string',
VpcPeeringConnectionId='string',
NatGatewayId='string'
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type RouteTableId: string
:param RouteTableId: [REQUIRED]
The ID of the route table.
:type DestinationCidrBlock: string
:param DestinationCidrBlock: The IPv4 CIDR address block used for the destination match. The value you provide must match the CIDR of an existing route in the table.
:type GatewayId: string
:param GatewayId: The ID of an Internet gateway or virtual private gateway.
:type DestinationIpv6CidrBlock: string
:param DestinationIpv6CidrBlock: The IPv6 CIDR address block used for the destination match. The value you provide must match the CIDR of an existing route in the table.
:type EgressOnlyInternetGatewayId: string
:param EgressOnlyInternetGatewayId: [IPv6 traffic only] The ID of an egress-only Internet gateway.
:type InstanceId: string
:param InstanceId: The ID of a NAT instance in your VPC.
:type NetworkInterfaceId: string
:param NetworkInterfaceId: The ID of a network interface.
:type VpcPeeringConnectionId: string
:param VpcPeeringConnectionId: The ID of a VPC peering connection.
:type NatGatewayId: string
:param NatGatewayId: [IPv4 traffic only] The ID of a NAT gateway.
:return: response = client.replace_route(
DestinationCidrBlock='10.0.0.0/16',
GatewayId='vgw-9a4cacf3',
RouteTableId='rtb-22574640',
)
print(response)
"""
pass | Replaces an existing route within a route table in a VPC. You must provide only one of the following: Internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, or egress-only Internet gateway.
For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide .
See also: AWS API Documentation
Examples
This example replaces the specified route in the specified table table. The new route matches the specified CIDR and sends the traffic to the specified virtual private gateway.
Expected Output:
:example: response = client.replace_route(
DryRun=True|False,
RouteTableId='string',
DestinationCidrBlock='string',
GatewayId='string',
DestinationIpv6CidrBlock='string',
EgressOnlyInternetGatewayId='string',
InstanceId='string',
NetworkInterfaceId='string',
VpcPeeringConnectionId='string',
NatGatewayId='string'
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type RouteTableId: string
:param RouteTableId: [REQUIRED]
The ID of the route table.
:type DestinationCidrBlock: string
:param DestinationCidrBlock: The IPv4 CIDR address block used for the destination match. The value you provide must match the CIDR of an existing route in the table.
:type GatewayId: string
:param GatewayId: The ID of an Internet gateway or virtual private gateway.
:type DestinationIpv6CidrBlock: string
:param DestinationIpv6CidrBlock: The IPv6 CIDR address block used for the destination match. The value you provide must match the CIDR of an existing route in the table.
:type EgressOnlyInternetGatewayId: string
:param EgressOnlyInternetGatewayId: [IPv6 traffic only] The ID of an egress-only Internet gateway.
:type InstanceId: string
:param InstanceId: The ID of a NAT instance in your VPC.
:type NetworkInterfaceId: string
:param NetworkInterfaceId: The ID of a network interface.
:type VpcPeeringConnectionId: string
:param VpcPeeringConnectionId: The ID of a VPC peering connection.
:type NatGatewayId: string
:param NatGatewayId: [IPv4 traffic only] The ID of a NAT gateway.
:return: response = client.replace_route(
DestinationCidrBlock='10.0.0.0/16',
GatewayId='vgw-9a4cacf3',
RouteTableId='rtb-22574640',
)
print(response) | entailment |
def request_spot_instances(DryRun=None, SpotPrice=None, ClientToken=None, InstanceCount=None, Type=None, ValidFrom=None, ValidUntil=None, LaunchGroup=None, AvailabilityZoneGroup=None, BlockDurationMinutes=None, LaunchSpecification=None):
"""
Creates a Spot instance request. Spot instances are instances that Amazon EC2 launches when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot Instance capacity and current Spot instance requests. For more information, see Spot Instance Requests in the Amazon Elastic Compute Cloud User Guide .
See also: AWS API Documentation
Examples
This example creates a one-time Spot Instance request for five instances in the specified Availability Zone. If your account supports EC2-VPC only, Amazon EC2 launches the instances in the default subnet of the specified Availability Zone. If your account supports EC2-Classic, Amazon EC2 launches the instances in EC2-Classic in the specified Availability Zone.
Expected Output:
This example command creates a one-time Spot Instance request for five instances in the specified subnet. Amazon EC2 launches the instances in the specified subnet. If the VPC is a nondefault VPC, the instances do not receive a public IP address by default.
Expected Output:
:example: response = client.request_spot_instances(
DryRun=True|False,
SpotPrice='string',
ClientToken='string',
InstanceCount=123,
Type='one-time'|'persistent',
ValidFrom=datetime(2015, 1, 1),
ValidUntil=datetime(2015, 1, 1),
LaunchGroup='string',
AvailabilityZoneGroup='string',
BlockDurationMinutes=123,
LaunchSpecification={
'ImageId': 'string',
'KeyName': 'string',
'SecurityGroups': [
'string',
],
'UserData': 'string',
'AddressingType': 'string',
'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
'Placement': {
'AvailabilityZone': 'string',
'GroupName': 'string',
'Tenancy': 'default'|'dedicated'|'host'
},
'KernelId': 'string',
'RamdiskId': 'string',
'BlockDeviceMappings': [
{
'VirtualName': 'string',
'DeviceName': 'string',
'Ebs': {
'SnapshotId': 'string',
'VolumeSize': 123,
'DeleteOnTermination': True|False,
'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
'Iops': 123,
'Encrypted': True|False
},
'NoDevice': 'string'
},
],
'SubnetId': 'string',
'NetworkInterfaces': [
{
'NetworkInterfaceId': 'string',
'DeviceIndex': 123,
'SubnetId': 'string',
'Description': 'string',
'PrivateIpAddress': 'string',
'Groups': [
'string',
],
'DeleteOnTermination': True|False,
'PrivateIpAddresses': [
{
'PrivateIpAddress': 'string',
'Primary': True|False
},
],
'SecondaryPrivateIpAddressCount': 123,
'AssociatePublicIpAddress': True|False,
'Ipv6Addresses': [
{
'Ipv6Address': 'string'
},
],
'Ipv6AddressCount': 123
},
],
'IamInstanceProfile': {
'Arn': 'string',
'Name': 'string'
},
'EbsOptimized': True|False,
'Monitoring': {
'Enabled': True|False
},
'SecurityGroupIds': [
'string',
]
}
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type SpotPrice: string
:param SpotPrice: [REQUIRED]
The maximum hourly price (bid) for any Spot instance launched to fulfill the request.
:type ClientToken: string
:param ClientToken: Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide .
:type InstanceCount: integer
:param InstanceCount: The maximum number of Spot instances to launch.
Default: 1
:type Type: string
:param Type: The Spot instance request type.
Default: one-time
:type ValidFrom: datetime
:param ValidFrom: The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.
Default: The request is effective indefinitely.
:type ValidUntil: datetime
:param ValidUntil: The end date of the request. If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.
Default: The request is effective indefinitely.
:type LaunchGroup: string
:param LaunchGroup: The instance launch group. Launch groups are Spot instances that launch together and terminate together.
Default: Instances are launched and terminated individually
:type AvailabilityZoneGroup: string
:param AvailabilityZoneGroup: The user-specified name for a logical grouping of bids.
When you specify an Availability Zone group in a Spot Instance request, all Spot instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to bids for Spot Instances of the same instance type. Any additional Spot instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.
If there is no active instance running in the Availability Zone group that you specify for a new Spot instance request (all instances are terminated, the bid is expired, or the bid falls below current market), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.
Default: Instances are launched in any available Availability Zone.
:type BlockDurationMinutes: integer
:param BlockDurationMinutes: The required duration for the Spot instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
:type LaunchSpecification: dict
:param LaunchSpecification: Describes the launch specification for an instance.
ImageId (string) --The ID of the AMI.
KeyName (string) --The name of the key pair.
SecurityGroups (list) --
(string) --
UserData (string) --The user data to make available to the instances. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.
AddressingType (string) --Deprecated.
InstanceType (string) --The instance type.
Placement (dict) --The placement information for the instance.
AvailabilityZone (string) --The Availability Zone.
[Spot fleet only] To specify multiple Availability Zones, separate them using commas; for example, 'us-west-2a, us-west-2b'.
GroupName (string) --The name of the placement group (for cluster instances).
Tenancy (string) --The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for Spot instances.
KernelId (string) --The ID of the kernel.
RamdiskId (string) --The ID of the RAM disk.
BlockDeviceMappings (list) --One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
(dict) --Describes a block device mapping.
VirtualName (string) --The virtual device name (ephemeral N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1 .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.
Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.
DeviceName (string) --The device name exposed to the instance (for example, /dev/sdh or xvdh ).
Ebs (dict) --Parameters used to automatically set up EBS volumes when the instance is launched.
SnapshotId (string) --The ID of the snapshot.
VolumeSize (integer) --The size of the volume, in GiB.
Constraints: 1-16384 for General Purpose SSD (gp2 ), 4-16384 for Provisioned IOPS SSD (io1 ), 500-16384 for Throughput Optimized HDD (st1 ), 500-16384 for Cold HDD (sc1 ), and 1-1024 for Magnetic (standard ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.
Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
DeleteOnTermination (boolean) --Indicates whether the EBS volume is deleted on instance termination.
VolumeType (string) --The volume type: gp2 , io1 , st1 , sc1 , or standard .
Default: standard
Iops (integer) --The number of I/O operations per second (IOPS) that the volume supports. For io1 , this represents the number of IOPS that are provisioned for the volume. For gp2 , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide .
Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for gp2 volumes.
Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2 , st1 , sc1 , or standard volumes.
Encrypted (boolean) --Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.
NoDevice (string) --Suppresses the specified device included in the block device mapping of the AMI.
SubnetId (string) --The ID of the subnet in which to launch the instance.
NetworkInterfaces (list) --One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.
(dict) --Describes a network interface.
NetworkInterfaceId (string) --The ID of the network interface.
DeviceIndex (integer) --The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a RunInstances request, you must provide the device index.
SubnetId (string) --The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
Description (string) --The description of the network interface. Applies only if creating a network interface when launching an instance.
PrivateIpAddress (string) --The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.
Groups (list) --The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
(string) --
DeleteOnTermination (boolean) --If set to true , the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.
PrivateIpAddresses (list) --One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.
(dict) --Describes a secondary private IPv4 address for a network interface.
PrivateIpAddress (string) -- [REQUIRED]The private IPv4 addresses.
Primary (boolean) --Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.
SecondaryPrivateIpAddressCount (integer) --The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.
AssociatePublicIpAddress (boolean) --Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true .
Ipv6Addresses (list) --One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
(dict) --Describes an IPv6 address.
Ipv6Address (string) --The IPv6 address.
Ipv6AddressCount (integer) --A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
IamInstanceProfile (dict) --The IAM instance profile.
Arn (string) --The Amazon Resource Name (ARN) of the instance profile.
Name (string) --The name of the instance profile.
EbsOptimized (boolean) --Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
Default: false
Monitoring (dict) --Describes the monitoring of an instance.
Enabled (boolean) -- [REQUIRED]Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.
SecurityGroupIds (list) --
(string) --
:rtype: dict
:return: {
'SpotInstanceRequests': [
{
'SpotInstanceRequestId': 'string',
'SpotPrice': 'string',
'Type': 'one-time'|'persistent',
'State': 'open'|'active'|'closed'|'cancelled'|'failed',
'Fault': {
'Code': 'string',
'Message': 'string'
},
'Status': {
'Code': 'string',
'UpdateTime': datetime(2015, 1, 1),
'Message': 'string'
},
'ValidFrom': datetime(2015, 1, 1),
'ValidUntil': datetime(2015, 1, 1),
'LaunchGroup': 'string',
'AvailabilityZoneGroup': 'string',
'LaunchSpecification': {
'ImageId': 'string',
'KeyName': 'string',
'SecurityGroups': [
{
'GroupName': 'string',
'GroupId': 'string'
},
],
'UserData': 'string',
'AddressingType': 'string',
'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
'Placement': {
'AvailabilityZone': 'string',
'GroupName': 'string',
'Tenancy': 'default'|'dedicated'|'host'
},
'KernelId': 'string',
'RamdiskId': 'string',
'BlockDeviceMappings': [
{
'VirtualName': 'string',
'DeviceName': 'string',
'Ebs': {
'SnapshotId': 'string',
'VolumeSize': 123,
'DeleteOnTermination': True|False,
'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
'Iops': 123,
'Encrypted': True|False
},
'NoDevice': 'string'
},
],
'SubnetId': 'string',
'NetworkInterfaces': [
{
'NetworkInterfaceId': 'string',
'DeviceIndex': 123,
'SubnetId': 'string',
'Description': 'string',
'PrivateIpAddress': 'string',
'Groups': [
'string',
],
'DeleteOnTermination': True|False,
'PrivateIpAddresses': [
{
'PrivateIpAddress': 'string',
'Primary': True|False
},
],
'SecondaryPrivateIpAddressCount': 123,
'AssociatePublicIpAddress': True|False,
'Ipv6Addresses': [
{
'Ipv6Address': 'string'
},
],
'Ipv6AddressCount': 123
},
],
'IamInstanceProfile': {
'Arn': 'string',
'Name': 'string'
},
'EbsOptimized': True|False,
'Monitoring': {
'Enabled': True|False
}
},
'InstanceId': 'string',
'CreateTime': datetime(2015, 1, 1),
'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
'BlockDurationMinutes': 123,
'ActualBlockHourlyPrice': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'LaunchedAvailabilityZone': 'string'
},
]
}
:returns:
(string) --
"""
pass | Creates a Spot instance request. Spot instances are instances that Amazon EC2 launches when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot Instance capacity and current Spot instance requests. For more information, see Spot Instance Requests in the Amazon Elastic Compute Cloud User Guide .
See also: AWS API Documentation
Examples
This example creates a one-time Spot Instance request for five instances in the specified Availability Zone. If your account supports EC2-VPC only, Amazon EC2 launches the instances in the default subnet of the specified Availability Zone. If your account supports EC2-Classic, Amazon EC2 launches the instances in EC2-Classic in the specified Availability Zone.
Expected Output:
This example command creates a one-time Spot Instance request for five instances in the specified subnet. Amazon EC2 launches the instances in the specified subnet. If the VPC is a nondefault VPC, the instances do not receive a public IP address by default.
Expected Output:
:example: response = client.request_spot_instances(
DryRun=True|False,
SpotPrice='string',
ClientToken='string',
InstanceCount=123,
Type='one-time'|'persistent',
ValidFrom=datetime(2015, 1, 1),
ValidUntil=datetime(2015, 1, 1),
LaunchGroup='string',
AvailabilityZoneGroup='string',
BlockDurationMinutes=123,
LaunchSpecification={
'ImageId': 'string',
'KeyName': 'string',
'SecurityGroups': [
'string',
],
'UserData': 'string',
'AddressingType': 'string',
'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
'Placement': {
'AvailabilityZone': 'string',
'GroupName': 'string',
'Tenancy': 'default'|'dedicated'|'host'
},
'KernelId': 'string',
'RamdiskId': 'string',
'BlockDeviceMappings': [
{
'VirtualName': 'string',
'DeviceName': 'string',
'Ebs': {
'SnapshotId': 'string',
'VolumeSize': 123,
'DeleteOnTermination': True|False,
'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
'Iops': 123,
'Encrypted': True|False
},
'NoDevice': 'string'
},
],
'SubnetId': 'string',
'NetworkInterfaces': [
{
'NetworkInterfaceId': 'string',
'DeviceIndex': 123,
'SubnetId': 'string',
'Description': 'string',
'PrivateIpAddress': 'string',
'Groups': [
'string',
],
'DeleteOnTermination': True|False,
'PrivateIpAddresses': [
{
'PrivateIpAddress': 'string',
'Primary': True|False
},
],
'SecondaryPrivateIpAddressCount': 123,
'AssociatePublicIpAddress': True|False,
'Ipv6Addresses': [
{
'Ipv6Address': 'string'
},
],
'Ipv6AddressCount': 123
},
],
'IamInstanceProfile': {
'Arn': 'string',
'Name': 'string'
},
'EbsOptimized': True|False,
'Monitoring': {
'Enabled': True|False
},
'SecurityGroupIds': [
'string',
]
}
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type SpotPrice: string
:param SpotPrice: [REQUIRED]
The maximum hourly price (bid) for any Spot instance launched to fulfill the request.
:type ClientToken: string
:param ClientToken: Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide .
:type InstanceCount: integer
:param InstanceCount: The maximum number of Spot instances to launch.
Default: 1
:type Type: string
:param Type: The Spot instance request type.
Default: one-time
:type ValidFrom: datetime
:param ValidFrom: The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.
Default: The request is effective indefinitely.
:type ValidUntil: datetime
:param ValidUntil: The end date of the request. If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.
Default: The request is effective indefinitely.
:type LaunchGroup: string
:param LaunchGroup: The instance launch group. Launch groups are Spot instances that launch together and terminate together.
Default: Instances are launched and terminated individually
:type AvailabilityZoneGroup: string
:param AvailabilityZoneGroup: The user-specified name for a logical grouping of bids.
When you specify an Availability Zone group in a Spot Instance request, all Spot instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to bids for Spot Instances of the same instance type. Any additional Spot instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.
If there is no active instance running in the Availability Zone group that you specify for a new Spot instance request (all instances are terminated, the bid is expired, or the bid falls below current market), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.
Default: Instances are launched in any available Availability Zone.
:type BlockDurationMinutes: integer
:param BlockDurationMinutes: The required duration for the Spot instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
:type LaunchSpecification: dict
:param LaunchSpecification: Describes the launch specification for an instance.
ImageId (string) --The ID of the AMI.
KeyName (string) --The name of the key pair.
SecurityGroups (list) --
(string) --
UserData (string) --The user data to make available to the instances. If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.
AddressingType (string) --Deprecated.
InstanceType (string) --The instance type.
Placement (dict) --The placement information for the instance.
AvailabilityZone (string) --The Availability Zone.
[Spot fleet only] To specify multiple Availability Zones, separate them using commas; for example, 'us-west-2a, us-west-2b'.
GroupName (string) --The name of the placement group (for cluster instances).
Tenancy (string) --The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for Spot instances.
KernelId (string) --The ID of the kernel.
RamdiskId (string) --The ID of the RAM disk.
BlockDeviceMappings (list) --One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
(dict) --Describes a block device mapping.
VirtualName (string) --The virtual device name (ephemeral N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1 .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.
Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.
DeviceName (string) --The device name exposed to the instance (for example, /dev/sdh or xvdh ).
Ebs (dict) --Parameters used to automatically set up EBS volumes when the instance is launched.
SnapshotId (string) --The ID of the snapshot.
VolumeSize (integer) --The size of the volume, in GiB.
Constraints: 1-16384 for General Purpose SSD (gp2 ), 4-16384 for Provisioned IOPS SSD (io1 ), 500-16384 for Throughput Optimized HDD (st1 ), 500-16384 for Cold HDD (sc1 ), and 1-1024 for Magnetic (standard ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.
Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
DeleteOnTermination (boolean) --Indicates whether the EBS volume is deleted on instance termination.
VolumeType (string) --The volume type: gp2 , io1 , st1 , sc1 , or standard .
Default: standard
Iops (integer) --The number of I/O operations per second (IOPS) that the volume supports. For io1 , this represents the number of IOPS that are provisioned for the volume. For gp2 , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide .
Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for gp2 volumes.
Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2 , st1 , sc1 , or standard volumes.
Encrypted (boolean) --Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.
NoDevice (string) --Suppresses the specified device included in the block device mapping of the AMI.
SubnetId (string) --The ID of the subnet in which to launch the instance.
NetworkInterfaces (list) --One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.
(dict) --Describes a network interface.
NetworkInterfaceId (string) --The ID of the network interface.
DeviceIndex (integer) --The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a RunInstances request, you must provide the device index.
SubnetId (string) --The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
Description (string) --The description of the network interface. Applies only if creating a network interface when launching an instance.
PrivateIpAddress (string) --The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.
Groups (list) --The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
(string) --
DeleteOnTermination (boolean) --If set to true , the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.
PrivateIpAddresses (list) --One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.
(dict) --Describes a secondary private IPv4 address for a network interface.
PrivateIpAddress (string) -- [REQUIRED]The private IPv4 addresses.
Primary (boolean) --Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.
SecondaryPrivateIpAddressCount (integer) --The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.
AssociatePublicIpAddress (boolean) --Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true .
Ipv6Addresses (list) --One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
(dict) --Describes an IPv6 address.
Ipv6Address (string) --The IPv6 address.
Ipv6AddressCount (integer) --A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
IamInstanceProfile (dict) --The IAM instance profile.
Arn (string) --The Amazon Resource Name (ARN) of the instance profile.
Name (string) --The name of the instance profile.
EbsOptimized (boolean) --Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
Default: false
Monitoring (dict) --Describes the monitoring of an instance.
Enabled (boolean) -- [REQUIRED]Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.
SecurityGroupIds (list) --
(string) --
:rtype: dict
:return: {
'SpotInstanceRequests': [
{
'SpotInstanceRequestId': 'string',
'SpotPrice': 'string',
'Type': 'one-time'|'persistent',
'State': 'open'|'active'|'closed'|'cancelled'|'failed',
'Fault': {
'Code': 'string',
'Message': 'string'
},
'Status': {
'Code': 'string',
'UpdateTime': datetime(2015, 1, 1),
'Message': 'string'
},
'ValidFrom': datetime(2015, 1, 1),
'ValidUntil': datetime(2015, 1, 1),
'LaunchGroup': 'string',
'AvailabilityZoneGroup': 'string',
'LaunchSpecification': {
'ImageId': 'string',
'KeyName': 'string',
'SecurityGroups': [
{
'GroupName': 'string',
'GroupId': 'string'
},
],
'UserData': 'string',
'AddressingType': 'string',
'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
'Placement': {
'AvailabilityZone': 'string',
'GroupName': 'string',
'Tenancy': 'default'|'dedicated'|'host'
},
'KernelId': 'string',
'RamdiskId': 'string',
'BlockDeviceMappings': [
{
'VirtualName': 'string',
'DeviceName': 'string',
'Ebs': {
'SnapshotId': 'string',
'VolumeSize': 123,
'DeleteOnTermination': True|False,
'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
'Iops': 123,
'Encrypted': True|False
},
'NoDevice': 'string'
},
],
'SubnetId': 'string',
'NetworkInterfaces': [
{
'NetworkInterfaceId': 'string',
'DeviceIndex': 123,
'SubnetId': 'string',
'Description': 'string',
'PrivateIpAddress': 'string',
'Groups': [
'string',
],
'DeleteOnTermination': True|False,
'PrivateIpAddresses': [
{
'PrivateIpAddress': 'string',
'Primary': True|False
},
],
'SecondaryPrivateIpAddressCount': 123,
'AssociatePublicIpAddress': True|False,
'Ipv6Addresses': [
{
'Ipv6Address': 'string'
},
],
'Ipv6AddressCount': 123
},
],
'IamInstanceProfile': {
'Arn': 'string',
'Name': 'string'
},
'EbsOptimized': True|False,
'Monitoring': {
'Enabled': True|False
}
},
'InstanceId': 'string',
'CreateTime': datetime(2015, 1, 1),
'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
'BlockDurationMinutes': 123,
'ActualBlockHourlyPrice': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'LaunchedAvailabilityZone': 'string'
},
]
}
:returns:
(string) -- | entailment |
def run_instances(DryRun=None, ImageId=None, MinCount=None, MaxCount=None, KeyName=None, SecurityGroups=None, SecurityGroupIds=None, UserData=None, InstanceType=None, Placement=None, KernelId=None, RamdiskId=None, BlockDeviceMappings=None, Monitoring=None, SubnetId=None, DisableApiTermination=None, InstanceInitiatedShutdownBehavior=None, PrivateIpAddress=None, Ipv6Addresses=None, Ipv6AddressCount=None, ClientToken=None, AdditionalInfo=None, NetworkInterfaces=None, IamInstanceProfile=None, EbsOptimized=None, TagSpecifications=None):
"""
Launches the specified number of instances using an AMI for which you have permissions.
You can specify a number of options, or leave the default options. The following rules apply:
To ensure faster instance launches, break up large requests into smaller batches. For example, create 5 separate launch requests for 100 instances each instead of 1 launch request for 500 instances.
An instance is ready for you to use when it's in the running state. You can check the state of your instance using DescribeInstances . You can tag instances and EBS volumes during launch, after launch, or both. For more information, see CreateTags and Tagging Your Amazon EC2 Resources .
Linux instances have access to the public key of the key pair at boot. You can use this key to provide secure access to the instance. Amazon EC2 public images use this feature to provide secure access without passwords. For more information, see Key Pairs in the Amazon Elastic Compute Cloud User Guide .
For troubleshooting, see What To Do If An Instance Immediately Terminates , and Troubleshooting Connecting to Your Instance in the Amazon Elastic Compute Cloud User Guide .
See also: AWS API Documentation
:example: response = client.run_instances(
DryRun=True|False,
ImageId='string',
MinCount=123,
MaxCount=123,
KeyName='string',
SecurityGroups=[
'string',
],
SecurityGroupIds=[
'string',
],
UserData='string',
InstanceType='t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
Placement={
'AvailabilityZone': 'string',
'GroupName': 'string',
'Tenancy': 'default'|'dedicated'|'host',
'HostId': 'string',
'Affinity': 'string'
},
KernelId='string',
RamdiskId='string',
BlockDeviceMappings=[
{
'VirtualName': 'string',
'DeviceName': 'string',
'Ebs': {
'SnapshotId': 'string',
'VolumeSize': 123,
'DeleteOnTermination': True|False,
'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
'Iops': 123,
'Encrypted': True|False
},
'NoDevice': 'string'
},
],
Monitoring={
'Enabled': True|False
},
SubnetId='string',
DisableApiTermination=True|False,
InstanceInitiatedShutdownBehavior='stop'|'terminate',
PrivateIpAddress='string',
Ipv6Addresses=[
{
'Ipv6Address': 'string'
},
],
Ipv6AddressCount=123,
ClientToken='string',
AdditionalInfo='string',
NetworkInterfaces=[
{
'NetworkInterfaceId': 'string',
'DeviceIndex': 123,
'SubnetId': 'string',
'Description': 'string',
'PrivateIpAddress': 'string',
'Groups': [
'string',
],
'DeleteOnTermination': True|False,
'PrivateIpAddresses': [
{
'PrivateIpAddress': 'string',
'Primary': True|False
},
],
'SecondaryPrivateIpAddressCount': 123,
'AssociatePublicIpAddress': True|False,
'Ipv6Addresses': [
{
'Ipv6Address': 'string'
},
],
'Ipv6AddressCount': 123
},
],
IamInstanceProfile={
'Arn': 'string',
'Name': 'string'
},
EbsOptimized=True|False,
TagSpecifications=[
{
'ResourceType': 'customer-gateway'|'dhcp-options'|'image'|'instance'|'internet-gateway'|'network-acl'|'network-interface'|'reserved-instances'|'route-table'|'snapshot'|'spot-instances-request'|'subnet'|'security-group'|'volume'|'vpc'|'vpn-connection'|'vpn-gateway',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
},
]
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type ImageId: string
:param ImageId: [REQUIRED]
The ID of the AMI, which you can get by calling DescribeImages .
:type MinCount: integer
:param MinCount: [REQUIRED]
The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
:type MaxCount: integer
:param MaxCount: [REQUIRED]
The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount .
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.
:type KeyName: string
:param KeyName: The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair .
Warning
If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.
:type SecurityGroups: list
:param SecurityGroups: [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.
Default: Amazon EC2 uses the default security group.
(string) --
:type SecurityGroupIds: list
:param SecurityGroupIds: One or more security group IDs. You can create a security group using CreateSecurityGroup .
Default: Amazon EC2 uses the default security group.
(string) --
:type UserData: string
:param UserData: The user data to make available to the instance. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.
This value will be base64 encoded automatically. Do not base64 encode this value prior to performing the operation.
:type InstanceType: string
:param InstanceType: The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide .
Default: m1.small
:type Placement: dict
:param Placement: The placement for the instance.
AvailabilityZone (string) --The Availability Zone of the instance.
GroupName (string) --The name of the placement group the instance is in (for cluster compute instances).
Tenancy (string) --The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the ImportInstance command.
HostId (string) --The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.
Affinity (string) --The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.
:type KernelId: string
:param KernelId: The ID of the kernel.
Warning
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide .
:type RamdiskId: string
:param RamdiskId: The ID of the RAM disk.
Warning
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide .
:type BlockDeviceMappings: list
:param BlockDeviceMappings: The block device mapping.
Warning
Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed using this action.
(dict) --Describes a block device mapping.
VirtualName (string) --The virtual device name (ephemeral N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1 .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.
Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.
DeviceName (string) --The device name exposed to the instance (for example, /dev/sdh or xvdh ).
Ebs (dict) --Parameters used to automatically set up EBS volumes when the instance is launched.
SnapshotId (string) --The ID of the snapshot.
VolumeSize (integer) --The size of the volume, in GiB.
Constraints: 1-16384 for General Purpose SSD (gp2 ), 4-16384 for Provisioned IOPS SSD (io1 ), 500-16384 for Throughput Optimized HDD (st1 ), 500-16384 for Cold HDD (sc1 ), and 1-1024 for Magnetic (standard ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.
Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
DeleteOnTermination (boolean) --Indicates whether the EBS volume is deleted on instance termination.
VolumeType (string) --The volume type: gp2 , io1 , st1 , sc1 , or standard .
Default: standard
Iops (integer) --The number of I/O operations per second (IOPS) that the volume supports. For io1 , this represents the number of IOPS that are provisioned for the volume. For gp2 , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide .
Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for gp2 volumes.
Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2 , st1 , sc1 , or standard volumes.
Encrypted (boolean) --Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.
NoDevice (string) --Suppresses the specified device included in the block device mapping of the AMI.
:type Monitoring: dict
:param Monitoring: The monitoring for the instance.
Enabled (boolean) -- [REQUIRED]Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.
:type SubnetId: string
:param SubnetId: [EC2-VPC] The ID of the subnet to launch the instance into.
:type DisableApiTermination: boolean
:param DisableApiTermination: If you set this parameter to true , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute to false after launch, use ModifyInstanceAttribute . Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate , you can terminate the instance by running the shutdown command from the instance.
Default: false
:type InstanceInitiatedShutdownBehavior: string
:param InstanceInitiatedShutdownBehavior: Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
:type PrivateIpAddress: string
:param PrivateIpAddress: [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.
Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.
:type Ipv6Addresses: list
:param Ipv6Addresses: [EC2-VPC] Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
(dict) --Describes an IPv6 address.
Ipv6Address (string) --The IPv6 address.
:type Ipv6AddressCount: integer
:param Ipv6AddressCount: [EC2-VPC] A number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
:type ClientToken: string
:param ClientToken: Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency .
Constraints: Maximum 64 ASCII characters
:type AdditionalInfo: string
:param AdditionalInfo: Reserved.
:type NetworkInterfaces: list
:param NetworkInterfaces: One or more network interfaces.
(dict) --Describes a network interface.
NetworkInterfaceId (string) --The ID of the network interface.
DeviceIndex (integer) --The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a RunInstances request, you must provide the device index.
SubnetId (string) --The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
Description (string) --The description of the network interface. Applies only if creating a network interface when launching an instance.
PrivateIpAddress (string) --The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.
Groups (list) --The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
(string) --
DeleteOnTermination (boolean) --If set to true , the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.
PrivateIpAddresses (list) --One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.
(dict) --Describes a secondary private IPv4 address for a network interface.
PrivateIpAddress (string) -- [REQUIRED]The private IPv4 addresses.
Primary (boolean) --Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.
SecondaryPrivateIpAddressCount (integer) --The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.
AssociatePublicIpAddress (boolean) --Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true .
Ipv6Addresses (list) --One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
(dict) --Describes an IPv6 address.
Ipv6Address (string) --The IPv6 address.
Ipv6AddressCount (integer) --A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
:type IamInstanceProfile: dict
:param IamInstanceProfile: The IAM instance profile.
Arn (string) --The Amazon Resource Name (ARN) of the instance profile.
Name (string) --The name of the instance profile.
:type EbsOptimized: boolean
:param EbsOptimized: Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.
Default: false
:type TagSpecifications: list
:param TagSpecifications: The tags to apply to the resources during launch. You can tag instances and volumes. The specified tags are applied to all instances or volumes that are created during launch.
(dict) --The tags to apply to a resource when the resource is being created.
ResourceType (string) --The type of resource to tag. Currently, the resource types that support tagging on creation are instance and volume .
Tags (list) --The tags to apply to the resource.
(dict) --Describes a tag.
Key (string) --The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:
Value (string) --The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
:rtype: dict
:return: {
'ReservationId': 'string',
'OwnerId': 'string',
'RequesterId': 'string',
'Groups': [
{
'GroupName': 'string',
'GroupId': 'string'
},
],
'Instances': [
{
'InstanceId': 'string',
'ImageId': 'string',
'State': {
'Code': 123,
'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
},
'PrivateDnsName': 'string',
'PublicDnsName': 'string',
'StateTransitionReason': 'string',
'KeyName': 'string',
'AmiLaunchIndex': 123,
'ProductCodes': [
{
'ProductCodeId': 'string',
'ProductCodeType': 'devpay'|'marketplace'
},
],
'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
'LaunchTime': datetime(2015, 1, 1),
'Placement': {
'AvailabilityZone': 'string',
'GroupName': 'string',
'Tenancy': 'default'|'dedicated'|'host',
'HostId': 'string',
'Affinity': 'string'
},
'KernelId': 'string',
'RamdiskId': 'string',
'Platform': 'Windows',
'Monitoring': {
'State': 'disabled'|'disabling'|'enabled'|'pending'
},
'SubnetId': 'string',
'VpcId': 'string',
'PrivateIpAddress': 'string',
'PublicIpAddress': 'string',
'StateReason': {
'Code': 'string',
'Message': 'string'
},
'Architecture': 'i386'|'x86_64',
'RootDeviceType': 'ebs'|'instance-store',
'RootDeviceName': 'string',
'BlockDeviceMappings': [
{
'DeviceName': 'string',
'Ebs': {
'VolumeId': 'string',
'Status': 'attaching'|'attached'|'detaching'|'detached',
'AttachTime': datetime(2015, 1, 1),
'DeleteOnTermination': True|False
}
},
],
'VirtualizationType': 'hvm'|'paravirtual',
'InstanceLifecycle': 'spot'|'scheduled',
'SpotInstanceRequestId': 'string',
'ClientToken': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'SecurityGroups': [
{
'GroupName': 'string',
'GroupId': 'string'
},
],
'SourceDestCheck': True|False,
'Hypervisor': 'ovm'|'xen',
'NetworkInterfaces': [
{
'NetworkInterfaceId': 'string',
'SubnetId': 'string',
'VpcId': 'string',
'Description': 'string',
'OwnerId': 'string',
'Status': 'available'|'attaching'|'in-use'|'detaching',
'MacAddress': 'string',
'PrivateIpAddress': 'string',
'PrivateDnsName': 'string',
'SourceDestCheck': True|False,
'Groups': [
{
'GroupName': 'string',
'GroupId': 'string'
},
],
'Attachment': {
'AttachmentId': 'string',
'DeviceIndex': 123,
'Status': 'attaching'|'attached'|'detaching'|'detached',
'AttachTime': datetime(2015, 1, 1),
'DeleteOnTermination': True|False
},
'Association': {
'PublicIp': 'string',
'PublicDnsName': 'string',
'IpOwnerId': 'string'
},
'PrivateIpAddresses': [
{
'PrivateIpAddress': 'string',
'PrivateDnsName': 'string',
'Primary': True|False,
'Association': {
'PublicIp': 'string',
'PublicDnsName': 'string',
'IpOwnerId': 'string'
}
},
],
'Ipv6Addresses': [
{
'Ipv6Address': 'string'
},
]
},
],
'IamInstanceProfile': {
'Arn': 'string',
'Id': 'string'
},
'EbsOptimized': True|False,
'SriovNetSupport': 'string',
'EnaSupport': True|False
},
]
}
:returns:
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
ImageId (string) -- [REQUIRED]
The ID of the AMI, which you can get by calling DescribeImages .
MinCount (integer) -- [REQUIRED]
The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
MaxCount (integer) -- [REQUIRED]
The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount .
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.
KeyName (string) -- The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair .
Warning
If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.
SecurityGroups (list) -- [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.
Default: Amazon EC2 uses the default security group.
(string) --
SecurityGroupIds (list) -- One or more security group IDs. You can create a security group using CreateSecurityGroup .
Default: Amazon EC2 uses the default security group.
(string) --
UserData (string) -- The user data to make available to the instance. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.
This value will be base64 encoded automatically. Do not base64 encode this value prior to performing the operation.
InstanceType (string) -- The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide .
Default: m1.small
Placement (dict) -- The placement for the instance.
AvailabilityZone (string) --The Availability Zone of the instance.
GroupName (string) --The name of the placement group the instance is in (for cluster compute instances).
Tenancy (string) --The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the ImportInstance command.
HostId (string) --The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.
Affinity (string) --The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.
KernelId (string) -- The ID of the kernel.
Warning
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide .
RamdiskId (string) -- The ID of the RAM disk.
Warning
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide .
BlockDeviceMappings (list) -- The block device mapping.
Warning
Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed using this action.
(dict) --Describes a block device mapping.
VirtualName (string) --The virtual device name (ephemeral N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1 .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.
Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.
DeviceName (string) --The device name exposed to the instance (for example, /dev/sdh or xvdh ).
Ebs (dict) --Parameters used to automatically set up EBS volumes when the instance is launched.
SnapshotId (string) --The ID of the snapshot.
VolumeSize (integer) --The size of the volume, in GiB.
Constraints: 1-16384 for General Purpose SSD (gp2 ), 4-16384 for Provisioned IOPS SSD (io1 ), 500-16384 for Throughput Optimized HDD (st1 ), 500-16384 for Cold HDD (sc1 ), and 1-1024 for Magnetic (standard ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.
Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
DeleteOnTermination (boolean) --Indicates whether the EBS volume is deleted on instance termination.
VolumeType (string) --The volume type: gp2 , io1 , st1 , sc1 , or standard .
Default: standard
Iops (integer) --The number of I/O operations per second (IOPS) that the volume supports. For io1 , this represents the number of IOPS that are provisioned for the volume. For gp2 , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide .
Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for gp2 volumes.
Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2 , st1 , sc1 , or standard volumes.
Encrypted (boolean) --Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.
NoDevice (string) --Suppresses the specified device included in the block device mapping of the AMI.
Monitoring (dict) -- The monitoring for the instance.
Enabled (boolean) -- [REQUIRED]Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.
SubnetId (string) -- [EC2-VPC] The ID of the subnet to launch the instance into.
DisableApiTermination (boolean) -- If you set this parameter to true , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute to false after launch, use ModifyInstanceAttribute . Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate , you can terminate the instance by running the shutdown command from the instance.
Default: false
InstanceInitiatedShutdownBehavior (string) -- Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
PrivateIpAddress (string) -- [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.
Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.
Ipv6Addresses (list) -- [EC2-VPC] Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
(dict) --Describes an IPv6 address.
Ipv6Address (string) --The IPv6 address.
Ipv6AddressCount (integer) -- [EC2-VPC] A number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
ClientToken (string) -- Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency .
Constraints: Maximum 64 ASCII characters
AdditionalInfo (string) -- Reserved.
NetworkInterfaces (list) -- One or more network interfaces.
(dict) --Describes a network interface.
NetworkInterfaceId (string) --The ID of the network interface.
DeviceIndex (integer) --The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a RunInstances request, you must provide the device index.
SubnetId (string) --The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
Description (string) --The description of the network interface. Applies only if creating a network interface when launching an instance.
PrivateIpAddress (string) --The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.
Groups (list) --The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
(string) --
DeleteOnTermination (boolean) --If set to true , the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.
PrivateIpAddresses (list) --One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.
(dict) --Describes a secondary private IPv4 address for a network interface.
PrivateIpAddress (string) -- [REQUIRED]The private IPv4 addresses.
Primary (boolean) --Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.
SecondaryPrivateIpAddressCount (integer) --The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.
AssociatePublicIpAddress (boolean) --Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true .
Ipv6Addresses (list) --One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
(dict) --Describes an IPv6 address.
Ipv6Address (string) --The IPv6 address.
Ipv6AddressCount (integer) --A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
IamInstanceProfile (dict) -- The IAM instance profile.
Arn (string) --The Amazon Resource Name (ARN) of the instance profile.
Name (string) --The name of the instance profile.
EbsOptimized (boolean) -- Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.
Default: false
TagSpecifications (list) -- The tags to apply to the resources during launch. You can tag instances and volumes. The specified tags are applied to all instances or volumes that are created during launch.
(dict) --The tags to apply to a resource when the resource is being created.
ResourceType (string) --The type of resource to tag. Currently, the resource types that support tagging on creation are instance and volume .
Tags (list) --The tags to apply to the resource.
(dict) --Describes a tag.
Key (string) --The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:
Value (string) --The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
"""
pass | Launches the specified number of instances using an AMI for which you have permissions.
You can specify a number of options, or leave the default options. The following rules apply:
To ensure faster instance launches, break up large requests into smaller batches. For example, create 5 separate launch requests for 100 instances each instead of 1 launch request for 500 instances.
An instance is ready for you to use when it's in the running state. You can check the state of your instance using DescribeInstances . You can tag instances and EBS volumes during launch, after launch, or both. For more information, see CreateTags and Tagging Your Amazon EC2 Resources .
Linux instances have access to the public key of the key pair at boot. You can use this key to provide secure access to the instance. Amazon EC2 public images use this feature to provide secure access without passwords. For more information, see Key Pairs in the Amazon Elastic Compute Cloud User Guide .
For troubleshooting, see What To Do If An Instance Immediately Terminates , and Troubleshooting Connecting to Your Instance in the Amazon Elastic Compute Cloud User Guide .
See also: AWS API Documentation
:example: response = client.run_instances(
DryRun=True|False,
ImageId='string',
MinCount=123,
MaxCount=123,
KeyName='string',
SecurityGroups=[
'string',
],
SecurityGroupIds=[
'string',
],
UserData='string',
InstanceType='t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
Placement={
'AvailabilityZone': 'string',
'GroupName': 'string',
'Tenancy': 'default'|'dedicated'|'host',
'HostId': 'string',
'Affinity': 'string'
},
KernelId='string',
RamdiskId='string',
BlockDeviceMappings=[
{
'VirtualName': 'string',
'DeviceName': 'string',
'Ebs': {
'SnapshotId': 'string',
'VolumeSize': 123,
'DeleteOnTermination': True|False,
'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1',
'Iops': 123,
'Encrypted': True|False
},
'NoDevice': 'string'
},
],
Monitoring={
'Enabled': True|False
},
SubnetId='string',
DisableApiTermination=True|False,
InstanceInitiatedShutdownBehavior='stop'|'terminate',
PrivateIpAddress='string',
Ipv6Addresses=[
{
'Ipv6Address': 'string'
},
],
Ipv6AddressCount=123,
ClientToken='string',
AdditionalInfo='string',
NetworkInterfaces=[
{
'NetworkInterfaceId': 'string',
'DeviceIndex': 123,
'SubnetId': 'string',
'Description': 'string',
'PrivateIpAddress': 'string',
'Groups': [
'string',
],
'DeleteOnTermination': True|False,
'PrivateIpAddresses': [
{
'PrivateIpAddress': 'string',
'Primary': True|False
},
],
'SecondaryPrivateIpAddressCount': 123,
'AssociatePublicIpAddress': True|False,
'Ipv6Addresses': [
{
'Ipv6Address': 'string'
},
],
'Ipv6AddressCount': 123
},
],
IamInstanceProfile={
'Arn': 'string',
'Name': 'string'
},
EbsOptimized=True|False,
TagSpecifications=[
{
'ResourceType': 'customer-gateway'|'dhcp-options'|'image'|'instance'|'internet-gateway'|'network-acl'|'network-interface'|'reserved-instances'|'route-table'|'snapshot'|'spot-instances-request'|'subnet'|'security-group'|'volume'|'vpc'|'vpn-connection'|'vpn-gateway',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
},
]
)
:type DryRun: boolean
:param DryRun: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
:type ImageId: string
:param ImageId: [REQUIRED]
The ID of the AMI, which you can get by calling DescribeImages .
:type MinCount: integer
:param MinCount: [REQUIRED]
The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
:type MaxCount: integer
:param MaxCount: [REQUIRED]
The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount .
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.
:type KeyName: string
:param KeyName: The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair .
Warning
If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.
:type SecurityGroups: list
:param SecurityGroups: [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.
Default: Amazon EC2 uses the default security group.
(string) --
:type SecurityGroupIds: list
:param SecurityGroupIds: One or more security group IDs. You can create a security group using CreateSecurityGroup .
Default: Amazon EC2 uses the default security group.
(string) --
:type UserData: string
:param UserData: The user data to make available to the instance. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.
This value will be base64 encoded automatically. Do not base64 encode this value prior to performing the operation.
:type InstanceType: string
:param InstanceType: The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide .
Default: m1.small
:type Placement: dict
:param Placement: The placement for the instance.
AvailabilityZone (string) --The Availability Zone of the instance.
GroupName (string) --The name of the placement group the instance is in (for cluster compute instances).
Tenancy (string) --The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the ImportInstance command.
HostId (string) --The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.
Affinity (string) --The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.
:type KernelId: string
:param KernelId: The ID of the kernel.
Warning
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide .
:type RamdiskId: string
:param RamdiskId: The ID of the RAM disk.
Warning
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide .
:type BlockDeviceMappings: list
:param BlockDeviceMappings: The block device mapping.
Warning
Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed using this action.
(dict) --Describes a block device mapping.
VirtualName (string) --The virtual device name (ephemeral N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1 .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.
Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.
DeviceName (string) --The device name exposed to the instance (for example, /dev/sdh or xvdh ).
Ebs (dict) --Parameters used to automatically set up EBS volumes when the instance is launched.
SnapshotId (string) --The ID of the snapshot.
VolumeSize (integer) --The size of the volume, in GiB.
Constraints: 1-16384 for General Purpose SSD (gp2 ), 4-16384 for Provisioned IOPS SSD (io1 ), 500-16384 for Throughput Optimized HDD (st1 ), 500-16384 for Cold HDD (sc1 ), and 1-1024 for Magnetic (standard ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.
Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
DeleteOnTermination (boolean) --Indicates whether the EBS volume is deleted on instance termination.
VolumeType (string) --The volume type: gp2 , io1 , st1 , sc1 , or standard .
Default: standard
Iops (integer) --The number of I/O operations per second (IOPS) that the volume supports. For io1 , this represents the number of IOPS that are provisioned for the volume. For gp2 , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide .
Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for gp2 volumes.
Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2 , st1 , sc1 , or standard volumes.
Encrypted (boolean) --Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.
NoDevice (string) --Suppresses the specified device included in the block device mapping of the AMI.
:type Monitoring: dict
:param Monitoring: The monitoring for the instance.
Enabled (boolean) -- [REQUIRED]Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.
:type SubnetId: string
:param SubnetId: [EC2-VPC] The ID of the subnet to launch the instance into.
:type DisableApiTermination: boolean
:param DisableApiTermination: If you set this parameter to true , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute to false after launch, use ModifyInstanceAttribute . Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate , you can terminate the instance by running the shutdown command from the instance.
Default: false
:type InstanceInitiatedShutdownBehavior: string
:param InstanceInitiatedShutdownBehavior: Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
:type PrivateIpAddress: string
:param PrivateIpAddress: [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.
Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.
:type Ipv6Addresses: list
:param Ipv6Addresses: [EC2-VPC] Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
(dict) --Describes an IPv6 address.
Ipv6Address (string) --The IPv6 address.
:type Ipv6AddressCount: integer
:param Ipv6AddressCount: [EC2-VPC] A number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
:type ClientToken: string
:param ClientToken: Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency .
Constraints: Maximum 64 ASCII characters
:type AdditionalInfo: string
:param AdditionalInfo: Reserved.
:type NetworkInterfaces: list
:param NetworkInterfaces: One or more network interfaces.
(dict) --Describes a network interface.
NetworkInterfaceId (string) --The ID of the network interface.
DeviceIndex (integer) --The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a RunInstances request, you must provide the device index.
SubnetId (string) --The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
Description (string) --The description of the network interface. Applies only if creating a network interface when launching an instance.
PrivateIpAddress (string) --The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.
Groups (list) --The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
(string) --
DeleteOnTermination (boolean) --If set to true , the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.
PrivateIpAddresses (list) --One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.
(dict) --Describes a secondary private IPv4 address for a network interface.
PrivateIpAddress (string) -- [REQUIRED]The private IPv4 addresses.
Primary (boolean) --Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.
SecondaryPrivateIpAddressCount (integer) --The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.
AssociatePublicIpAddress (boolean) --Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true .
Ipv6Addresses (list) --One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
(dict) --Describes an IPv6 address.
Ipv6Address (string) --The IPv6 address.
Ipv6AddressCount (integer) --A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
:type IamInstanceProfile: dict
:param IamInstanceProfile: The IAM instance profile.
Arn (string) --The Amazon Resource Name (ARN) of the instance profile.
Name (string) --The name of the instance profile.
:type EbsOptimized: boolean
:param EbsOptimized: Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.
Default: false
:type TagSpecifications: list
:param TagSpecifications: The tags to apply to the resources during launch. You can tag instances and volumes. The specified tags are applied to all instances or volumes that are created during launch.
(dict) --The tags to apply to a resource when the resource is being created.
ResourceType (string) --The type of resource to tag. Currently, the resource types that support tagging on creation are instance and volume .
Tags (list) --The tags to apply to the resource.
(dict) --Describes a tag.
Key (string) --The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:
Value (string) --The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
:rtype: dict
:return: {
'ReservationId': 'string',
'OwnerId': 'string',
'RequesterId': 'string',
'Groups': [
{
'GroupName': 'string',
'GroupId': 'string'
},
],
'Instances': [
{
'InstanceId': 'string',
'ImageId': 'string',
'State': {
'Code': 123,
'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
},
'PrivateDnsName': 'string',
'PublicDnsName': 'string',
'StateTransitionReason': 'string',
'KeyName': 'string',
'AmiLaunchIndex': 123,
'ProductCodes': [
{
'ProductCodeId': 'string',
'ProductCodeType': 'devpay'|'marketplace'
},
],
'InstanceType': 't1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'x1.16xlarge'|'x1.32xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'f1.2xlarge'|'f1.16xlarge',
'LaunchTime': datetime(2015, 1, 1),
'Placement': {
'AvailabilityZone': 'string',
'GroupName': 'string',
'Tenancy': 'default'|'dedicated'|'host',
'HostId': 'string',
'Affinity': 'string'
},
'KernelId': 'string',
'RamdiskId': 'string',
'Platform': 'Windows',
'Monitoring': {
'State': 'disabled'|'disabling'|'enabled'|'pending'
},
'SubnetId': 'string',
'VpcId': 'string',
'PrivateIpAddress': 'string',
'PublicIpAddress': 'string',
'StateReason': {
'Code': 'string',
'Message': 'string'
},
'Architecture': 'i386'|'x86_64',
'RootDeviceType': 'ebs'|'instance-store',
'RootDeviceName': 'string',
'BlockDeviceMappings': [
{
'DeviceName': 'string',
'Ebs': {
'VolumeId': 'string',
'Status': 'attaching'|'attached'|'detaching'|'detached',
'AttachTime': datetime(2015, 1, 1),
'DeleteOnTermination': True|False
}
},
],
'VirtualizationType': 'hvm'|'paravirtual',
'InstanceLifecycle': 'spot'|'scheduled',
'SpotInstanceRequestId': 'string',
'ClientToken': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'SecurityGroups': [
{
'GroupName': 'string',
'GroupId': 'string'
},
],
'SourceDestCheck': True|False,
'Hypervisor': 'ovm'|'xen',
'NetworkInterfaces': [
{
'NetworkInterfaceId': 'string',
'SubnetId': 'string',
'VpcId': 'string',
'Description': 'string',
'OwnerId': 'string',
'Status': 'available'|'attaching'|'in-use'|'detaching',
'MacAddress': 'string',
'PrivateIpAddress': 'string',
'PrivateDnsName': 'string',
'SourceDestCheck': True|False,
'Groups': [
{
'GroupName': 'string',
'GroupId': 'string'
},
],
'Attachment': {
'AttachmentId': 'string',
'DeviceIndex': 123,
'Status': 'attaching'|'attached'|'detaching'|'detached',
'AttachTime': datetime(2015, 1, 1),
'DeleteOnTermination': True|False
},
'Association': {
'PublicIp': 'string',
'PublicDnsName': 'string',
'IpOwnerId': 'string'
},
'PrivateIpAddresses': [
{
'PrivateIpAddress': 'string',
'PrivateDnsName': 'string',
'Primary': True|False,
'Association': {
'PublicIp': 'string',
'PublicDnsName': 'string',
'IpOwnerId': 'string'
}
},
],
'Ipv6Addresses': [
{
'Ipv6Address': 'string'
},
]
},
],
'IamInstanceProfile': {
'Arn': 'string',
'Id': 'string'
},
'EbsOptimized': True|False,
'SriovNetSupport': 'string',
'EnaSupport': True|False
},
]
}
:returns:
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
ImageId (string) -- [REQUIRED]
The ID of the AMI, which you can get by calling DescribeImages .
MinCount (integer) -- [REQUIRED]
The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
MaxCount (integer) -- [REQUIRED]
The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount .
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.
KeyName (string) -- The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair .
Warning
If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.
SecurityGroups (list) -- [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.
Default: Amazon EC2 uses the default security group.
(string) --
SecurityGroupIds (list) -- One or more security group IDs. You can create a security group using CreateSecurityGroup .
Default: Amazon EC2 uses the default security group.
(string) --
UserData (string) -- The user data to make available to the instance. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). If you are using an AWS SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.
This value will be base64 encoded automatically. Do not base64 encode this value prior to performing the operation.
InstanceType (string) -- The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide .
Default: m1.small
Placement (dict) -- The placement for the instance.
AvailabilityZone (string) --The Availability Zone of the instance.
GroupName (string) --The name of the placement group the instance is in (for cluster compute instances).
Tenancy (string) --The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the ImportInstance command.
HostId (string) --The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.
Affinity (string) --The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.
KernelId (string) -- The ID of the kernel.
Warning
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide .
RamdiskId (string) -- The ID of the RAM disk.
Warning
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide .
BlockDeviceMappings (list) -- The block device mapping.
Warning
Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed using this action.
(dict) --Describes a block device mapping.
VirtualName (string) --The virtual device name (ephemeral N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1 .The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.
Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.
DeviceName (string) --The device name exposed to the instance (for example, /dev/sdh or xvdh ).
Ebs (dict) --Parameters used to automatically set up EBS volumes when the instance is launched.
SnapshotId (string) --The ID of the snapshot.
VolumeSize (integer) --The size of the volume, in GiB.
Constraints: 1-16384 for General Purpose SSD (gp2 ), 4-16384 for Provisioned IOPS SSD (io1 ), 500-16384 for Throughput Optimized HDD (st1 ), 500-16384 for Cold HDD (sc1 ), and 1-1024 for Magnetic (standard ) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.
Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
DeleteOnTermination (boolean) --Indicates whether the EBS volume is deleted on instance termination.
VolumeType (string) --The volume type: gp2 , io1 , st1 , sc1 , or standard .
Default: standard
Iops (integer) --The number of I/O operations per second (IOPS) that the volume supports. For io1 , this represents the number of IOPS that are provisioned for the volume. For gp2 , this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide .
Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for gp2 volumes.
Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2 , st1 , sc1 , or standard volumes.
Encrypted (boolean) --Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.
NoDevice (string) --Suppresses the specified device included in the block device mapping of the AMI.
Monitoring (dict) -- The monitoring for the instance.
Enabled (boolean) -- [REQUIRED]Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.
SubnetId (string) -- [EC2-VPC] The ID of the subnet to launch the instance into.
DisableApiTermination (boolean) -- If you set this parameter to true , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute to false after launch, use ModifyInstanceAttribute . Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate , you can terminate the instance by running the shutdown command from the instance.
Default: false
InstanceInitiatedShutdownBehavior (string) -- Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
PrivateIpAddress (string) -- [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.
Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.
Ipv6Addresses (list) -- [EC2-VPC] Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
(dict) --Describes an IPv6 address.
Ipv6Address (string) --The IPv6 address.
Ipv6AddressCount (integer) -- [EC2-VPC] A number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
ClientToken (string) -- Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency .
Constraints: Maximum 64 ASCII characters
AdditionalInfo (string) -- Reserved.
NetworkInterfaces (list) -- One or more network interfaces.
(dict) --Describes a network interface.
NetworkInterfaceId (string) --The ID of the network interface.
DeviceIndex (integer) --The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a RunInstances request, you must provide the device index.
SubnetId (string) --The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
Description (string) --The description of the network interface. Applies only if creating a network interface when launching an instance.
PrivateIpAddress (string) --The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.
Groups (list) --The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
(string) --
DeleteOnTermination (boolean) --If set to true , the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.
PrivateIpAddresses (list) --One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.
(dict) --Describes a secondary private IPv4 address for a network interface.
PrivateIpAddress (string) -- [REQUIRED]The private IPv4 addresses.
Primary (boolean) --Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.
SecondaryPrivateIpAddressCount (integer) --The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.
AssociatePublicIpAddress (boolean) --Indicates whether to assign a public IPv4 address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true .
Ipv6Addresses (list) --One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
(dict) --Describes an IPv6 address.
Ipv6Address (string) --The IPv6 address.
Ipv6AddressCount (integer) --A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
IamInstanceProfile (dict) -- The IAM instance profile.
Arn (string) --The Amazon Resource Name (ARN) of the instance profile.
Name (string) --The name of the instance profile.
EbsOptimized (boolean) -- Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.
Default: false
TagSpecifications (list) -- The tags to apply to the resources during launch. You can tag instances and volumes. The specified tags are applied to all instances or volumes that are created during launch.
(dict) --The tags to apply to a resource when the resource is being created.
ResourceType (string) --The type of resource to tag. Currently, the resource types that support tagging on creation are instance and volume .
Tags (list) --The tags to apply to the resource.
(dict) --Describes a tag.
Key (string) --The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:
Value (string) --The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters. | entailment |
def create_environment(ApplicationName=None, EnvironmentName=None, GroupName=None, Description=None, CNAMEPrefix=None, Tier=None, Tags=None, VersionLabel=None, TemplateName=None, SolutionStackName=None, PlatformArn=None, OptionSettings=None, OptionsToRemove=None):
"""
Launches an environment for the specified application using the specified configuration.
See also: AWS API Documentation
Examples
The following operation creates a new environment for version v1 of a java application named my-app:
Expected Output:
:example: response = client.create_environment(
ApplicationName='string',
EnvironmentName='string',
GroupName='string',
Description='string',
CNAMEPrefix='string',
Tier={
'Name': 'string',
'Type': 'string',
'Version': 'string'
},
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
VersionLabel='string',
TemplateName='string',
SolutionStackName='string',
PlatformArn='string',
OptionSettings=[
{
'ResourceName': 'string',
'Namespace': 'string',
'OptionName': 'string',
'Value': 'string'
},
],
OptionsToRemove=[
{
'ResourceName': 'string',
'Namespace': 'string',
'OptionName': 'string'
},
]
)
:type ApplicationName: string
:param ApplicationName: [REQUIRED]
The name of the application that contains the version to be deployed.
If no application is found with this name, CreateEnvironment returns an InvalidParameterValue error.
:type EnvironmentName: string
:param EnvironmentName: A unique name for the deployment environment. Used in the application URL.
Constraint: Must be from 4 to 40 characters in length. The name can contain only letters, numbers, and hyphens. It cannot start or end with a hyphen. This name must be unique in your account. If the specified name already exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.
Default: If the CNAME parameter is not specified, the environment name becomes part of the CNAME, and therefore part of the visible URL for your application.
:type GroupName: string
:param GroupName: The name of the group to which the target environment belongs. Specify a group name only if the environment's name is specified in an environment manifest and not with the environment name parameter. See Environment Manifest (env.yaml) for details.
:type Description: string
:param Description: Describes this environment.
:type CNAMEPrefix: string
:param CNAMEPrefix: If specified, the environment attempts to use this value as the prefix for the CNAME. If not specified, the CNAME is generated automatically by appending a random alphanumeric string to the environment name.
:type Tier: dict
:param Tier: This specifies the tier to use for creating this environment.
Name (string) --The name of this environment tier.
Type (string) --The type of this environment tier.
Version (string) --The version of this environment tier.
:type Tags: list
:param Tags: This specifies the tags applied to resources in the environment.
(dict) --Describes a tag applied to a resource in an environment.
Key (string) --The key of the tag.
Value (string) --The value of the tag.
:type VersionLabel: string
:param VersionLabel: The name of the application version to deploy.
If the specified application has no associated application versions, AWS Elastic Beanstalk UpdateEnvironment returns an InvalidParameterValue error.
Default: If not specified, AWS Elastic Beanstalk attempts to launch the sample application in the container.
:type TemplateName: string
:param TemplateName: The name of the configuration template to use in deployment. If no configuration template is found with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.
:type SolutionStackName: string
:param SolutionStackName: This is an alternative to specifying a template name. If specified, AWS Elastic Beanstalk sets the configuration values to the default values associated with the specified solution stack.
:type PlatformArn: string
:param PlatformArn: The ARN of the custom platform.
:type OptionSettings: list
:param OptionSettings: If specified, AWS Elastic Beanstalk sets the specified configuration options to the requested value in the configuration set for the new environment. These override the values obtained from the solution stack or the configuration template.
(dict) --A specification identifying an individual configuration option along with its current value. For a list of possible option values, go to Option Values in the AWS Elastic Beanstalk Developer Guide .
ResourceName (string) --A unique resource name for a time-based scaling configuration option.
Namespace (string) --A unique namespace identifying the option's associated AWS resource.
OptionName (string) --The name of the configuration option.
Value (string) --The current value for the configuration option.
:type OptionsToRemove: list
:param OptionsToRemove: A list of custom user-defined configuration options to remove from the configuration set for this new environment.
(dict) --A specification identifying an individual configuration option.
ResourceName (string) --A unique resource name for a time-based scaling configuration option.
Namespace (string) --A unique namespace identifying the option's associated AWS resource.
OptionName (string) --The name of the configuration option.
:rtype: dict
:return: {
'EnvironmentName': 'string',
'EnvironmentId': 'string',
'ApplicationName': 'string',
'VersionLabel': 'string',
'SolutionStackName': 'string',
'PlatformArn': 'string',
'TemplateName': 'string',
'Description': 'string',
'EndpointURL': 'string',
'CNAME': 'string',
'DateCreated': datetime(2015, 1, 1),
'DateUpdated': datetime(2015, 1, 1),
'Status': 'Launching'|'Updating'|'Ready'|'Terminating'|'Terminated',
'AbortableOperationInProgress': True|False,
'Health': 'Green'|'Yellow'|'Red'|'Grey',
'HealthStatus': 'NoData'|'Unknown'|'Pending'|'Ok'|'Info'|'Warning'|'Degraded'|'Severe',
'Resources': {
'LoadBalancer': {
'LoadBalancerName': 'string',
'Domain': 'string',
'Listeners': [
{
'Protocol': 'string',
'Port': 123
},
]
}
},
'Tier': {
'Name': 'string',
'Type': 'string',
'Version': 'string'
},
'EnvironmentLinks': [
{
'LinkName': 'string',
'EnvironmentName': 'string'
},
]
}
:returns:
Launching : Environment is in the process of initial deployment.
Updating : Environment is in the process of updating its configuration settings or application version.
Ready : Environment is available to have an action performed on it, such as update or terminate.
Terminating : Environment is in the shut-down process.
Terminated : Environment is not running.
"""
pass | Launches an environment for the specified application using the specified configuration.
See also: AWS API Documentation
Examples
The following operation creates a new environment for version v1 of a java application named my-app:
Expected Output:
:example: response = client.create_environment(
ApplicationName='string',
EnvironmentName='string',
GroupName='string',
Description='string',
CNAMEPrefix='string',
Tier={
'Name': 'string',
'Type': 'string',
'Version': 'string'
},
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
VersionLabel='string',
TemplateName='string',
SolutionStackName='string',
PlatformArn='string',
OptionSettings=[
{
'ResourceName': 'string',
'Namespace': 'string',
'OptionName': 'string',
'Value': 'string'
},
],
OptionsToRemove=[
{
'ResourceName': 'string',
'Namespace': 'string',
'OptionName': 'string'
},
]
)
:type ApplicationName: string
:param ApplicationName: [REQUIRED]
The name of the application that contains the version to be deployed.
If no application is found with this name, CreateEnvironment returns an InvalidParameterValue error.
:type EnvironmentName: string
:param EnvironmentName: A unique name for the deployment environment. Used in the application URL.
Constraint: Must be from 4 to 40 characters in length. The name can contain only letters, numbers, and hyphens. It cannot start or end with a hyphen. This name must be unique in your account. If the specified name already exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.
Default: If the CNAME parameter is not specified, the environment name becomes part of the CNAME, and therefore part of the visible URL for your application.
:type GroupName: string
:param GroupName: The name of the group to which the target environment belongs. Specify a group name only if the environment's name is specified in an environment manifest and not with the environment name parameter. See Environment Manifest (env.yaml) for details.
:type Description: string
:param Description: Describes this environment.
:type CNAMEPrefix: string
:param CNAMEPrefix: If specified, the environment attempts to use this value as the prefix for the CNAME. If not specified, the CNAME is generated automatically by appending a random alphanumeric string to the environment name.
:type Tier: dict
:param Tier: This specifies the tier to use for creating this environment.
Name (string) --The name of this environment tier.
Type (string) --The type of this environment tier.
Version (string) --The version of this environment tier.
:type Tags: list
:param Tags: This specifies the tags applied to resources in the environment.
(dict) --Describes a tag applied to a resource in an environment.
Key (string) --The key of the tag.
Value (string) --The value of the tag.
:type VersionLabel: string
:param VersionLabel: The name of the application version to deploy.
If the specified application has no associated application versions, AWS Elastic Beanstalk UpdateEnvironment returns an InvalidParameterValue error.
Default: If not specified, AWS Elastic Beanstalk attempts to launch the sample application in the container.
:type TemplateName: string
:param TemplateName: The name of the configuration template to use in deployment. If no configuration template is found with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.
:type SolutionStackName: string
:param SolutionStackName: This is an alternative to specifying a template name. If specified, AWS Elastic Beanstalk sets the configuration values to the default values associated with the specified solution stack.
:type PlatformArn: string
:param PlatformArn: The ARN of the custom platform.
:type OptionSettings: list
:param OptionSettings: If specified, AWS Elastic Beanstalk sets the specified configuration options to the requested value in the configuration set for the new environment. These override the values obtained from the solution stack or the configuration template.
(dict) --A specification identifying an individual configuration option along with its current value. For a list of possible option values, go to Option Values in the AWS Elastic Beanstalk Developer Guide .
ResourceName (string) --A unique resource name for a time-based scaling configuration option.
Namespace (string) --A unique namespace identifying the option's associated AWS resource.
OptionName (string) --The name of the configuration option.
Value (string) --The current value for the configuration option.
:type OptionsToRemove: list
:param OptionsToRemove: A list of custom user-defined configuration options to remove from the configuration set for this new environment.
(dict) --A specification identifying an individual configuration option.
ResourceName (string) --A unique resource name for a time-based scaling configuration option.
Namespace (string) --A unique namespace identifying the option's associated AWS resource.
OptionName (string) --The name of the configuration option.
:rtype: dict
:return: {
'EnvironmentName': 'string',
'EnvironmentId': 'string',
'ApplicationName': 'string',
'VersionLabel': 'string',
'SolutionStackName': 'string',
'PlatformArn': 'string',
'TemplateName': 'string',
'Description': 'string',
'EndpointURL': 'string',
'CNAME': 'string',
'DateCreated': datetime(2015, 1, 1),
'DateUpdated': datetime(2015, 1, 1),
'Status': 'Launching'|'Updating'|'Ready'|'Terminating'|'Terminated',
'AbortableOperationInProgress': True|False,
'Health': 'Green'|'Yellow'|'Red'|'Grey',
'HealthStatus': 'NoData'|'Unknown'|'Pending'|'Ok'|'Info'|'Warning'|'Degraded'|'Severe',
'Resources': {
'LoadBalancer': {
'LoadBalancerName': 'string',
'Domain': 'string',
'Listeners': [
{
'Protocol': 'string',
'Port': 123
},
]
}
},
'Tier': {
'Name': 'string',
'Type': 'string',
'Version': 'string'
},
'EnvironmentLinks': [
{
'LinkName': 'string',
'EnvironmentName': 'string'
},
]
}
:returns:
Launching : Environment is in the process of initial deployment.
Updating : Environment is in the process of updating its configuration settings or application version.
Ready : Environment is available to have an action performed on it, such as update or terminate.
Terminating : Environment is in the shut-down process.
Terminated : Environment is not running. | entailment |
def describe_events(ApplicationName=None, VersionLabel=None, TemplateName=None, EnvironmentId=None, EnvironmentName=None, PlatformArn=None, RequestId=None, Severity=None, StartTime=None, EndTime=None, MaxRecords=None, NextToken=None):
"""
Returns list of event descriptions matching criteria up to the last 6 weeks.
See also: AWS API Documentation
Examples
The following operation retrieves events for an environment named my-env:
Expected Output:
:example: response = client.describe_events(
ApplicationName='string',
VersionLabel='string',
TemplateName='string',
EnvironmentId='string',
EnvironmentName='string',
PlatformArn='string',
RequestId='string',
Severity='TRACE'|'DEBUG'|'INFO'|'WARN'|'ERROR'|'FATAL',
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
MaxRecords=123,
NextToken='string'
)
:type ApplicationName: string
:param ApplicationName: If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those associated with this application.
:type VersionLabel: string
:param VersionLabel: If specified, AWS Elastic Beanstalk restricts the returned descriptions to those associated with this application version.
:type TemplateName: string
:param TemplateName: If specified, AWS Elastic Beanstalk restricts the returned descriptions to those that are associated with this environment configuration.
:type EnvironmentId: string
:param EnvironmentId: If specified, AWS Elastic Beanstalk restricts the returned descriptions to those associated with this environment.
:type EnvironmentName: string
:param EnvironmentName: If specified, AWS Elastic Beanstalk restricts the returned descriptions to those associated with this environment.
:type PlatformArn: string
:param PlatformArn: The ARN of the version of the custom platform.
:type RequestId: string
:param RequestId: If specified, AWS Elastic Beanstalk restricts the described events to include only those associated with this request ID.
:type Severity: string
:param Severity: If specified, limits the events returned from this call to include only those with the specified severity or higher.
:type StartTime: datetime
:param StartTime: If specified, AWS Elastic Beanstalk restricts the returned descriptions to those that occur on or after this time.
:type EndTime: datetime
:param EndTime: If specified, AWS Elastic Beanstalk restricts the returned descriptions to those that occur up to, but not including, the EndTime .
:type MaxRecords: integer
:param MaxRecords: Specifies the maximum number of events that can be returned, beginning with the most recent event.
:type NextToken: string
:param NextToken: Pagination token. If specified, the events return the next batch of results.
:rtype: dict
:return: {
'Events': [
{
'EventDate': datetime(2015, 1, 1),
'Message': 'string',
'ApplicationName': 'string',
'VersionLabel': 'string',
'TemplateName': 'string',
'EnvironmentName': 'string',
'PlatformArn': 'string',
'RequestId': 'string',
'Severity': 'TRACE'|'DEBUG'|'INFO'|'WARN'|'ERROR'|'FATAL'
},
],
'NextToken': 'string'
}
"""
pass | Returns list of event descriptions matching criteria up to the last 6 weeks.
See also: AWS API Documentation
Examples
The following operation retrieves events for an environment named my-env:
Expected Output:
:example: response = client.describe_events(
ApplicationName='string',
VersionLabel='string',
TemplateName='string',
EnvironmentId='string',
EnvironmentName='string',
PlatformArn='string',
RequestId='string',
Severity='TRACE'|'DEBUG'|'INFO'|'WARN'|'ERROR'|'FATAL',
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
MaxRecords=123,
NextToken='string'
)
:type ApplicationName: string
:param ApplicationName: If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those associated with this application.
:type VersionLabel: string
:param VersionLabel: If specified, AWS Elastic Beanstalk restricts the returned descriptions to those associated with this application version.
:type TemplateName: string
:param TemplateName: If specified, AWS Elastic Beanstalk restricts the returned descriptions to those that are associated with this environment configuration.
:type EnvironmentId: string
:param EnvironmentId: If specified, AWS Elastic Beanstalk restricts the returned descriptions to those associated with this environment.
:type EnvironmentName: string
:param EnvironmentName: If specified, AWS Elastic Beanstalk restricts the returned descriptions to those associated with this environment.
:type PlatformArn: string
:param PlatformArn: The ARN of the version of the custom platform.
:type RequestId: string
:param RequestId: If specified, AWS Elastic Beanstalk restricts the described events to include only those associated with this request ID.
:type Severity: string
:param Severity: If specified, limits the events returned from this call to include only those with the specified severity or higher.
:type StartTime: datetime
:param StartTime: If specified, AWS Elastic Beanstalk restricts the returned descriptions to those that occur on or after this time.
:type EndTime: datetime
:param EndTime: If specified, AWS Elastic Beanstalk restricts the returned descriptions to those that occur up to, but not including, the EndTime .
:type MaxRecords: integer
:param MaxRecords: Specifies the maximum number of events that can be returned, beginning with the most recent event.
:type NextToken: string
:param NextToken: Pagination token. If specified, the events return the next batch of results.
:rtype: dict
:return: {
'Events': [
{
'EventDate': datetime(2015, 1, 1),
'Message': 'string',
'ApplicationName': 'string',
'VersionLabel': 'string',
'TemplateName': 'string',
'EnvironmentName': 'string',
'PlatformArn': 'string',
'RequestId': 'string',
'Severity': 'TRACE'|'DEBUG'|'INFO'|'WARN'|'ERROR'|'FATAL'
},
],
'NextToken': 'string'
} | entailment |
def update_environment(ApplicationName=None, EnvironmentId=None, EnvironmentName=None, GroupName=None, Description=None, Tier=None, VersionLabel=None, TemplateName=None, SolutionStackName=None, PlatformArn=None, OptionSettings=None, OptionsToRemove=None):
"""
Updates the environment description, deploys a new application version, updates the configuration settings to an entirely new configuration template, or updates select configuration option values in the running environment.
Attempting to update both the release and configuration is not allowed and AWS Elastic Beanstalk returns an InvalidParameterCombination error.
When updating the configuration settings to a new template or individual settings, a draft configuration is created and DescribeConfigurationSettings for this environment returns two setting descriptions with different DeploymentStatus values.
See also: AWS API Documentation
Examples
The following operation updates an environment named "my-env" to version "v2" of the application to which it belongs:
Expected Output:
The following operation configures several options in the aws:elb:loadbalancer namespace:
Expected Output:
:example: response = client.update_environment(
ApplicationName='string',
EnvironmentId='string',
EnvironmentName='string',
GroupName='string',
Description='string',
Tier={
'Name': 'string',
'Type': 'string',
'Version': 'string'
},
VersionLabel='string',
TemplateName='string',
SolutionStackName='string',
PlatformArn='string',
OptionSettings=[
{
'ResourceName': 'string',
'Namespace': 'string',
'OptionName': 'string',
'Value': 'string'
},
],
OptionsToRemove=[
{
'ResourceName': 'string',
'Namespace': 'string',
'OptionName': 'string'
},
]
)
:type ApplicationName: string
:param ApplicationName: The name of the application with which the environment is associated.
:type EnvironmentId: string
:param EnvironmentId: The ID of the environment to update.
If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.
Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.
:type EnvironmentName: string
:param EnvironmentName: The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.
Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.
:type GroupName: string
:param GroupName: The name of the group to which the target environment belongs. Specify a group name only if the environment's name is specified in an environment manifest and not with the environment name or environment ID parameters. See Environment Manifest (env.yaml) for details.
:type Description: string
:param Description: If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment.
:type Tier: dict
:param Tier: This specifies the tier to use to update the environment.
Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns InvalidParameterValue error.
Name (string) --The name of this environment tier.
Type (string) --The type of this environment tier.
Version (string) --The version of this environment tier.
:type VersionLabel: string
:param VersionLabel: If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an InvalidParameterValue error.
:type TemplateName: string
:param TemplateName: If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, AWS Elastic Beanstalk returns an InvalidParameterValue error.
:type SolutionStackName: string
:param SolutionStackName: This specifies the platform version that the environment will run after the environment is updated.
:type PlatformArn: string
:param PlatformArn: The ARN of the platform, if used.
:type OptionSettings: list
:param OptionSettings: If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.
(dict) --A specification identifying an individual configuration option along with its current value. For a list of possible option values, go to Option Values in the AWS Elastic Beanstalk Developer Guide .
ResourceName (string) --A unique resource name for a time-based scaling configuration option.
Namespace (string) --A unique namespace identifying the option's associated AWS resource.
OptionName (string) --The name of the configuration option.
Value (string) --The current value for the configuration option.
:type OptionsToRemove: list
:param OptionsToRemove: A list of custom user-defined configuration options to remove from the configuration set for this environment.
(dict) --A specification identifying an individual configuration option.
ResourceName (string) --A unique resource name for a time-based scaling configuration option.
Namespace (string) --A unique namespace identifying the option's associated AWS resource.
OptionName (string) --The name of the configuration option.
:rtype: dict
:return: {
'EnvironmentName': 'string',
'EnvironmentId': 'string',
'ApplicationName': 'string',
'VersionLabel': 'string',
'SolutionStackName': 'string',
'PlatformArn': 'string',
'TemplateName': 'string',
'Description': 'string',
'EndpointURL': 'string',
'CNAME': 'string',
'DateCreated': datetime(2015, 1, 1),
'DateUpdated': datetime(2015, 1, 1),
'Status': 'Launching'|'Updating'|'Ready'|'Terminating'|'Terminated',
'AbortableOperationInProgress': True|False,
'Health': 'Green'|'Yellow'|'Red'|'Grey',
'HealthStatus': 'NoData'|'Unknown'|'Pending'|'Ok'|'Info'|'Warning'|'Degraded'|'Severe',
'Resources': {
'LoadBalancer': {
'LoadBalancerName': 'string',
'Domain': 'string',
'Listeners': [
{
'Protocol': 'string',
'Port': 123
},
]
}
},
'Tier': {
'Name': 'string',
'Type': 'string',
'Version': 'string'
},
'EnvironmentLinks': [
{
'LinkName': 'string',
'EnvironmentName': 'string'
},
]
}
:returns:
Launching : Environment is in the process of initial deployment.
Updating : Environment is in the process of updating its configuration settings or application version.
Ready : Environment is available to have an action performed on it, such as update or terminate.
Terminating : Environment is in the shut-down process.
Terminated : Environment is not running.
"""
pass | Updates the environment description, deploys a new application version, updates the configuration settings to an entirely new configuration template, or updates select configuration option values in the running environment.
Attempting to update both the release and configuration is not allowed and AWS Elastic Beanstalk returns an InvalidParameterCombination error.
When updating the configuration settings to a new template or individual settings, a draft configuration is created and DescribeConfigurationSettings for this environment returns two setting descriptions with different DeploymentStatus values.
See also: AWS API Documentation
Examples
The following operation updates an environment named "my-env" to version "v2" of the application to which it belongs:
Expected Output:
The following operation configures several options in the aws:elb:loadbalancer namespace:
Expected Output:
:example: response = client.update_environment(
ApplicationName='string',
EnvironmentId='string',
EnvironmentName='string',
GroupName='string',
Description='string',
Tier={
'Name': 'string',
'Type': 'string',
'Version': 'string'
},
VersionLabel='string',
TemplateName='string',
SolutionStackName='string',
PlatformArn='string',
OptionSettings=[
{
'ResourceName': 'string',
'Namespace': 'string',
'OptionName': 'string',
'Value': 'string'
},
],
OptionsToRemove=[
{
'ResourceName': 'string',
'Namespace': 'string',
'OptionName': 'string'
},
]
)
:type ApplicationName: string
:param ApplicationName: The name of the application with which the environment is associated.
:type EnvironmentId: string
:param EnvironmentId: The ID of the environment to update.
If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.
Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.
:type EnvironmentName: string
:param EnvironmentName: The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.
Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.
:type GroupName: string
:param GroupName: The name of the group to which the target environment belongs. Specify a group name only if the environment's name is specified in an environment manifest and not with the environment name or environment ID parameters. See Environment Manifest (env.yaml) for details.
:type Description: string
:param Description: If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment.
:type Tier: dict
:param Tier: This specifies the tier to use to update the environment.
Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns InvalidParameterValue error.
Name (string) --The name of this environment tier.
Type (string) --The type of this environment tier.
Version (string) --The version of this environment tier.
:type VersionLabel: string
:param VersionLabel: If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an InvalidParameterValue error.
:type TemplateName: string
:param TemplateName: If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, AWS Elastic Beanstalk returns an InvalidParameterValue error.
:type SolutionStackName: string
:param SolutionStackName: This specifies the platform version that the environment will run after the environment is updated.
:type PlatformArn: string
:param PlatformArn: The ARN of the platform, if used.
:type OptionSettings: list
:param OptionSettings: If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.
(dict) --A specification identifying an individual configuration option along with its current value. For a list of possible option values, go to Option Values in the AWS Elastic Beanstalk Developer Guide .
ResourceName (string) --A unique resource name for a time-based scaling configuration option.
Namespace (string) --A unique namespace identifying the option's associated AWS resource.
OptionName (string) --The name of the configuration option.
Value (string) --The current value for the configuration option.
:type OptionsToRemove: list
:param OptionsToRemove: A list of custom user-defined configuration options to remove from the configuration set for this environment.
(dict) --A specification identifying an individual configuration option.
ResourceName (string) --A unique resource name for a time-based scaling configuration option.
Namespace (string) --A unique namespace identifying the option's associated AWS resource.
OptionName (string) --The name of the configuration option.
:rtype: dict
:return: {
'EnvironmentName': 'string',
'EnvironmentId': 'string',
'ApplicationName': 'string',
'VersionLabel': 'string',
'SolutionStackName': 'string',
'PlatformArn': 'string',
'TemplateName': 'string',
'Description': 'string',
'EndpointURL': 'string',
'CNAME': 'string',
'DateCreated': datetime(2015, 1, 1),
'DateUpdated': datetime(2015, 1, 1),
'Status': 'Launching'|'Updating'|'Ready'|'Terminating'|'Terminated',
'AbortableOperationInProgress': True|False,
'Health': 'Green'|'Yellow'|'Red'|'Grey',
'HealthStatus': 'NoData'|'Unknown'|'Pending'|'Ok'|'Info'|'Warning'|'Degraded'|'Severe',
'Resources': {
'LoadBalancer': {
'LoadBalancerName': 'string',
'Domain': 'string',
'Listeners': [
{
'Protocol': 'string',
'Port': 123
},
]
}
},
'Tier': {
'Name': 'string',
'Type': 'string',
'Version': 'string'
},
'EnvironmentLinks': [
{
'LinkName': 'string',
'EnvironmentName': 'string'
},
]
}
:returns:
Launching : Environment is in the process of initial deployment.
Updating : Environment is in the process of updating its configuration settings or application version.
Ready : Environment is available to have an action performed on it, such as update or terminate.
Terminating : Environment is in the shut-down process.
Terminated : Environment is not running. | entailment |
def create_function(FunctionName=None, Runtime=None, Role=None, Handler=None, Code=None, Description=None, Timeout=None, MemorySize=None, Publish=None, VpcConfig=None, DeadLetterConfig=None, Environment=None, KMSKeyArn=None, TracingConfig=None, Tags=None):
"""
Creates a new Lambda function. The function metadata is created from the request parameters, and the code for the function is provided by a .zip file in the request body. If the function name already exists, the operation will fail. Note that the function name is case-sensitive.
If you are using versioning, you can also publish a version of the Lambda function you are creating using the Publish parameter. For more information about versioning, see AWS Lambda Function Versioning and Aliases .
This operation requires permission for the lambda:CreateFunction action.
See also: AWS API Documentation
Examples
This example creates a Lambda function.
Expected Output:
:example: response = client.create_function(
FunctionName='string',
Runtime='nodejs'|'nodejs4.3'|'nodejs6.10'|'java8'|'python2.7'|'python3.6'|'dotnetcore1.0'|'nodejs4.3-edge',
Role='string',
Handler='string',
Code={
'ZipFile': b'bytes',
'S3Bucket': 'string',
'S3Key': 'string',
'S3ObjectVersion': 'string'
},
Description='string',
Timeout=123,
MemorySize=123,
Publish=True|False,
VpcConfig={
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
]
},
DeadLetterConfig={
'TargetArn': 'string'
},
Environment={
'Variables': {
'string': 'string'
}
},
KMSKeyArn='string',
TracingConfig={
'Mode': 'Active'|'PassThrough'
},
Tags={
'string': 'string'
}
)
:type FunctionName: string
:param FunctionName: [REQUIRED]
The name you want to assign to the function you are uploading. The function names appear in the console and are returned in the ListFunctions API. Function names are used to specify functions to other AWS Lambda API operations, such as Invoke . Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 characters in length.
:type Runtime: string
:param Runtime: [REQUIRED]
The runtime environment for the Lambda function you are uploading.
To use the Python runtime v3.6, set the value to 'python3.6'. To use the Python runtime v2.7, set the value to 'python2.7'. To use the Node.js runtime v6.10, set the value to 'nodejs6.10'. To use the Node.js runtime v4.3, set the value to 'nodejs4.3'.
Note
You can no longer create functions using the v0.10.42 runtime version as of November, 2016. Existing functions will be supported until early 2017, but we recommend you migrate them to either nodejs6.10 or nodejs4.3 runtime version as soon as possible.
:type Role: string
:param Role: [REQUIRED]
The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it executes your function to access any other Amazon Web Services (AWS) resources. For more information, see AWS Lambda: How it Works .
:type Handler: string
:param Handler: [REQUIRED]
The function within your code that Lambda calls to begin execution. For Node.js, it is the module-name .*export* value in your function. For Java, it can be package.class-name::handler or package.class-name . For more information, see Lambda Function Handler (Java) .
:type Code: dict
:param Code: [REQUIRED]
The code for the Lambda function.
ZipFile (bytes) --The contents of your zip file containing your deployment package. If you are using the web API directly, the contents of the zip file must be base64-encoded. If you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the encoding for you. For more information about creating a .zip file, see Execution Permissions in the AWS Lambda Developer Guide .
S3Bucket (string) --Amazon S3 bucket name where the .zip file containing your deployment package is stored. This bucket must reside in the same AWS region where you are creating the Lambda function.
S3Key (string) --The Amazon S3 object (the deployment package) key name you want to upload.
S3ObjectVersion (string) --The Amazon S3 object (the deployment package) version you want to upload.
:type Description: string
:param Description: A short, user-defined function description. Lambda does not use this value. Assign a meaningful description as you see fit.
:type Timeout: integer
:param Timeout: The function execution time at which Lambda should terminate the function. Because the execution time has cost implications, we recommend you set this value based on your expected execution time. The default is 3 seconds.
:type MemorySize: integer
:param MemorySize: The amount of memory, in MB, your Lambda function is given. Lambda uses this memory size to infer the amount of CPU and memory allocated to your function. Your function use-case determines your CPU and memory requirements. For example, a database operation might need less memory compared to an image processing function. The default value is 128 MB. The value must be a multiple of 64 MB.
:type Publish: boolean
:param Publish: This boolean parameter can be used to request AWS Lambda to create the Lambda function and publish a version as an atomic operation.
:type VpcConfig: dict
:param VpcConfig: If your Lambda function accesses resources in a VPC, you provide this parameter identifying the list of security group IDs and subnet IDs. These must belong to the same VPC. You must provide at least one security group and one subnet ID.
SubnetIds (list) --A list of one or more subnet IDs in your VPC.
(string) --
SecurityGroupIds (list) --A list of one or more security groups IDs in your VPC.
(string) --
:type DeadLetterConfig: dict
:param DeadLetterConfig: The parent object that contains the target ARN (Amazon Resource Name) of an Amazon SQS queue or Amazon SNS topic.
TargetArn (string) --The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic you specify as your Dead Letter Queue (DLQ).
:type Environment: dict
:param Environment: The parent object that contains your environment's configuration settings.
Variables (dict) --The key-value pairs that represent your environment's configuration settings.
(string) --
(string) --
:type KMSKeyArn: string
:param KMSKeyArn: The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's environment variables. If not provided, AWS Lambda will use a default service key.
:type TracingConfig: dict
:param TracingConfig: The parent object that contains your function's tracing settings.
Mode (string) --Can be either PassThrough or Active. If PassThrough, Lambda will only trace the request from an upstream service if it contains a tracing header with 'sampled=1'. If Active, Lambda will respect any tracing header it receives from an upstream service. If no tracing header is received, Lambda will call X-Ray for a tracing decision.
:type Tags: dict
:param Tags: The list of tags (key-value pairs) assigned to the new function.
(string) --
(string) --
:rtype: dict
:return: {
'FunctionName': 'string',
'FunctionArn': 'string',
'Runtime': 'nodejs'|'nodejs4.3'|'nodejs6.10'|'java8'|'python2.7'|'python3.6'|'dotnetcore1.0'|'nodejs4.3-edge',
'Role': 'string',
'Handler': 'string',
'CodeSize': 123,
'Description': 'string',
'Timeout': 123,
'MemorySize': 123,
'LastModified': 'string',
'CodeSha256': 'string',
'Version': 'string',
'VpcConfig': {
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
],
'VpcId': 'string'
},
'DeadLetterConfig': {
'TargetArn': 'string'
},
'Environment': {
'Variables': {
'string': 'string'
},
'Error': {
'ErrorCode': 'string',
'Message': 'string'
}
},
'KMSKeyArn': 'string',
'TracingConfig': {
'Mode': 'Active'|'PassThrough'
}
}
:returns:
(string) --
"""
pass | Creates a new Lambda function. The function metadata is created from the request parameters, and the code for the function is provided by a .zip file in the request body. If the function name already exists, the operation will fail. Note that the function name is case-sensitive.
If you are using versioning, you can also publish a version of the Lambda function you are creating using the Publish parameter. For more information about versioning, see AWS Lambda Function Versioning and Aliases .
This operation requires permission for the lambda:CreateFunction action.
See also: AWS API Documentation
Examples
This example creates a Lambda function.
Expected Output:
:example: response = client.create_function(
FunctionName='string',
Runtime='nodejs'|'nodejs4.3'|'nodejs6.10'|'java8'|'python2.7'|'python3.6'|'dotnetcore1.0'|'nodejs4.3-edge',
Role='string',
Handler='string',
Code={
'ZipFile': b'bytes',
'S3Bucket': 'string',
'S3Key': 'string',
'S3ObjectVersion': 'string'
},
Description='string',
Timeout=123,
MemorySize=123,
Publish=True|False,
VpcConfig={
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
]
},
DeadLetterConfig={
'TargetArn': 'string'
},
Environment={
'Variables': {
'string': 'string'
}
},
KMSKeyArn='string',
TracingConfig={
'Mode': 'Active'|'PassThrough'
},
Tags={
'string': 'string'
}
)
:type FunctionName: string
:param FunctionName: [REQUIRED]
The name you want to assign to the function you are uploading. The function names appear in the console and are returned in the ListFunctions API. Function names are used to specify functions to other AWS Lambda API operations, such as Invoke . Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 characters in length.
:type Runtime: string
:param Runtime: [REQUIRED]
The runtime environment for the Lambda function you are uploading.
To use the Python runtime v3.6, set the value to 'python3.6'. To use the Python runtime v2.7, set the value to 'python2.7'. To use the Node.js runtime v6.10, set the value to 'nodejs6.10'. To use the Node.js runtime v4.3, set the value to 'nodejs4.3'.
Note
You can no longer create functions using the v0.10.42 runtime version as of November, 2016. Existing functions will be supported until early 2017, but we recommend you migrate them to either nodejs6.10 or nodejs4.3 runtime version as soon as possible.
:type Role: string
:param Role: [REQUIRED]
The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it executes your function to access any other Amazon Web Services (AWS) resources. For more information, see AWS Lambda: How it Works .
:type Handler: string
:param Handler: [REQUIRED]
The function within your code that Lambda calls to begin execution. For Node.js, it is the module-name .*export* value in your function. For Java, it can be package.class-name::handler or package.class-name . For more information, see Lambda Function Handler (Java) .
:type Code: dict
:param Code: [REQUIRED]
The code for the Lambda function.
ZipFile (bytes) --The contents of your zip file containing your deployment package. If you are using the web API directly, the contents of the zip file must be base64-encoded. If you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the encoding for you. For more information about creating a .zip file, see Execution Permissions in the AWS Lambda Developer Guide .
S3Bucket (string) --Amazon S3 bucket name where the .zip file containing your deployment package is stored. This bucket must reside in the same AWS region where you are creating the Lambda function.
S3Key (string) --The Amazon S3 object (the deployment package) key name you want to upload.
S3ObjectVersion (string) --The Amazon S3 object (the deployment package) version you want to upload.
:type Description: string
:param Description: A short, user-defined function description. Lambda does not use this value. Assign a meaningful description as you see fit.
:type Timeout: integer
:param Timeout: The function execution time at which Lambda should terminate the function. Because the execution time has cost implications, we recommend you set this value based on your expected execution time. The default is 3 seconds.
:type MemorySize: integer
:param MemorySize: The amount of memory, in MB, your Lambda function is given. Lambda uses this memory size to infer the amount of CPU and memory allocated to your function. Your function use-case determines your CPU and memory requirements. For example, a database operation might need less memory compared to an image processing function. The default value is 128 MB. The value must be a multiple of 64 MB.
:type Publish: boolean
:param Publish: This boolean parameter can be used to request AWS Lambda to create the Lambda function and publish a version as an atomic operation.
:type VpcConfig: dict
:param VpcConfig: If your Lambda function accesses resources in a VPC, you provide this parameter identifying the list of security group IDs and subnet IDs. These must belong to the same VPC. You must provide at least one security group and one subnet ID.
SubnetIds (list) --A list of one or more subnet IDs in your VPC.
(string) --
SecurityGroupIds (list) --A list of one or more security groups IDs in your VPC.
(string) --
:type DeadLetterConfig: dict
:param DeadLetterConfig: The parent object that contains the target ARN (Amazon Resource Name) of an Amazon SQS queue or Amazon SNS topic.
TargetArn (string) --The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic you specify as your Dead Letter Queue (DLQ).
:type Environment: dict
:param Environment: The parent object that contains your environment's configuration settings.
Variables (dict) --The key-value pairs that represent your environment's configuration settings.
(string) --
(string) --
:type KMSKeyArn: string
:param KMSKeyArn: The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's environment variables. If not provided, AWS Lambda will use a default service key.
:type TracingConfig: dict
:param TracingConfig: The parent object that contains your function's tracing settings.
Mode (string) --Can be either PassThrough or Active. If PassThrough, Lambda will only trace the request from an upstream service if it contains a tracing header with 'sampled=1'. If Active, Lambda will respect any tracing header it receives from an upstream service. If no tracing header is received, Lambda will call X-Ray for a tracing decision.
:type Tags: dict
:param Tags: The list of tags (key-value pairs) assigned to the new function.
(string) --
(string) --
:rtype: dict
:return: {
'FunctionName': 'string',
'FunctionArn': 'string',
'Runtime': 'nodejs'|'nodejs4.3'|'nodejs6.10'|'java8'|'python2.7'|'python3.6'|'dotnetcore1.0'|'nodejs4.3-edge',
'Role': 'string',
'Handler': 'string',
'CodeSize': 123,
'Description': 'string',
'Timeout': 123,
'MemorySize': 123,
'LastModified': 'string',
'CodeSha256': 'string',
'Version': 'string',
'VpcConfig': {
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
],
'VpcId': 'string'
},
'DeadLetterConfig': {
'TargetArn': 'string'
},
'Environment': {
'Variables': {
'string': 'string'
},
'Error': {
'ErrorCode': 'string',
'Message': 'string'
}
},
'KMSKeyArn': 'string',
'TracingConfig': {
'Mode': 'Active'|'PassThrough'
}
}
:returns:
(string) -- | entailment |
def update_function_configuration(FunctionName=None, Role=None, Handler=None, Description=None, Timeout=None, MemorySize=None, VpcConfig=None, Environment=None, Runtime=None, DeadLetterConfig=None, KMSKeyArn=None, TracingConfig=None):
"""
Updates the configuration parameters for the specified Lambda function by using the values provided in the request. You provide only the parameters you want to change. This operation must only be used on an existing Lambda function and cannot be used to update the function's code.
If you are using the versioning feature, note this API will always update the $LATEST version of your Lambda function. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases .
This operation requires permission for the lambda:UpdateFunctionConfiguration action.
See also: AWS API Documentation
Examples
This operation updates a Lambda function's configuration
Expected Output:
:example: response = client.update_function_configuration(
FunctionName='string',
Role='string',
Handler='string',
Description='string',
Timeout=123,
MemorySize=123,
VpcConfig={
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
]
},
Environment={
'Variables': {
'string': 'string'
}
},
Runtime='nodejs'|'nodejs4.3'|'nodejs6.10'|'java8'|'python2.7'|'python3.6'|'dotnetcore1.0'|'nodejs4.3-edge',
DeadLetterConfig={
'TargetArn': 'string'
},
KMSKeyArn='string',
TracingConfig={
'Mode': 'Active'|'PassThrough'
}
)
:type FunctionName: string
:param FunctionName: [REQUIRED]
The name of the Lambda function.
You can specify a function name (for example, Thumbnail ) or you can specify Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail ). AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail ). Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 character in length.
:type Role: string
:param Role: The Amazon Resource Name (ARN) of the IAM role that Lambda will assume when it executes your function.
:type Handler: string
:param Handler: The function that Lambda calls to begin executing your function. For Node.js, it is the module-name.export value in your function.
:type Description: string
:param Description: A short user-defined function description. AWS Lambda does not use this value. Assign a meaningful description as you see fit.
:type Timeout: integer
:param Timeout: The function execution time at which AWS Lambda should terminate the function. Because the execution time has cost implications, we recommend you set this value based on your expected execution time. The default is 3 seconds.
:type MemorySize: integer
:param MemorySize: The amount of memory, in MB, your Lambda function is given. AWS Lambda uses this memory size to infer the amount of CPU allocated to your function. Your function use-case determines your CPU and memory requirements. For example, a database operation might need less memory compared to an image processing function. The default value is 128 MB. The value must be a multiple of 64 MB.
:type VpcConfig: dict
:param VpcConfig: If your Lambda function accesses resources in a VPC, you provide this parameter identifying the list of security group IDs and subnet IDs. These must belong to the same VPC. You must provide at least one security group and one subnet ID.
SubnetIds (list) --A list of one or more subnet IDs in your VPC.
(string) --
SecurityGroupIds (list) --A list of one or more security groups IDs in your VPC.
(string) --
:type Environment: dict
:param Environment: The parent object that contains your environment's configuration settings.
Variables (dict) --The key-value pairs that represent your environment's configuration settings.
(string) --
(string) --
:type Runtime: string
:param Runtime: The runtime environment for the Lambda function.
To use the Python runtime v3.6, set the value to 'python3.6'. To use the Python runtime v2.7, set the value to 'python2.7'. To use the Node.js runtime v6.10, set the value to 'nodejs6.10'. To use the Node.js runtime v4.3, set the value to 'nodejs4.3'. To use the Python runtime v3.6, set the value to 'python3.6'. To use the Python runtime v2.7, set the value to 'python2.7'.
Note
You can no longer downgrade to the v0.10.42 runtime version. This version will no longer be supported as of early 2017.
:type DeadLetterConfig: dict
:param DeadLetterConfig: The parent object that contains the target ARN (Amazon Resource Name) of an Amazon SQS queue or Amazon SNS topic.
TargetArn (string) --The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic you specify as your Dead Letter Queue (DLQ).
:type KMSKeyArn: string
:param KMSKeyArn: The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's environment variables. If you elect to use the AWS Lambda default service key, pass in an empty string ('') for this parameter.
:type TracingConfig: dict
:param TracingConfig: The parent object that contains your function's tracing settings.
Mode (string) --Can be either PassThrough or Active. If PassThrough, Lambda will only trace the request from an upstream service if it contains a tracing header with 'sampled=1'. If Active, Lambda will respect any tracing header it receives from an upstream service. If no tracing header is received, Lambda will call X-Ray for a tracing decision.
:rtype: dict
:return: {
'FunctionName': 'string',
'FunctionArn': 'string',
'Runtime': 'nodejs'|'nodejs4.3'|'nodejs6.10'|'java8'|'python2.7'|'python3.6'|'dotnetcore1.0'|'nodejs4.3-edge',
'Role': 'string',
'Handler': 'string',
'CodeSize': 123,
'Description': 'string',
'Timeout': 123,
'MemorySize': 123,
'LastModified': 'string',
'CodeSha256': 'string',
'Version': 'string',
'VpcConfig': {
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
],
'VpcId': 'string'
},
'DeadLetterConfig': {
'TargetArn': 'string'
},
'Environment': {
'Variables': {
'string': 'string'
},
'Error': {
'ErrorCode': 'string',
'Message': 'string'
}
},
'KMSKeyArn': 'string',
'TracingConfig': {
'Mode': 'Active'|'PassThrough'
}
}
:returns:
(string) --
"""
pass | Updates the configuration parameters for the specified Lambda function by using the values provided in the request. You provide only the parameters you want to change. This operation must only be used on an existing Lambda function and cannot be used to update the function's code.
If you are using the versioning feature, note this API will always update the $LATEST version of your Lambda function. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases .
This operation requires permission for the lambda:UpdateFunctionConfiguration action.
See also: AWS API Documentation
Examples
This operation updates a Lambda function's configuration
Expected Output:
:example: response = client.update_function_configuration(
FunctionName='string',
Role='string',
Handler='string',
Description='string',
Timeout=123,
MemorySize=123,
VpcConfig={
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
]
},
Environment={
'Variables': {
'string': 'string'
}
},
Runtime='nodejs'|'nodejs4.3'|'nodejs6.10'|'java8'|'python2.7'|'python3.6'|'dotnetcore1.0'|'nodejs4.3-edge',
DeadLetterConfig={
'TargetArn': 'string'
},
KMSKeyArn='string',
TracingConfig={
'Mode': 'Active'|'PassThrough'
}
)
:type FunctionName: string
:param FunctionName: [REQUIRED]
The name of the Lambda function.
You can specify a function name (for example, Thumbnail ) or you can specify Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail ). AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail ). Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 character in length.
:type Role: string
:param Role: The Amazon Resource Name (ARN) of the IAM role that Lambda will assume when it executes your function.
:type Handler: string
:param Handler: The function that Lambda calls to begin executing your function. For Node.js, it is the module-name.export value in your function.
:type Description: string
:param Description: A short user-defined function description. AWS Lambda does not use this value. Assign a meaningful description as you see fit.
:type Timeout: integer
:param Timeout: The function execution time at which AWS Lambda should terminate the function. Because the execution time has cost implications, we recommend you set this value based on your expected execution time. The default is 3 seconds.
:type MemorySize: integer
:param MemorySize: The amount of memory, in MB, your Lambda function is given. AWS Lambda uses this memory size to infer the amount of CPU allocated to your function. Your function use-case determines your CPU and memory requirements. For example, a database operation might need less memory compared to an image processing function. The default value is 128 MB. The value must be a multiple of 64 MB.
:type VpcConfig: dict
:param VpcConfig: If your Lambda function accesses resources in a VPC, you provide this parameter identifying the list of security group IDs and subnet IDs. These must belong to the same VPC. You must provide at least one security group and one subnet ID.
SubnetIds (list) --A list of one or more subnet IDs in your VPC.
(string) --
SecurityGroupIds (list) --A list of one or more security groups IDs in your VPC.
(string) --
:type Environment: dict
:param Environment: The parent object that contains your environment's configuration settings.
Variables (dict) --The key-value pairs that represent your environment's configuration settings.
(string) --
(string) --
:type Runtime: string
:param Runtime: The runtime environment for the Lambda function.
To use the Python runtime v3.6, set the value to 'python3.6'. To use the Python runtime v2.7, set the value to 'python2.7'. To use the Node.js runtime v6.10, set the value to 'nodejs6.10'. To use the Node.js runtime v4.3, set the value to 'nodejs4.3'. To use the Python runtime v3.6, set the value to 'python3.6'. To use the Python runtime v2.7, set the value to 'python2.7'.
Note
You can no longer downgrade to the v0.10.42 runtime version. This version will no longer be supported as of early 2017.
:type DeadLetterConfig: dict
:param DeadLetterConfig: The parent object that contains the target ARN (Amazon Resource Name) of an Amazon SQS queue or Amazon SNS topic.
TargetArn (string) --The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic you specify as your Dead Letter Queue (DLQ).
:type KMSKeyArn: string
:param KMSKeyArn: The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's environment variables. If you elect to use the AWS Lambda default service key, pass in an empty string ('') for this parameter.
:type TracingConfig: dict
:param TracingConfig: The parent object that contains your function's tracing settings.
Mode (string) --Can be either PassThrough or Active. If PassThrough, Lambda will only trace the request from an upstream service if it contains a tracing header with 'sampled=1'. If Active, Lambda will respect any tracing header it receives from an upstream service. If no tracing header is received, Lambda will call X-Ray for a tracing decision.
:rtype: dict
:return: {
'FunctionName': 'string',
'FunctionArn': 'string',
'Runtime': 'nodejs'|'nodejs4.3'|'nodejs6.10'|'java8'|'python2.7'|'python3.6'|'dotnetcore1.0'|'nodejs4.3-edge',
'Role': 'string',
'Handler': 'string',
'CodeSize': 123,
'Description': 'string',
'Timeout': 123,
'MemorySize': 123,
'LastModified': 'string',
'CodeSha256': 'string',
'Version': 'string',
'VpcConfig': {
'SubnetIds': [
'string',
],
'SecurityGroupIds': [
'string',
],
'VpcId': 'string'
},
'DeadLetterConfig': {
'TargetArn': 'string'
},
'Environment': {
'Variables': {
'string': 'string'
},
'Error': {
'ErrorCode': 'string',
'Message': 'string'
}
},
'KMSKeyArn': 'string',
'TracingConfig': {
'Mode': 'Active'|'PassThrough'
}
}
:returns:
(string) -- | entailment |
def create_trail(Name=None, S3BucketName=None, S3KeyPrefix=None, SnsTopicName=None, IncludeGlobalServiceEvents=None, IsMultiRegionTrail=None, EnableLogFileValidation=None, CloudWatchLogsLogGroupArn=None, CloudWatchLogsRoleArn=None, KmsKeyId=None):
"""
Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket. A maximum of five trails can exist in a region, irrespective of the region in which they were created.
See also: AWS API Documentation
:example: response = client.create_trail(
Name='string',
S3BucketName='string',
S3KeyPrefix='string',
SnsTopicName='string',
IncludeGlobalServiceEvents=True|False,
IsMultiRegionTrail=True|False,
EnableLogFileValidation=True|False,
CloudWatchLogsLogGroupArn='string',
CloudWatchLogsRoleArn='string',
KmsKeyId='string'
)
:type Name: string
:param Name: [REQUIRED]
Specifies the name of the trail. The name must meet the following requirements:
Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
Start with a letter or number, and end with a letter or number
Be between 3 and 128 characters
Have no adjacent periods, underscores or dashes. Names like my-_namespace and my--namespace are invalid.
Not be in IP address format (for example, 192.168.5.4)
:type S3BucketName: string
:param S3BucketName: [REQUIRED]
Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements .
:type S3KeyPrefix: string
:param S3KeyPrefix: Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files . The maximum length is 200 characters.
:type SnsTopicName: string
:param SnsTopicName: Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
:type IncludeGlobalServiceEvents: boolean
:param IncludeGlobalServiceEvents: Specifies whether the trail is publishing events from global services such as IAM to the log files.
:type IsMultiRegionTrail: boolean
:param IsMultiRegionTrail: Specifies whether the trail is created in the current region or in all regions. The default is false.
:type EnableLogFileValidation: boolean
:param EnableLogFileValidation: Specifies whether log file integrity validation is enabled. The default is false.
Note
When you disable log file integrity validation, the chain of digest files is broken after one hour. CloudTrail will not create digest files for log files that were delivered during a period in which log file integrity validation was disabled. For example, if you enable log file integrity validation at noon on January 1, disable it at noon on January 2, and re-enable it at noon on January 10, digest files will not be created for the log files delivered from noon on January 2 to noon on January 10. The same applies whenever you stop CloudTrail logging or delete a trail.
:type CloudWatchLogsLogGroupArn: string
:param CloudWatchLogsLogGroupArn: Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered. Not required unless you specify CloudWatchLogsRoleArn.
:type CloudWatchLogsRoleArn: string
:param CloudWatchLogsRoleArn: Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
:type KmsKeyId: string
:param KmsKeyId: Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by 'alias/', a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.
Examples:
alias/MyAliasName
arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
12345678-1234-1234-1234-123456789012
:rtype: dict
:return: {
'Name': 'string',
'S3BucketName': 'string',
'S3KeyPrefix': 'string',
'SnsTopicName': 'string',
'SnsTopicARN': 'string',
'IncludeGlobalServiceEvents': True|False,
'IsMultiRegionTrail': True|False,
'TrailARN': 'string',
'LogFileValidationEnabled': True|False,
'CloudWatchLogsLogGroupArn': 'string',
'CloudWatchLogsRoleArn': 'string',
'KmsKeyId': 'string'
}
"""
pass | Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket. A maximum of five trails can exist in a region, irrespective of the region in which they were created.
See also: AWS API Documentation
:example: response = client.create_trail(
Name='string',
S3BucketName='string',
S3KeyPrefix='string',
SnsTopicName='string',
IncludeGlobalServiceEvents=True|False,
IsMultiRegionTrail=True|False,
EnableLogFileValidation=True|False,
CloudWatchLogsLogGroupArn='string',
CloudWatchLogsRoleArn='string',
KmsKeyId='string'
)
:type Name: string
:param Name: [REQUIRED]
Specifies the name of the trail. The name must meet the following requirements:
Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
Start with a letter or number, and end with a letter or number
Be between 3 and 128 characters
Have no adjacent periods, underscores or dashes. Names like my-_namespace and my--namespace are invalid.
Not be in IP address format (for example, 192.168.5.4)
:type S3BucketName: string
:param S3BucketName: [REQUIRED]
Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements .
:type S3KeyPrefix: string
:param S3KeyPrefix: Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files . The maximum length is 200 characters.
:type SnsTopicName: string
:param SnsTopicName: Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
:type IncludeGlobalServiceEvents: boolean
:param IncludeGlobalServiceEvents: Specifies whether the trail is publishing events from global services such as IAM to the log files.
:type IsMultiRegionTrail: boolean
:param IsMultiRegionTrail: Specifies whether the trail is created in the current region or in all regions. The default is false.
:type EnableLogFileValidation: boolean
:param EnableLogFileValidation: Specifies whether log file integrity validation is enabled. The default is false.
Note
When you disable log file integrity validation, the chain of digest files is broken after one hour. CloudTrail will not create digest files for log files that were delivered during a period in which log file integrity validation was disabled. For example, if you enable log file integrity validation at noon on January 1, disable it at noon on January 2, and re-enable it at noon on January 10, digest files will not be created for the log files delivered from noon on January 2 to noon on January 10. The same applies whenever you stop CloudTrail logging or delete a trail.
:type CloudWatchLogsLogGroupArn: string
:param CloudWatchLogsLogGroupArn: Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered. Not required unless you specify CloudWatchLogsRoleArn.
:type CloudWatchLogsRoleArn: string
:param CloudWatchLogsRoleArn: Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
:type KmsKeyId: string
:param KmsKeyId: Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by 'alias/', a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.
Examples:
alias/MyAliasName
arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
12345678-1234-1234-1234-123456789012
:rtype: dict
:return: {
'Name': 'string',
'S3BucketName': 'string',
'S3KeyPrefix': 'string',
'SnsTopicName': 'string',
'SnsTopicARN': 'string',
'IncludeGlobalServiceEvents': True|False,
'IsMultiRegionTrail': True|False,
'TrailARN': 'string',
'LogFileValidationEnabled': True|False,
'CloudWatchLogsLogGroupArn': 'string',
'CloudWatchLogsRoleArn': 'string',
'KmsKeyId': 'string'
} | entailment |
def create_cluster(DBName=None, ClusterIdentifier=None, ClusterType=None, NodeType=None, MasterUsername=None, MasterUserPassword=None, ClusterSecurityGroups=None, VpcSecurityGroupIds=None, ClusterSubnetGroupName=None, AvailabilityZone=None, PreferredMaintenanceWindow=None, ClusterParameterGroupName=None, AutomatedSnapshotRetentionPeriod=None, Port=None, ClusterVersion=None, AllowVersionUpgrade=None, NumberOfNodes=None, PubliclyAccessible=None, Encrypted=None, HsmClientCertificateIdentifier=None, HsmConfigurationIdentifier=None, ElasticIp=None, Tags=None, KmsKeyId=None, EnhancedVpcRouting=None, AdditionalInfo=None, IamRoles=None):
"""
Creates a new cluster.
To create the cluster in Virtual Private Cloud (VPC), you must provide a cluster subnet group name. The cluster subnet group identifies the subnets of your VPC that Amazon Redshift uses when creating the cluster. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Cluster Management Guide .
See also: AWS API Documentation
:example: response = client.create_cluster(
DBName='string',
ClusterIdentifier='string',
ClusterType='string',
NodeType='string',
MasterUsername='string',
MasterUserPassword='string',
ClusterSecurityGroups=[
'string',
],
VpcSecurityGroupIds=[
'string',
],
ClusterSubnetGroupName='string',
AvailabilityZone='string',
PreferredMaintenanceWindow='string',
ClusterParameterGroupName='string',
AutomatedSnapshotRetentionPeriod=123,
Port=123,
ClusterVersion='string',
AllowVersionUpgrade=True|False,
NumberOfNodes=123,
PubliclyAccessible=True|False,
Encrypted=True|False,
HsmClientCertificateIdentifier='string',
HsmConfigurationIdentifier='string',
ElasticIp='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
KmsKeyId='string',
EnhancedVpcRouting=True|False,
AdditionalInfo='string',
IamRoles=[
'string',
]
)
:type DBName: string
:param DBName: The name of the first database to be created when the cluster is created.
To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. For more information, go to Create a Database in the Amazon Redshift Database Developer Guide.
Default: dev
Constraints:
Must contain 1 to 64 alphanumeric characters.
Must contain only lowercase letters.
Cannot be a word that is reserved by the service. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide.
:type ClusterIdentifier: string
:param ClusterIdentifier: [REQUIRED]
A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. The identifier also appears in the Amazon Redshift console.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
Alphabetic characters must be lowercase.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters within an AWS account.
Example: myexamplecluster
:type ClusterType: string
:param ClusterType: The type of the cluster. When cluster type is specified as
single-node , the NumberOfNodes parameter is not required.
multi-node , the NumberOfNodes parameter is required.
Valid Values: multi-node | single-node
Default: multi-node
:type NodeType: string
:param NodeType: [REQUIRED]
The node type to be provisioned for the cluster. For information about node types, go to Working with Clusters in the Amazon Redshift Cluster Management Guide .
Valid Values: ds1.xlarge | ds1.8xlarge | ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge .
:type MasterUsername: string
:param MasterUsername: [REQUIRED]
The user name associated with the master user account for the cluster that is being created.
Constraints:
Must be 1 - 128 alphanumeric characters.
First character must be a letter.
Cannot be a reserved word. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide.
:type MasterUserPassword: string
:param MasterUserPassword: [REQUIRED]
The password associated with the master user account for the cluster that is being created.
Constraints:
Must be between 8 and 64 characters in length.
Must contain at least one uppercase letter.
Must contain at least one lowercase letter.
Must contain one number.
Can be any printable ASCII character (ASCII code 33 to 126) except ' (single quote), ' (double quote), , /, @, or space.
:type ClusterSecurityGroups: list
:param ClusterSecurityGroups: A list of security groups to be associated with this cluster.
Default: The default cluster security group for Amazon Redshift.
(string) --
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.
Default: The default VPC security group is associated with the cluster.
(string) --
:type ClusterSubnetGroupName: string
:param ClusterSubnetGroupName: The name of a cluster subnet group to be associated with this cluster.
If this parameter is not provided the resulting cluster will be deployed outside virtual private cloud (VPC).
:type AvailabilityZone: string
:param AvailabilityZone: The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. For example, if you have several EC2 instances running in a specific Availability Zone, then you might want the cluster to be provisioned in the same zone in order to decrease network latency.
Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint.
Example: us-east-1d
Constraint: The specified Availability Zone must be in the same region as the current endpoint.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range (in UTC) during which automated cluster maintenance can occur.
Format: ddd:hh24:mi-ddd:hh24:mi
Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. For more information about the time blocks for each region, see Maintenance Windows in Amazon Redshift Cluster Management Guide.
Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
Constraints: Minimum 30-minute window.
:type ClusterParameterGroupName: string
:param ClusterParameterGroupName: The name of the parameter group to be associated with this cluster.
Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups
Constraints:
Must be 1 to 255 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
:type AutomatedSnapshotRetentionPeriod: integer
:param AutomatedSnapshotRetentionPeriod: The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot .
Default: 1
Constraints: Must be a value from 0 to 35.
:type Port: integer
:param Port: The port number on which the cluster accepts incoming connections.
The cluster is accessible only via the JDBC and ODBC connection strings. Part of the connection string requires the port on which the cluster will listen for incoming connections.
Default: 5439
Valid Values: 1150-65535
:type ClusterVersion: string
:param ClusterVersion: The version of the Amazon Redshift engine software that you want to deploy on the cluster.
The version selected runs on all the nodes in the cluster.
Constraints: Only version 1.0 is currently available.
Example: 1.0
:type AllowVersionUpgrade: boolean
:param AllowVersionUpgrade: If true , major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
When a new major version of the Amazon Redshift engine is released, you can request that the service automatically apply upgrades during the maintenance window to the Amazon Redshift engine that is running on your cluster.
Default: true
:type NumberOfNodes: integer
:param NumberOfNodes: The number of compute nodes in the cluster. This parameter is required when the ClusterType parameter is specified as multi-node .
For information about determining how many nodes you need, go to Working with Clusters in the Amazon Redshift Cluster Management Guide .
If you don't specify this parameter, you get a single-node cluster. When requesting a multi-node cluster, you must specify the number of nodes that you want in the cluster.
Default: 1
Constraints: Value must be at least 1 and no more than 100.
:type PubliclyAccessible: boolean
:param PubliclyAccessible: If true , the cluster can be accessed from a public network.
:type Encrypted: boolean
:param Encrypted: If true , the data in the cluster is encrypted at rest.
Default: false
:type HsmClientCertificateIdentifier: string
:param HsmClientCertificateIdentifier: Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
:type HsmConfigurationIdentifier: string
:param HsmConfigurationIdentifier: Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
:type ElasticIp: string
:param ElasticIp: The Elastic IP (EIP) address for the cluster.
Constraints: The cluster must be provisioned in EC2-VPC and publicly-accessible through an Internet gateway. For more information about provisioning clusters in EC2-VPC, go to Supported Platforms to Launch Your Cluster in the Amazon Redshift Cluster Management Guide.
:type Tags: list
:param Tags: A list of tag instances.
(dict) --A tag consisting of a name/value pair for a resource.
Key (string) --The key, or name, for the resource tag.
Value (string) --The value for the resource tag.
:type KmsKeyId: string
:param KmsKeyId: The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster.
:type EnhancedVpcRouting: boolean
:param EnhancedVpcRouting: An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true , enhanced VPC routing is enabled.
Default: false
:type AdditionalInfo: string
:param AdditionalInfo: Reserved.
:type IamRoles: list
:param IamRoles: A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles in a single request.
A cluster can have up to 10 IAM roles associated with it at any time.
(string) --
:rtype: dict
:return: {
'Cluster': {
'ClusterIdentifier': 'string',
'NodeType': 'string',
'ClusterStatus': 'string',
'ModifyStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123
},
'ClusterCreateTime': datetime(2015, 1, 1),
'AutomatedSnapshotRetentionPeriod': 123,
'ClusterSecurityGroups': [
{
'ClusterSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'ClusterParameterGroups': [
{
'ParameterGroupName': 'string',
'ParameterApplyStatus': 'string',
'ClusterParameterStatusList': [
{
'ParameterName': 'string',
'ParameterApplyStatus': 'string',
'ParameterApplyErrorDescription': 'string'
},
]
},
],
'ClusterSubnetGroupName': 'string',
'VpcId': 'string',
'AvailabilityZone': 'string',
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'MasterUserPassword': 'string',
'NodeType': 'string',
'NumberOfNodes': 123,
'ClusterType': 'string',
'ClusterVersion': 'string',
'AutomatedSnapshotRetentionPeriod': 123,
'ClusterIdentifier': 'string',
'PubliclyAccessible': True|False,
'EnhancedVpcRouting': True|False
},
'ClusterVersion': 'string',
'AllowVersionUpgrade': True|False,
'NumberOfNodes': 123,
'PubliclyAccessible': True|False,
'Encrypted': True|False,
'RestoreStatus': {
'Status': 'string',
'CurrentRestoreRateInMegaBytesPerSecond': 123.0,
'SnapshotSizeInMegaBytes': 123,
'ProgressInMegaBytes': 123,
'ElapsedTimeInSeconds': 123,
'EstimatedTimeToCompletionInSeconds': 123
},
'HsmStatus': {
'HsmClientCertificateIdentifier': 'string',
'HsmConfigurationIdentifier': 'string',
'Status': 'string'
},
'ClusterSnapshotCopyStatus': {
'DestinationRegion': 'string',
'RetentionPeriod': 123,
'SnapshotCopyGrantName': 'string'
},
'ClusterPublicKey': 'string',
'ClusterNodes': [
{
'NodeRole': 'string',
'PrivateIPAddress': 'string',
'PublicIPAddress': 'string'
},
],
'ElasticIpStatus': {
'ElasticIp': 'string',
'Status': 'string'
},
'ClusterRevisionNumber': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'KmsKeyId': 'string',
'EnhancedVpcRouting': True|False,
'IamRoles': [
{
'IamRoleArn': 'string',
'ApplyStatus': 'string'
},
]
}
}
:returns:
available
creating
deleting
final-snapshot
hardware-failure
incompatible-hsm
incompatible-network
incompatible-parameters
incompatible-restore
modifying
rebooting
renaming
resizing
rotating-keys
storage-full
updating-hsm
"""
pass | Creates a new cluster.
To create the cluster in Virtual Private Cloud (VPC), you must provide a cluster subnet group name. The cluster subnet group identifies the subnets of your VPC that Amazon Redshift uses when creating the cluster. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Cluster Management Guide .
See also: AWS API Documentation
:example: response = client.create_cluster(
DBName='string',
ClusterIdentifier='string',
ClusterType='string',
NodeType='string',
MasterUsername='string',
MasterUserPassword='string',
ClusterSecurityGroups=[
'string',
],
VpcSecurityGroupIds=[
'string',
],
ClusterSubnetGroupName='string',
AvailabilityZone='string',
PreferredMaintenanceWindow='string',
ClusterParameterGroupName='string',
AutomatedSnapshotRetentionPeriod=123,
Port=123,
ClusterVersion='string',
AllowVersionUpgrade=True|False,
NumberOfNodes=123,
PubliclyAccessible=True|False,
Encrypted=True|False,
HsmClientCertificateIdentifier='string',
HsmConfigurationIdentifier='string',
ElasticIp='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
KmsKeyId='string',
EnhancedVpcRouting=True|False,
AdditionalInfo='string',
IamRoles=[
'string',
]
)
:type DBName: string
:param DBName: The name of the first database to be created when the cluster is created.
To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. For more information, go to Create a Database in the Amazon Redshift Database Developer Guide.
Default: dev
Constraints:
Must contain 1 to 64 alphanumeric characters.
Must contain only lowercase letters.
Cannot be a word that is reserved by the service. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide.
:type ClusterIdentifier: string
:param ClusterIdentifier: [REQUIRED]
A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. The identifier also appears in the Amazon Redshift console.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
Alphabetic characters must be lowercase.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters within an AWS account.
Example: myexamplecluster
:type ClusterType: string
:param ClusterType: The type of the cluster. When cluster type is specified as
single-node , the NumberOfNodes parameter is not required.
multi-node , the NumberOfNodes parameter is required.
Valid Values: multi-node | single-node
Default: multi-node
:type NodeType: string
:param NodeType: [REQUIRED]
The node type to be provisioned for the cluster. For information about node types, go to Working with Clusters in the Amazon Redshift Cluster Management Guide .
Valid Values: ds1.xlarge | ds1.8xlarge | ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge .
:type MasterUsername: string
:param MasterUsername: [REQUIRED]
The user name associated with the master user account for the cluster that is being created.
Constraints:
Must be 1 - 128 alphanumeric characters.
First character must be a letter.
Cannot be a reserved word. A list of reserved words can be found in Reserved Words in the Amazon Redshift Database Developer Guide.
:type MasterUserPassword: string
:param MasterUserPassword: [REQUIRED]
The password associated with the master user account for the cluster that is being created.
Constraints:
Must be between 8 and 64 characters in length.
Must contain at least one uppercase letter.
Must contain at least one lowercase letter.
Must contain one number.
Can be any printable ASCII character (ASCII code 33 to 126) except ' (single quote), ' (double quote), , /, @, or space.
:type ClusterSecurityGroups: list
:param ClusterSecurityGroups: A list of security groups to be associated with this cluster.
Default: The default cluster security group for Amazon Redshift.
(string) --
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.
Default: The default VPC security group is associated with the cluster.
(string) --
:type ClusterSubnetGroupName: string
:param ClusterSubnetGroupName: The name of a cluster subnet group to be associated with this cluster.
If this parameter is not provided the resulting cluster will be deployed outside virtual private cloud (VPC).
:type AvailabilityZone: string
:param AvailabilityZone: The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. For example, if you have several EC2 instances running in a specific Availability Zone, then you might want the cluster to be provisioned in the same zone in order to decrease network latency.
Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint.
Example: us-east-1d
Constraint: The specified Availability Zone must be in the same region as the current endpoint.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range (in UTC) during which automated cluster maintenance can occur.
Format: ddd:hh24:mi-ddd:hh24:mi
Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. For more information about the time blocks for each region, see Maintenance Windows in Amazon Redshift Cluster Management Guide.
Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
Constraints: Minimum 30-minute window.
:type ClusterParameterGroupName: string
:param ClusterParameterGroupName: The name of the parameter group to be associated with this cluster.
Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups
Constraints:
Must be 1 to 255 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
:type AutomatedSnapshotRetentionPeriod: integer
:param AutomatedSnapshotRetentionPeriod: The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot .
Default: 1
Constraints: Must be a value from 0 to 35.
:type Port: integer
:param Port: The port number on which the cluster accepts incoming connections.
The cluster is accessible only via the JDBC and ODBC connection strings. Part of the connection string requires the port on which the cluster will listen for incoming connections.
Default: 5439
Valid Values: 1150-65535
:type ClusterVersion: string
:param ClusterVersion: The version of the Amazon Redshift engine software that you want to deploy on the cluster.
The version selected runs on all the nodes in the cluster.
Constraints: Only version 1.0 is currently available.
Example: 1.0
:type AllowVersionUpgrade: boolean
:param AllowVersionUpgrade: If true , major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
When a new major version of the Amazon Redshift engine is released, you can request that the service automatically apply upgrades during the maintenance window to the Amazon Redshift engine that is running on your cluster.
Default: true
:type NumberOfNodes: integer
:param NumberOfNodes: The number of compute nodes in the cluster. This parameter is required when the ClusterType parameter is specified as multi-node .
For information about determining how many nodes you need, go to Working with Clusters in the Amazon Redshift Cluster Management Guide .
If you don't specify this parameter, you get a single-node cluster. When requesting a multi-node cluster, you must specify the number of nodes that you want in the cluster.
Default: 1
Constraints: Value must be at least 1 and no more than 100.
:type PubliclyAccessible: boolean
:param PubliclyAccessible: If true , the cluster can be accessed from a public network.
:type Encrypted: boolean
:param Encrypted: If true , the data in the cluster is encrypted at rest.
Default: false
:type HsmClientCertificateIdentifier: string
:param HsmClientCertificateIdentifier: Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
:type HsmConfigurationIdentifier: string
:param HsmConfigurationIdentifier: Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
:type ElasticIp: string
:param ElasticIp: The Elastic IP (EIP) address for the cluster.
Constraints: The cluster must be provisioned in EC2-VPC and publicly-accessible through an Internet gateway. For more information about provisioning clusters in EC2-VPC, go to Supported Platforms to Launch Your Cluster in the Amazon Redshift Cluster Management Guide.
:type Tags: list
:param Tags: A list of tag instances.
(dict) --A tag consisting of a name/value pair for a resource.
Key (string) --The key, or name, for the resource tag.
Value (string) --The value for the resource tag.
:type KmsKeyId: string
:param KmsKeyId: The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster.
:type EnhancedVpcRouting: boolean
:param EnhancedVpcRouting: An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true , enhanced VPC routing is enabled.
Default: false
:type AdditionalInfo: string
:param AdditionalInfo: Reserved.
:type IamRoles: list
:param IamRoles: A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles in a single request.
A cluster can have up to 10 IAM roles associated with it at any time.
(string) --
:rtype: dict
:return: {
'Cluster': {
'ClusterIdentifier': 'string',
'NodeType': 'string',
'ClusterStatus': 'string',
'ModifyStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123
},
'ClusterCreateTime': datetime(2015, 1, 1),
'AutomatedSnapshotRetentionPeriod': 123,
'ClusterSecurityGroups': [
{
'ClusterSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'ClusterParameterGroups': [
{
'ParameterGroupName': 'string',
'ParameterApplyStatus': 'string',
'ClusterParameterStatusList': [
{
'ParameterName': 'string',
'ParameterApplyStatus': 'string',
'ParameterApplyErrorDescription': 'string'
},
]
},
],
'ClusterSubnetGroupName': 'string',
'VpcId': 'string',
'AvailabilityZone': 'string',
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'MasterUserPassword': 'string',
'NodeType': 'string',
'NumberOfNodes': 123,
'ClusterType': 'string',
'ClusterVersion': 'string',
'AutomatedSnapshotRetentionPeriod': 123,
'ClusterIdentifier': 'string',
'PubliclyAccessible': True|False,
'EnhancedVpcRouting': True|False
},
'ClusterVersion': 'string',
'AllowVersionUpgrade': True|False,
'NumberOfNodes': 123,
'PubliclyAccessible': True|False,
'Encrypted': True|False,
'RestoreStatus': {
'Status': 'string',
'CurrentRestoreRateInMegaBytesPerSecond': 123.0,
'SnapshotSizeInMegaBytes': 123,
'ProgressInMegaBytes': 123,
'ElapsedTimeInSeconds': 123,
'EstimatedTimeToCompletionInSeconds': 123
},
'HsmStatus': {
'HsmClientCertificateIdentifier': 'string',
'HsmConfigurationIdentifier': 'string',
'Status': 'string'
},
'ClusterSnapshotCopyStatus': {
'DestinationRegion': 'string',
'RetentionPeriod': 123,
'SnapshotCopyGrantName': 'string'
},
'ClusterPublicKey': 'string',
'ClusterNodes': [
{
'NodeRole': 'string',
'PrivateIPAddress': 'string',
'PublicIPAddress': 'string'
},
],
'ElasticIpStatus': {
'ElasticIp': 'string',
'Status': 'string'
},
'ClusterRevisionNumber': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'KmsKeyId': 'string',
'EnhancedVpcRouting': True|False,
'IamRoles': [
{
'IamRoleArn': 'string',
'ApplyStatus': 'string'
},
]
}
}
:returns:
available
creating
deleting
final-snapshot
hardware-failure
incompatible-hsm
incompatible-network
incompatible-parameters
incompatible-restore
modifying
rebooting
renaming
resizing
rotating-keys
storage-full
updating-hsm | entailment |
def describe_cluster_snapshots(ClusterIdentifier=None, SnapshotIdentifier=None, SnapshotType=None, StartTime=None, EndTime=None, MaxRecords=None, Marker=None, OwnerAccount=None, TagKeys=None, TagValues=None):
"""
Returns one or more snapshot objects, which contain metadata about your cluster snapshots. By default, this operation returns information about all snapshots of all clusters that are owned by you AWS customer account. No information is returned for snapshots owned by inactive AWS customer accounts.
If you specify both tag keys and tag values in the same request, Amazon Redshift returns all snapshots that match any combination of the specified keys and values. For example, if you have owner and environment for tag keys, and admin and test for tag values, all snapshots that have any combination of those values are returned. Only snapshots that you own are returned in the response; shared snapshots are not returned with the tag key and tag value request parameters.
If both tag keys and values are omitted from the request, snapshots are returned regardless of whether they have tag keys or values associated with them.
See also: AWS API Documentation
:example: response = client.describe_cluster_snapshots(
ClusterIdentifier='string',
SnapshotIdentifier='string',
SnapshotType='string',
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
MaxRecords=123,
Marker='string',
OwnerAccount='string',
TagKeys=[
'string',
],
TagValues=[
'string',
]
)
:type ClusterIdentifier: string
:param ClusterIdentifier: The identifier of the cluster for which information about snapshots is requested.
:type SnapshotIdentifier: string
:param SnapshotIdentifier: The snapshot identifier of the snapshot about which to return information.
:type SnapshotType: string
:param SnapshotType: The type of snapshots for which you are requesting information. By default, snapshots of all types are returned.
Valid Values: automated | manual
:type StartTime: datetime
:param StartTime: A value that requests only snapshots created at or after the specified time. The time value is specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page.
Example: 2012-07-16T18:00:00Z
:type EndTime: datetime
:param EndTime: A time value that requests only snapshots created at or before the specified time. The time value is specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page.
Example: 2012-07-16T18:00:00Z
:type MaxRecords: integer
:param MaxRecords: The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified MaxRecords value, a value is returned in a marker field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.
Default: 100
Constraints: minimum 20, maximum 100.
:type Marker: string
:param Marker: An optional parameter that specifies the starting point to return a set of response records. When the results of a DescribeClusterSnapshots request exceed the value specified in MaxRecords , AWS returns a value in the Marker field of the response. You can retrieve the next set of response records by providing the returned marker value in the Marker parameter and retrying the request.
:type OwnerAccount: string
:param OwnerAccount: The AWS customer account used to create or copy the snapshot. Use this field to filter the results to snapshots owned by a particular account. To describe snapshots you own, either specify your AWS customer account, or do not specify the parameter.
:type TagKeys: list
:param TagKeys: A tag key or keys for which you want to return all matching cluster snapshots that are associated with the specified key or keys. For example, suppose that you have snapshots that are tagged with keys called owner and environment . If you specify both of these tag keys in the request, Amazon Redshift returns a response with the snapshots that have either or both of these tag keys associated with them.
(string) --
:type TagValues: list
:param TagValues: A tag value or values for which you want to return all matching cluster snapshots that are associated with the specified tag value or values. For example, suppose that you have snapshots that are tagged with values called admin and test . If you specify both of these tag values in the request, Amazon Redshift returns a response with the snapshots that have either or both of these tag values associated with them.
(string) --
:rtype: dict
:return: {
'Marker': 'string',
'Snapshots': [
{
'SnapshotIdentifier': 'string',
'ClusterIdentifier': 'string',
'SnapshotCreateTime': datetime(2015, 1, 1),
'Status': 'string',
'Port': 123,
'AvailabilityZone': 'string',
'ClusterCreateTime': datetime(2015, 1, 1),
'MasterUsername': 'string',
'ClusterVersion': 'string',
'SnapshotType': 'string',
'NodeType': 'string',
'NumberOfNodes': 123,
'DBName': 'string',
'VpcId': 'string',
'Encrypted': True|False,
'KmsKeyId': 'string',
'EncryptedWithHSM': True|False,
'AccountsWithRestoreAccess': [
{
'AccountId': 'string',
'AccountAlias': 'string'
},
],
'OwnerAccount': 'string',
'TotalBackupSizeInMegaBytes': 123.0,
'ActualIncrementalBackupSizeInMegaBytes': 123.0,
'BackupProgressInMegaBytes': 123.0,
'CurrentBackupRateInMegaBytesPerSecond': 123.0,
'EstimatedSecondsToCompletion': 123,
'ElapsedTimeInSeconds': 123,
'SourceRegion': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'RestorableNodeTypes': [
'string',
],
'EnhancedVpcRouting': True|False
},
]
}
:returns:
CreateClusterSnapshot and CopyClusterSnapshot returns status as "creating".
DescribeClusterSnapshots returns status as "creating", "available", "final snapshot", or "failed".
DeleteClusterSnapshot returns status as "deleted".
"""
pass | Returns one or more snapshot objects, which contain metadata about your cluster snapshots. By default, this operation returns information about all snapshots of all clusters that are owned by you AWS customer account. No information is returned for snapshots owned by inactive AWS customer accounts.
If you specify both tag keys and tag values in the same request, Amazon Redshift returns all snapshots that match any combination of the specified keys and values. For example, if you have owner and environment for tag keys, and admin and test for tag values, all snapshots that have any combination of those values are returned. Only snapshots that you own are returned in the response; shared snapshots are not returned with the tag key and tag value request parameters.
If both tag keys and values are omitted from the request, snapshots are returned regardless of whether they have tag keys or values associated with them.
See also: AWS API Documentation
:example: response = client.describe_cluster_snapshots(
ClusterIdentifier='string',
SnapshotIdentifier='string',
SnapshotType='string',
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
MaxRecords=123,
Marker='string',
OwnerAccount='string',
TagKeys=[
'string',
],
TagValues=[
'string',
]
)
:type ClusterIdentifier: string
:param ClusterIdentifier: The identifier of the cluster for which information about snapshots is requested.
:type SnapshotIdentifier: string
:param SnapshotIdentifier: The snapshot identifier of the snapshot about which to return information.
:type SnapshotType: string
:param SnapshotType: The type of snapshots for which you are requesting information. By default, snapshots of all types are returned.
Valid Values: automated | manual
:type StartTime: datetime
:param StartTime: A value that requests only snapshots created at or after the specified time. The time value is specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page.
Example: 2012-07-16T18:00:00Z
:type EndTime: datetime
:param EndTime: A time value that requests only snapshots created at or before the specified time. The time value is specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page.
Example: 2012-07-16T18:00:00Z
:type MaxRecords: integer
:param MaxRecords: The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified MaxRecords value, a value is returned in a marker field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.
Default: 100
Constraints: minimum 20, maximum 100.
:type Marker: string
:param Marker: An optional parameter that specifies the starting point to return a set of response records. When the results of a DescribeClusterSnapshots request exceed the value specified in MaxRecords , AWS returns a value in the Marker field of the response. You can retrieve the next set of response records by providing the returned marker value in the Marker parameter and retrying the request.
:type OwnerAccount: string
:param OwnerAccount: The AWS customer account used to create or copy the snapshot. Use this field to filter the results to snapshots owned by a particular account. To describe snapshots you own, either specify your AWS customer account, or do not specify the parameter.
:type TagKeys: list
:param TagKeys: A tag key or keys for which you want to return all matching cluster snapshots that are associated with the specified key or keys. For example, suppose that you have snapshots that are tagged with keys called owner and environment . If you specify both of these tag keys in the request, Amazon Redshift returns a response with the snapshots that have either or both of these tag keys associated with them.
(string) --
:type TagValues: list
:param TagValues: A tag value or values for which you want to return all matching cluster snapshots that are associated with the specified tag value or values. For example, suppose that you have snapshots that are tagged with values called admin and test . If you specify both of these tag values in the request, Amazon Redshift returns a response with the snapshots that have either or both of these tag values associated with them.
(string) --
:rtype: dict
:return: {
'Marker': 'string',
'Snapshots': [
{
'SnapshotIdentifier': 'string',
'ClusterIdentifier': 'string',
'SnapshotCreateTime': datetime(2015, 1, 1),
'Status': 'string',
'Port': 123,
'AvailabilityZone': 'string',
'ClusterCreateTime': datetime(2015, 1, 1),
'MasterUsername': 'string',
'ClusterVersion': 'string',
'SnapshotType': 'string',
'NodeType': 'string',
'NumberOfNodes': 123,
'DBName': 'string',
'VpcId': 'string',
'Encrypted': True|False,
'KmsKeyId': 'string',
'EncryptedWithHSM': True|False,
'AccountsWithRestoreAccess': [
{
'AccountId': 'string',
'AccountAlias': 'string'
},
],
'OwnerAccount': 'string',
'TotalBackupSizeInMegaBytes': 123.0,
'ActualIncrementalBackupSizeInMegaBytes': 123.0,
'BackupProgressInMegaBytes': 123.0,
'CurrentBackupRateInMegaBytesPerSecond': 123.0,
'EstimatedSecondsToCompletion': 123,
'ElapsedTimeInSeconds': 123,
'SourceRegion': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'RestorableNodeTypes': [
'string',
],
'EnhancedVpcRouting': True|False
},
]
}
:returns:
CreateClusterSnapshot and CopyClusterSnapshot returns status as "creating".
DescribeClusterSnapshots returns status as "creating", "available", "final snapshot", or "failed".
DeleteClusterSnapshot returns status as "deleted". | entailment |
def modify_cluster(ClusterIdentifier=None, ClusterType=None, NodeType=None, NumberOfNodes=None, ClusterSecurityGroups=None, VpcSecurityGroupIds=None, MasterUserPassword=None, ClusterParameterGroupName=None, AutomatedSnapshotRetentionPeriod=None, PreferredMaintenanceWindow=None, ClusterVersion=None, AllowVersionUpgrade=None, HsmClientCertificateIdentifier=None, HsmConfigurationIdentifier=None, NewClusterIdentifier=None, PubliclyAccessible=None, ElasticIp=None, EnhancedVpcRouting=None):
"""
Modifies the settings for a cluster. For example, you can add another security or parameter group, update the preferred maintenance window, or change the master user password. Resetting a cluster password or modifying the security groups associated with a cluster do not need a reboot. However, modifying a parameter group requires a reboot for parameters to take effect. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Cluster Management Guide .
You can also change node type and the number of nodes to scale up or down the cluster. When resizing a cluster, you must specify both the number of nodes and the node type even if one of the parameters does not change.
See also: AWS API Documentation
:example: response = client.modify_cluster(
ClusterIdentifier='string',
ClusterType='string',
NodeType='string',
NumberOfNodes=123,
ClusterSecurityGroups=[
'string',
],
VpcSecurityGroupIds=[
'string',
],
MasterUserPassword='string',
ClusterParameterGroupName='string',
AutomatedSnapshotRetentionPeriod=123,
PreferredMaintenanceWindow='string',
ClusterVersion='string',
AllowVersionUpgrade=True|False,
HsmClientCertificateIdentifier='string',
HsmConfigurationIdentifier='string',
NewClusterIdentifier='string',
PubliclyAccessible=True|False,
ElasticIp='string',
EnhancedVpcRouting=True|False
)
:type ClusterIdentifier: string
:param ClusterIdentifier: [REQUIRED]
The unique identifier of the cluster to be modified.
Example: examplecluster
:type ClusterType: string
:param ClusterType: The new cluster type.
When you submit your cluster resize request, your existing cluster goes into a read-only mode. After Amazon Redshift provisions a new cluster based on your resize requirements, there will be outage for a period while the old cluster is deleted and your connection is switched to the new cluster. You can use DescribeResize to track the progress of the resize request.
Valid Values: multi-node | single-node
:type NodeType: string
:param NodeType: The new node type of the cluster. If you specify a new node type, you must also specify the number of nodes parameter.
When you submit your request to resize a cluster, Amazon Redshift sets access permissions for the cluster to read-only. After Amazon Redshift provisions a new cluster according to your resize requirements, there will be a temporary outage while the old cluster is deleted and your connection is switched to the new cluster. When the new connection is complete, the original access permissions for the cluster are restored. You can use DescribeResize to track the progress of the resize request.
Valid Values: ds1.xlarge | ds1.8xlarge | ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge .
:type NumberOfNodes: integer
:param NumberOfNodes: The new number of nodes of the cluster. If you specify a new number of nodes, you must also specify the node type parameter.
When you submit your request to resize a cluster, Amazon Redshift sets access permissions for the cluster to read-only. After Amazon Redshift provisions a new cluster according to your resize requirements, there will be a temporary outage while the old cluster is deleted and your connection is switched to the new cluster. When the new connection is complete, the original access permissions for the cluster are restored. You can use DescribeResize to track the progress of the resize request.
Valid Values: Integer greater than 0 .
:type ClusterSecurityGroups: list
:param ClusterSecurityGroups: A list of cluster security groups to be authorized on this cluster. This change is asynchronously applied as soon as possible.
Security groups currently associated with the cluster, and not in the list of groups to apply, will be revoked from the cluster.
Constraints:
Must be 1 to 255 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
(string) --
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of virtual private cloud (VPC) security groups to be associated with the cluster.
(string) --
:type MasterUserPassword: string
:param MasterUserPassword: The new password for the cluster master user. This change is asynchronously applied as soon as possible. Between the time of the request and the completion of the request, the MasterUserPassword element exists in the PendingModifiedValues element of the operation response.
Note
Operations never return the password, so this operation provides a way to regain access to the master user account for a cluster if the password is lost.
Default: Uses existing setting.
Constraints:
Must be between 8 and 64 characters in length.
Must contain at least one uppercase letter.
Must contain at least one lowercase letter.
Must contain one number.
Can be any printable ASCII character (ASCII code 33 to 126) except ' (single quote), ' (double quote), , /, @, or space.
:type ClusterParameterGroupName: string
:param ClusterParameterGroupName: The name of the cluster parameter group to apply to this cluster. This change is applied only after the cluster is rebooted. To reboot a cluster use RebootCluster .
Default: Uses existing setting.
Constraints: The cluster parameter group must be in the same parameter group family that matches the cluster version.
:type AutomatedSnapshotRetentionPeriod: integer
:param AutomatedSnapshotRetentionPeriod: The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot .
If you decrease the automated snapshot retention period from its current value, existing automated snapshots that fall outside of the new retention period will be immediately deleted.
Default: Uses existing setting.
Constraints: Must be a value from 0 to 35.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range (in UTC) during which system maintenance can occur, if necessary. If system maintenance is necessary during the window, it may result in an outage.
This maintenance window change is made immediately. If the new maintenance window indicates the current time, there must be at least 120 minutes between the current time and end of the window in order to ensure that pending changes are applied.
Default: Uses existing setting.
Format: ddd:hh24:mi-ddd:hh24:mi, for example wed:07:30-wed:08:00 .
Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
Constraints: Must be at least 30 minutes.
:type ClusterVersion: string
:param ClusterVersion: The new version number of the Amazon Redshift engine to upgrade to.
For major version upgrades, if a non-default cluster parameter group is currently in use, a new cluster parameter group in the cluster parameter group family for the new version must be specified. The new cluster parameter group can be the default for that cluster parameter group family. For more information about parameters and parameter groups, go to Amazon Redshift Parameter Groups in the Amazon Redshift Cluster Management Guide .
Example: 1.0
:type AllowVersionUpgrade: boolean
:param AllowVersionUpgrade: If true , major version upgrades will be applied automatically to the cluster during the maintenance window.
Default: false
:type HsmClientCertificateIdentifier: string
:param HsmClientCertificateIdentifier: Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
:type HsmConfigurationIdentifier: string
:param HsmConfigurationIdentifier: Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
:type NewClusterIdentifier: string
:param NewClusterIdentifier: The new identifier for the cluster.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
Alphabetic characters must be lowercase.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters within an AWS account.
Example: examplecluster
:type PubliclyAccessible: boolean
:param PubliclyAccessible: If true , the cluster can be accessed from a public network. Only clusters in VPCs can be set to be publicly available.
:type ElasticIp: string
:param ElasticIp: The Elastic IP (EIP) address for the cluster.
Constraints: The cluster must be provisioned in EC2-VPC and publicly-accessible through an Internet gateway. For more information about provisioning clusters in EC2-VPC, go to Supported Platforms to Launch Your Cluster in the Amazon Redshift Cluster Management Guide.
:type EnhancedVpcRouting: boolean
:param EnhancedVpcRouting: An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true , enhanced VPC routing is enabled.
Default: false
:rtype: dict
:return: {
'Cluster': {
'ClusterIdentifier': 'string',
'NodeType': 'string',
'ClusterStatus': 'string',
'ModifyStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123
},
'ClusterCreateTime': datetime(2015, 1, 1),
'AutomatedSnapshotRetentionPeriod': 123,
'ClusterSecurityGroups': [
{
'ClusterSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'ClusterParameterGroups': [
{
'ParameterGroupName': 'string',
'ParameterApplyStatus': 'string',
'ClusterParameterStatusList': [
{
'ParameterName': 'string',
'ParameterApplyStatus': 'string',
'ParameterApplyErrorDescription': 'string'
},
]
},
],
'ClusterSubnetGroupName': 'string',
'VpcId': 'string',
'AvailabilityZone': 'string',
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'MasterUserPassword': 'string',
'NodeType': 'string',
'NumberOfNodes': 123,
'ClusterType': 'string',
'ClusterVersion': 'string',
'AutomatedSnapshotRetentionPeriod': 123,
'ClusterIdentifier': 'string',
'PubliclyAccessible': True|False,
'EnhancedVpcRouting': True|False
},
'ClusterVersion': 'string',
'AllowVersionUpgrade': True|False,
'NumberOfNodes': 123,
'PubliclyAccessible': True|False,
'Encrypted': True|False,
'RestoreStatus': {
'Status': 'string',
'CurrentRestoreRateInMegaBytesPerSecond': 123.0,
'SnapshotSizeInMegaBytes': 123,
'ProgressInMegaBytes': 123,
'ElapsedTimeInSeconds': 123,
'EstimatedTimeToCompletionInSeconds': 123
},
'HsmStatus': {
'HsmClientCertificateIdentifier': 'string',
'HsmConfigurationIdentifier': 'string',
'Status': 'string'
},
'ClusterSnapshotCopyStatus': {
'DestinationRegion': 'string',
'RetentionPeriod': 123,
'SnapshotCopyGrantName': 'string'
},
'ClusterPublicKey': 'string',
'ClusterNodes': [
{
'NodeRole': 'string',
'PrivateIPAddress': 'string',
'PublicIPAddress': 'string'
},
],
'ElasticIpStatus': {
'ElasticIp': 'string',
'Status': 'string'
},
'ClusterRevisionNumber': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'KmsKeyId': 'string',
'EnhancedVpcRouting': True|False,
'IamRoles': [
{
'IamRoleArn': 'string',
'ApplyStatus': 'string'
},
]
}
}
:returns:
available
creating
deleting
final-snapshot
hardware-failure
incompatible-hsm
incompatible-network
incompatible-parameters
incompatible-restore
modifying
rebooting
renaming
resizing
rotating-keys
storage-full
updating-hsm
"""
pass | Modifies the settings for a cluster. For example, you can add another security or parameter group, update the preferred maintenance window, or change the master user password. Resetting a cluster password or modifying the security groups associated with a cluster do not need a reboot. However, modifying a parameter group requires a reboot for parameters to take effect. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Cluster Management Guide .
You can also change node type and the number of nodes to scale up or down the cluster. When resizing a cluster, you must specify both the number of nodes and the node type even if one of the parameters does not change.
See also: AWS API Documentation
:example: response = client.modify_cluster(
ClusterIdentifier='string',
ClusterType='string',
NodeType='string',
NumberOfNodes=123,
ClusterSecurityGroups=[
'string',
],
VpcSecurityGroupIds=[
'string',
],
MasterUserPassword='string',
ClusterParameterGroupName='string',
AutomatedSnapshotRetentionPeriod=123,
PreferredMaintenanceWindow='string',
ClusterVersion='string',
AllowVersionUpgrade=True|False,
HsmClientCertificateIdentifier='string',
HsmConfigurationIdentifier='string',
NewClusterIdentifier='string',
PubliclyAccessible=True|False,
ElasticIp='string',
EnhancedVpcRouting=True|False
)
:type ClusterIdentifier: string
:param ClusterIdentifier: [REQUIRED]
The unique identifier of the cluster to be modified.
Example: examplecluster
:type ClusterType: string
:param ClusterType: The new cluster type.
When you submit your cluster resize request, your existing cluster goes into a read-only mode. After Amazon Redshift provisions a new cluster based on your resize requirements, there will be outage for a period while the old cluster is deleted and your connection is switched to the new cluster. You can use DescribeResize to track the progress of the resize request.
Valid Values: multi-node | single-node
:type NodeType: string
:param NodeType: The new node type of the cluster. If you specify a new node type, you must also specify the number of nodes parameter.
When you submit your request to resize a cluster, Amazon Redshift sets access permissions for the cluster to read-only. After Amazon Redshift provisions a new cluster according to your resize requirements, there will be a temporary outage while the old cluster is deleted and your connection is switched to the new cluster. When the new connection is complete, the original access permissions for the cluster are restored. You can use DescribeResize to track the progress of the resize request.
Valid Values: ds1.xlarge | ds1.8xlarge | ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge .
:type NumberOfNodes: integer
:param NumberOfNodes: The new number of nodes of the cluster. If you specify a new number of nodes, you must also specify the node type parameter.
When you submit your request to resize a cluster, Amazon Redshift sets access permissions for the cluster to read-only. After Amazon Redshift provisions a new cluster according to your resize requirements, there will be a temporary outage while the old cluster is deleted and your connection is switched to the new cluster. When the new connection is complete, the original access permissions for the cluster are restored. You can use DescribeResize to track the progress of the resize request.
Valid Values: Integer greater than 0 .
:type ClusterSecurityGroups: list
:param ClusterSecurityGroups: A list of cluster security groups to be authorized on this cluster. This change is asynchronously applied as soon as possible.
Security groups currently associated with the cluster, and not in the list of groups to apply, will be revoked from the cluster.
Constraints:
Must be 1 to 255 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
(string) --
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of virtual private cloud (VPC) security groups to be associated with the cluster.
(string) --
:type MasterUserPassword: string
:param MasterUserPassword: The new password for the cluster master user. This change is asynchronously applied as soon as possible. Between the time of the request and the completion of the request, the MasterUserPassword element exists in the PendingModifiedValues element of the operation response.
Note
Operations never return the password, so this operation provides a way to regain access to the master user account for a cluster if the password is lost.
Default: Uses existing setting.
Constraints:
Must be between 8 and 64 characters in length.
Must contain at least one uppercase letter.
Must contain at least one lowercase letter.
Must contain one number.
Can be any printable ASCII character (ASCII code 33 to 126) except ' (single quote), ' (double quote), , /, @, or space.
:type ClusterParameterGroupName: string
:param ClusterParameterGroupName: The name of the cluster parameter group to apply to this cluster. This change is applied only after the cluster is rebooted. To reboot a cluster use RebootCluster .
Default: Uses existing setting.
Constraints: The cluster parameter group must be in the same parameter group family that matches the cluster version.
:type AutomatedSnapshotRetentionPeriod: integer
:param AutomatedSnapshotRetentionPeriod: The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot .
If you decrease the automated snapshot retention period from its current value, existing automated snapshots that fall outside of the new retention period will be immediately deleted.
Default: Uses existing setting.
Constraints: Must be a value from 0 to 35.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range (in UTC) during which system maintenance can occur, if necessary. If system maintenance is necessary during the window, it may result in an outage.
This maintenance window change is made immediately. If the new maintenance window indicates the current time, there must be at least 120 minutes between the current time and end of the window in order to ensure that pending changes are applied.
Default: Uses existing setting.
Format: ddd:hh24:mi-ddd:hh24:mi, for example wed:07:30-wed:08:00 .
Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
Constraints: Must be at least 30 minutes.
:type ClusterVersion: string
:param ClusterVersion: The new version number of the Amazon Redshift engine to upgrade to.
For major version upgrades, if a non-default cluster parameter group is currently in use, a new cluster parameter group in the cluster parameter group family for the new version must be specified. The new cluster parameter group can be the default for that cluster parameter group family. For more information about parameters and parameter groups, go to Amazon Redshift Parameter Groups in the Amazon Redshift Cluster Management Guide .
Example: 1.0
:type AllowVersionUpgrade: boolean
:param AllowVersionUpgrade: If true , major version upgrades will be applied automatically to the cluster during the maintenance window.
Default: false
:type HsmClientCertificateIdentifier: string
:param HsmClientCertificateIdentifier: Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
:type HsmConfigurationIdentifier: string
:param HsmConfigurationIdentifier: Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
:type NewClusterIdentifier: string
:param NewClusterIdentifier: The new identifier for the cluster.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
Alphabetic characters must be lowercase.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters within an AWS account.
Example: examplecluster
:type PubliclyAccessible: boolean
:param PubliclyAccessible: If true , the cluster can be accessed from a public network. Only clusters in VPCs can be set to be publicly available.
:type ElasticIp: string
:param ElasticIp: The Elastic IP (EIP) address for the cluster.
Constraints: The cluster must be provisioned in EC2-VPC and publicly-accessible through an Internet gateway. For more information about provisioning clusters in EC2-VPC, go to Supported Platforms to Launch Your Cluster in the Amazon Redshift Cluster Management Guide.
:type EnhancedVpcRouting: boolean
:param EnhancedVpcRouting: An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true , enhanced VPC routing is enabled.
Default: false
:rtype: dict
:return: {
'Cluster': {
'ClusterIdentifier': 'string',
'NodeType': 'string',
'ClusterStatus': 'string',
'ModifyStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123
},
'ClusterCreateTime': datetime(2015, 1, 1),
'AutomatedSnapshotRetentionPeriod': 123,
'ClusterSecurityGroups': [
{
'ClusterSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'ClusterParameterGroups': [
{
'ParameterGroupName': 'string',
'ParameterApplyStatus': 'string',
'ClusterParameterStatusList': [
{
'ParameterName': 'string',
'ParameterApplyStatus': 'string',
'ParameterApplyErrorDescription': 'string'
},
]
},
],
'ClusterSubnetGroupName': 'string',
'VpcId': 'string',
'AvailabilityZone': 'string',
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'MasterUserPassword': 'string',
'NodeType': 'string',
'NumberOfNodes': 123,
'ClusterType': 'string',
'ClusterVersion': 'string',
'AutomatedSnapshotRetentionPeriod': 123,
'ClusterIdentifier': 'string',
'PubliclyAccessible': True|False,
'EnhancedVpcRouting': True|False
},
'ClusterVersion': 'string',
'AllowVersionUpgrade': True|False,
'NumberOfNodes': 123,
'PubliclyAccessible': True|False,
'Encrypted': True|False,
'RestoreStatus': {
'Status': 'string',
'CurrentRestoreRateInMegaBytesPerSecond': 123.0,
'SnapshotSizeInMegaBytes': 123,
'ProgressInMegaBytes': 123,
'ElapsedTimeInSeconds': 123,
'EstimatedTimeToCompletionInSeconds': 123
},
'HsmStatus': {
'HsmClientCertificateIdentifier': 'string',
'HsmConfigurationIdentifier': 'string',
'Status': 'string'
},
'ClusterSnapshotCopyStatus': {
'DestinationRegion': 'string',
'RetentionPeriod': 123,
'SnapshotCopyGrantName': 'string'
},
'ClusterPublicKey': 'string',
'ClusterNodes': [
{
'NodeRole': 'string',
'PrivateIPAddress': 'string',
'PublicIPAddress': 'string'
},
],
'ElasticIpStatus': {
'ElasticIp': 'string',
'Status': 'string'
},
'ClusterRevisionNumber': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'KmsKeyId': 'string',
'EnhancedVpcRouting': True|False,
'IamRoles': [
{
'IamRoleArn': 'string',
'ApplyStatus': 'string'
},
]
}
}
:returns:
available
creating
deleting
final-snapshot
hardware-failure
incompatible-hsm
incompatible-network
incompatible-parameters
incompatible-restore
modifying
rebooting
renaming
resizing
rotating-keys
storage-full
updating-hsm | entailment |
def restore_from_cluster_snapshot(ClusterIdentifier=None, SnapshotIdentifier=None, SnapshotClusterIdentifier=None, Port=None, AvailabilityZone=None, AllowVersionUpgrade=None, ClusterSubnetGroupName=None, PubliclyAccessible=None, OwnerAccount=None, HsmClientCertificateIdentifier=None, HsmConfigurationIdentifier=None, ElasticIp=None, ClusterParameterGroupName=None, ClusterSecurityGroups=None, VpcSecurityGroupIds=None, PreferredMaintenanceWindow=None, AutomatedSnapshotRetentionPeriod=None, KmsKeyId=None, NodeType=None, EnhancedVpcRouting=None, AdditionalInfo=None, IamRoles=None):
"""
Creates a new cluster from a snapshot. By default, Amazon Redshift creates the resulting cluster with the same configuration as the original cluster from which the snapshot was created, except that the new cluster is created with the default cluster security and parameter groups. After Amazon Redshift creates the cluster, you can use the ModifyCluster API to associate a different security group and different parameter group with the restored cluster. If you are using a DS node type, you can also choose to change to another DS node type of the same size during restore.
If you restore a cluster into a VPC, you must provide a cluster subnet group where you want the cluster restored.
For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Cluster Management Guide .
See also: AWS API Documentation
:example: response = client.restore_from_cluster_snapshot(
ClusterIdentifier='string',
SnapshotIdentifier='string',
SnapshotClusterIdentifier='string',
Port=123,
AvailabilityZone='string',
AllowVersionUpgrade=True|False,
ClusterSubnetGroupName='string',
PubliclyAccessible=True|False,
OwnerAccount='string',
HsmClientCertificateIdentifier='string',
HsmConfigurationIdentifier='string',
ElasticIp='string',
ClusterParameterGroupName='string',
ClusterSecurityGroups=[
'string',
],
VpcSecurityGroupIds=[
'string',
],
PreferredMaintenanceWindow='string',
AutomatedSnapshotRetentionPeriod=123,
KmsKeyId='string',
NodeType='string',
EnhancedVpcRouting=True|False,
AdditionalInfo='string',
IamRoles=[
'string',
]
)
:type ClusterIdentifier: string
:param ClusterIdentifier: [REQUIRED]
The identifier of the cluster that will be created from restoring the snapshot.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
Alphabetic characters must be lowercase.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters within an AWS account.
:type SnapshotIdentifier: string
:param SnapshotIdentifier: [REQUIRED]
The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive.
Example: my-snapshot-id
:type SnapshotClusterIdentifier: string
:param SnapshotClusterIdentifier: The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.
:type Port: integer
:param Port: The port number on which the cluster accepts connections.
Default: The same port as the original cluster.
Constraints: Must be between 1115 and 65535 .
:type AvailabilityZone: string
:param AvailabilityZone: The Amazon EC2 Availability Zone in which to restore the cluster.
Default: A random, system-chosen Availability Zone.
Example: us-east-1a
:type AllowVersionUpgrade: boolean
:param AllowVersionUpgrade: If true , major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
Default: true
:type ClusterSubnetGroupName: string
:param ClusterSubnetGroupName: The name of the subnet group where you want to cluster restored.
A snapshot of cluster in VPC can be restored only in VPC. Therefore, you must provide subnet group name where you want the cluster restored.
:type PubliclyAccessible: boolean
:param PubliclyAccessible: If true , the cluster can be accessed from a public network.
:type OwnerAccount: string
:param OwnerAccount: The AWS customer account used to create or copy the snapshot. Required if you are restoring a snapshot you do not own, optional if you own the snapshot.
:type HsmClientCertificateIdentifier: string
:param HsmClientCertificateIdentifier: Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
:type HsmConfigurationIdentifier: string
:param HsmConfigurationIdentifier: Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
:type ElasticIp: string
:param ElasticIp: The elastic IP (EIP) address for the cluster.
:type ClusterParameterGroupName: string
:param ClusterParameterGroupName: The name of the parameter group to be associated with this cluster.
Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups .
Constraints:
Must be 1 to 255 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
:type ClusterSecurityGroups: list
:param ClusterSecurityGroups: A list of security groups to be associated with this cluster.
Default: The default cluster security group for Amazon Redshift.
Cluster security groups only apply to clusters outside of VPCs.
(string) --
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.
Default: The default VPC security group is associated with the cluster.
VPC security groups only apply to clusters in VPCs.
(string) --
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range (in UTC) during which automated cluster maintenance can occur.
Format: ddd:hh24:mi-ddd:hh24:mi
Default: The value selected for the cluster from which the snapshot was taken. For more information about the time blocks for each region, see Maintenance Windows in Amazon Redshift Cluster Management Guide.
Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
Constraints: Minimum 30-minute window.
:type AutomatedSnapshotRetentionPeriod: integer
:param AutomatedSnapshotRetentionPeriod: The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot .
Default: The value selected for the cluster from which the snapshot was taken.
Constraints: Must be a value from 0 to 35.
:type KmsKeyId: string
:param KmsKeyId: The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster that you restore from a shared snapshot.
:type NodeType: string
:param NodeType: The node type that the restored cluster will be provisioned with.
Default: The node type of the cluster from which the snapshot was taken. You can modify this if you are using any DS node type. In that case, you can choose to restore into another DS node type of the same size. For example, you can restore ds1.8xlarge into ds2.8xlarge, or ds2.xlarge into ds1.xlarge. If you have a DC instance type, you must restore into that same instance type and size. In other words, you can only restore a dc1.large instance type into another dc1.large instance type. For more information about node types, see About Clusters and Nodes in the Amazon Redshift Cluster Management Guide
:type EnhancedVpcRouting: boolean
:param EnhancedVpcRouting: An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true , enhanced VPC routing is enabled.
Default: false
:type AdditionalInfo: string
:param AdditionalInfo: Reserved.
:type IamRoles: list
:param IamRoles: A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles in a single request.
A cluster can have up to 10 IAM roles associated at any time.
(string) --
:rtype: dict
:return: {
'Cluster': {
'ClusterIdentifier': 'string',
'NodeType': 'string',
'ClusterStatus': 'string',
'ModifyStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123
},
'ClusterCreateTime': datetime(2015, 1, 1),
'AutomatedSnapshotRetentionPeriod': 123,
'ClusterSecurityGroups': [
{
'ClusterSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'ClusterParameterGroups': [
{
'ParameterGroupName': 'string',
'ParameterApplyStatus': 'string',
'ClusterParameterStatusList': [
{
'ParameterName': 'string',
'ParameterApplyStatus': 'string',
'ParameterApplyErrorDescription': 'string'
},
]
},
],
'ClusterSubnetGroupName': 'string',
'VpcId': 'string',
'AvailabilityZone': 'string',
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'MasterUserPassword': 'string',
'NodeType': 'string',
'NumberOfNodes': 123,
'ClusterType': 'string',
'ClusterVersion': 'string',
'AutomatedSnapshotRetentionPeriod': 123,
'ClusterIdentifier': 'string',
'PubliclyAccessible': True|False,
'EnhancedVpcRouting': True|False
},
'ClusterVersion': 'string',
'AllowVersionUpgrade': True|False,
'NumberOfNodes': 123,
'PubliclyAccessible': True|False,
'Encrypted': True|False,
'RestoreStatus': {
'Status': 'string',
'CurrentRestoreRateInMegaBytesPerSecond': 123.0,
'SnapshotSizeInMegaBytes': 123,
'ProgressInMegaBytes': 123,
'ElapsedTimeInSeconds': 123,
'EstimatedTimeToCompletionInSeconds': 123
},
'HsmStatus': {
'HsmClientCertificateIdentifier': 'string',
'HsmConfigurationIdentifier': 'string',
'Status': 'string'
},
'ClusterSnapshotCopyStatus': {
'DestinationRegion': 'string',
'RetentionPeriod': 123,
'SnapshotCopyGrantName': 'string'
},
'ClusterPublicKey': 'string',
'ClusterNodes': [
{
'NodeRole': 'string',
'PrivateIPAddress': 'string',
'PublicIPAddress': 'string'
},
],
'ElasticIpStatus': {
'ElasticIp': 'string',
'Status': 'string'
},
'ClusterRevisionNumber': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'KmsKeyId': 'string',
'EnhancedVpcRouting': True|False,
'IamRoles': [
{
'IamRoleArn': 'string',
'ApplyStatus': 'string'
},
]
}
}
:returns:
available
creating
deleting
final-snapshot
hardware-failure
incompatible-hsm
incompatible-network
incompatible-parameters
incompatible-restore
modifying
rebooting
renaming
resizing
rotating-keys
storage-full
updating-hsm
"""
pass | Creates a new cluster from a snapshot. By default, Amazon Redshift creates the resulting cluster with the same configuration as the original cluster from which the snapshot was created, except that the new cluster is created with the default cluster security and parameter groups. After Amazon Redshift creates the cluster, you can use the ModifyCluster API to associate a different security group and different parameter group with the restored cluster. If you are using a DS node type, you can also choose to change to another DS node type of the same size during restore.
If you restore a cluster into a VPC, you must provide a cluster subnet group where you want the cluster restored.
For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Cluster Management Guide .
See also: AWS API Documentation
:example: response = client.restore_from_cluster_snapshot(
ClusterIdentifier='string',
SnapshotIdentifier='string',
SnapshotClusterIdentifier='string',
Port=123,
AvailabilityZone='string',
AllowVersionUpgrade=True|False,
ClusterSubnetGroupName='string',
PubliclyAccessible=True|False,
OwnerAccount='string',
HsmClientCertificateIdentifier='string',
HsmConfigurationIdentifier='string',
ElasticIp='string',
ClusterParameterGroupName='string',
ClusterSecurityGroups=[
'string',
],
VpcSecurityGroupIds=[
'string',
],
PreferredMaintenanceWindow='string',
AutomatedSnapshotRetentionPeriod=123,
KmsKeyId='string',
NodeType='string',
EnhancedVpcRouting=True|False,
AdditionalInfo='string',
IamRoles=[
'string',
]
)
:type ClusterIdentifier: string
:param ClusterIdentifier: [REQUIRED]
The identifier of the cluster that will be created from restoring the snapshot.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
Alphabetic characters must be lowercase.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Must be unique for all clusters within an AWS account.
:type SnapshotIdentifier: string
:param SnapshotIdentifier: [REQUIRED]
The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive.
Example: my-snapshot-id
:type SnapshotClusterIdentifier: string
:param SnapshotClusterIdentifier: The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.
:type Port: integer
:param Port: The port number on which the cluster accepts connections.
Default: The same port as the original cluster.
Constraints: Must be between 1115 and 65535 .
:type AvailabilityZone: string
:param AvailabilityZone: The Amazon EC2 Availability Zone in which to restore the cluster.
Default: A random, system-chosen Availability Zone.
Example: us-east-1a
:type AllowVersionUpgrade: boolean
:param AllowVersionUpgrade: If true , major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
Default: true
:type ClusterSubnetGroupName: string
:param ClusterSubnetGroupName: The name of the subnet group where you want to cluster restored.
A snapshot of cluster in VPC can be restored only in VPC. Therefore, you must provide subnet group name where you want the cluster restored.
:type PubliclyAccessible: boolean
:param PubliclyAccessible: If true , the cluster can be accessed from a public network.
:type OwnerAccount: string
:param OwnerAccount: The AWS customer account used to create or copy the snapshot. Required if you are restoring a snapshot you do not own, optional if you own the snapshot.
:type HsmClientCertificateIdentifier: string
:param HsmClientCertificateIdentifier: Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM.
:type HsmConfigurationIdentifier: string
:param HsmConfigurationIdentifier: Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.
:type ElasticIp: string
:param ElasticIp: The elastic IP (EIP) address for the cluster.
:type ClusterParameterGroupName: string
:param ClusterParameterGroupName: The name of the parameter group to be associated with this cluster.
Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups .
Constraints:
Must be 1 to 255 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
:type ClusterSecurityGroups: list
:param ClusterSecurityGroups: A list of security groups to be associated with this cluster.
Default: The default cluster security group for Amazon Redshift.
Cluster security groups only apply to clusters outside of VPCs.
(string) --
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.
Default: The default VPC security group is associated with the cluster.
VPC security groups only apply to clusters in VPCs.
(string) --
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range (in UTC) during which automated cluster maintenance can occur.
Format: ddd:hh24:mi-ddd:hh24:mi
Default: The value selected for the cluster from which the snapshot was taken. For more information about the time blocks for each region, see Maintenance Windows in Amazon Redshift Cluster Management Guide.
Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
Constraints: Minimum 30-minute window.
:type AutomatedSnapshotRetentionPeriod: integer
:param AutomatedSnapshotRetentionPeriod: The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with CreateClusterSnapshot .
Default: The value selected for the cluster from which the snapshot was taken.
Constraints: Must be a value from 0 to 35.
:type KmsKeyId: string
:param KmsKeyId: The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster that you restore from a shared snapshot.
:type NodeType: string
:param NodeType: The node type that the restored cluster will be provisioned with.
Default: The node type of the cluster from which the snapshot was taken. You can modify this if you are using any DS node type. In that case, you can choose to restore into another DS node type of the same size. For example, you can restore ds1.8xlarge into ds2.8xlarge, or ds2.xlarge into ds1.xlarge. If you have a DC instance type, you must restore into that same instance type and size. In other words, you can only restore a dc1.large instance type into another dc1.large instance type. For more information about node types, see About Clusters and Nodes in the Amazon Redshift Cluster Management Guide
:type EnhancedVpcRouting: boolean
:param EnhancedVpcRouting: An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is true , enhanced VPC routing is enabled.
Default: false
:type AdditionalInfo: string
:param AdditionalInfo: Reserved.
:type IamRoles: list
:param IamRoles: A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles in a single request.
A cluster can have up to 10 IAM roles associated at any time.
(string) --
:rtype: dict
:return: {
'Cluster': {
'ClusterIdentifier': 'string',
'NodeType': 'string',
'ClusterStatus': 'string',
'ModifyStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123
},
'ClusterCreateTime': datetime(2015, 1, 1),
'AutomatedSnapshotRetentionPeriod': 123,
'ClusterSecurityGroups': [
{
'ClusterSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'ClusterParameterGroups': [
{
'ParameterGroupName': 'string',
'ParameterApplyStatus': 'string',
'ClusterParameterStatusList': [
{
'ParameterName': 'string',
'ParameterApplyStatus': 'string',
'ParameterApplyErrorDescription': 'string'
},
]
},
],
'ClusterSubnetGroupName': 'string',
'VpcId': 'string',
'AvailabilityZone': 'string',
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'MasterUserPassword': 'string',
'NodeType': 'string',
'NumberOfNodes': 123,
'ClusterType': 'string',
'ClusterVersion': 'string',
'AutomatedSnapshotRetentionPeriod': 123,
'ClusterIdentifier': 'string',
'PubliclyAccessible': True|False,
'EnhancedVpcRouting': True|False
},
'ClusterVersion': 'string',
'AllowVersionUpgrade': True|False,
'NumberOfNodes': 123,
'PubliclyAccessible': True|False,
'Encrypted': True|False,
'RestoreStatus': {
'Status': 'string',
'CurrentRestoreRateInMegaBytesPerSecond': 123.0,
'SnapshotSizeInMegaBytes': 123,
'ProgressInMegaBytes': 123,
'ElapsedTimeInSeconds': 123,
'EstimatedTimeToCompletionInSeconds': 123
},
'HsmStatus': {
'HsmClientCertificateIdentifier': 'string',
'HsmConfigurationIdentifier': 'string',
'Status': 'string'
},
'ClusterSnapshotCopyStatus': {
'DestinationRegion': 'string',
'RetentionPeriod': 123,
'SnapshotCopyGrantName': 'string'
},
'ClusterPublicKey': 'string',
'ClusterNodes': [
{
'NodeRole': 'string',
'PrivateIPAddress': 'string',
'PublicIPAddress': 'string'
},
],
'ElasticIpStatus': {
'ElasticIp': 'string',
'Status': 'string'
},
'ClusterRevisionNumber': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'KmsKeyId': 'string',
'EnhancedVpcRouting': True|False,
'IamRoles': [
{
'IamRoleArn': 'string',
'ApplyStatus': 'string'
},
]
}
}
:returns:
available
creating
deleting
final-snapshot
hardware-failure
incompatible-hsm
incompatible-network
incompatible-parameters
incompatible-restore
modifying
rebooting
renaming
resizing
rotating-keys
storage-full
updating-hsm | entailment |
def create_cluster(JobType=None, Resources=None, Description=None, AddressId=None, KmsKeyARN=None, RoleARN=None, SnowballType=None, ShippingOption=None, Notification=None, ForwardingAddressId=None):
"""
Creates an empty cluster. Each cluster supports five nodes. You use the CreateJob action separately to create the jobs for each of these nodes. The cluster does not ship until these five node jobs have been created.
See also: AWS API Documentation
Examples
Creates an empty cluster. Each cluster supports five nodes. You use the CreateJob action separately to create the jobs for each of these nodes. The cluster does not ship until these five node jobs have been created.
Expected Output:
:example: response = client.create_cluster(
JobType='IMPORT'|'EXPORT'|'LOCAL_USE',
Resources={
'S3Resources': [
{
'BucketArn': 'string',
'KeyRange': {
'BeginMarker': 'string',
'EndMarker': 'string'
}
},
],
'LambdaResources': [
{
'LambdaArn': 'string',
'EventTriggers': [
{
'EventResourceARN': 'string'
},
]
},
]
},
Description='string',
AddressId='string',
KmsKeyARN='string',
RoleARN='string',
SnowballType='STANDARD'|'EDGE',
ShippingOption='SECOND_DAY'|'NEXT_DAY'|'EXPRESS'|'STANDARD',
Notification={
'SnsTopicARN': 'string',
'JobStatesToNotify': [
'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
],
'NotifyAll': True|False
},
ForwardingAddressId='string'
)
:type JobType: string
:param JobType: [REQUIRED]
The type of job for this cluster. Currently, the only job type supported for clusters is LOCAL_USE .
:type Resources: dict
:param Resources: [REQUIRED]
The resources associated with the cluster job. These resources include Amazon S3 buckets and optional AWS Lambda functions written in the Python language.
S3Resources (list) --An array of S3Resource objects.
(dict) --Each S3Resource object represents an Amazon S3 bucket that your transferred data will be exported from or imported into. For export jobs, this object can have an optional KeyRange value. The length of the range is defined at job creation, and has either an inclusive BeginMarker , an inclusive EndMarker , or both. Ranges are UTF-8 binary sorted.
BucketArn (string) --The Amazon Resource Name (ARN) of an Amazon S3 bucket.
KeyRange (dict) --For export jobs, you can provide an optional KeyRange within a specific Amazon S3 bucket. The length of the range is defined at job creation, and has either an inclusive BeginMarker , an inclusive EndMarker , or both. Ranges are UTF-8 binary sorted.
BeginMarker (string) --The key that starts an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
EndMarker (string) --The key that ends an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
LambdaResources (list) --The Python-language Lambda functions for this job.
(dict) --Identifies
LambdaArn (string) --An Amazon Resource Name (ARN) that represents an AWS Lambda function to be triggered by PUT object actions on the associated local Amazon S3 resource.
EventTriggers (list) --The array of ARNs for S3Resource objects to trigger the LambdaResource objects associated with this job.
(dict) --The container for the EventTriggerDefinition$EventResourceARN .
EventResourceARN (string) --The Amazon Resource Name (ARN) for any local Amazon S3 resource that is an AWS Lambda function's event trigger associated with this job.
:type Description: string
:param Description: An optional description of this specific cluster, for example Environmental Data Cluster-01 .
:type AddressId: string
:param AddressId: [REQUIRED]
The ID for the address that you want the cluster shipped to.
:type KmsKeyARN: string
:param KmsKeyARN: The KmsKeyARN value that you want to associate with this cluster. KmsKeyARN values are created by using the CreateKey API action in AWS Key Management Service (AWS KMS).
:type RoleARN: string
:param RoleARN: [REQUIRED]
The RoleARN that you want to associate with this cluster. RoleArn values are created by using the CreateRole API action in AWS Identity and Access Management (IAM).
:type SnowballType: string
:param SnowballType: The type of AWS Snowball appliance to use for this cluster. Currently, the only supported appliance type for cluster jobs is EDGE .
:type ShippingOption: string
:param ShippingOption: [REQUIRED]
The shipping speed for each node in this cluster. This speed doesn't dictate how soon you'll get each Snowball Edge appliance, rather it represents how quickly each appliance moves to its destination while in transit. Regional shipping speeds are as follows:
In Australia, you have access to express shipping. Typically, appliances shipped express are delivered in about a day.
In the European Union (EU), you have access to express shipping. Typically, Snowball Edges shipped express are delivered in about a day. In addition, most countries in the EU have access to standard shipping, which typically takes less than a week, one way.
In India, Snowball Edges are delivered in one to seven days.
In the US, you have access to one-day shipping and two-day shipping.
:type Notification: dict
:param Notification: The Amazon Simple Notification Service (Amazon SNS) notification settings for this cluster.
SnsTopicARN (string) --The new SNS TopicArn that you want to associate with this job. You can create Amazon Resource Names (ARNs) for topics by using the CreateTopic Amazon SNS API action.
You can subscribe email addresses to an Amazon SNS topic through the AWS Management Console, or by using the Subscribe AWS Simple Notification Service (SNS) API action.
JobStatesToNotify (list) --The list of job states that will trigger a notification for this job.
(string) --
NotifyAll (boolean) --Any change in job state will trigger a notification for this job.
:type ForwardingAddressId: string
:param ForwardingAddressId: The forwarding address ID for a cluster. This field is not supported in most regions.
:rtype: dict
:return: {
'ClusterId': 'string'
}
"""
pass | Creates an empty cluster. Each cluster supports five nodes. You use the CreateJob action separately to create the jobs for each of these nodes. The cluster does not ship until these five node jobs have been created.
See also: AWS API Documentation
Examples
Creates an empty cluster. Each cluster supports five nodes. You use the CreateJob action separately to create the jobs for each of these nodes. The cluster does not ship until these five node jobs have been created.
Expected Output:
:example: response = client.create_cluster(
JobType='IMPORT'|'EXPORT'|'LOCAL_USE',
Resources={
'S3Resources': [
{
'BucketArn': 'string',
'KeyRange': {
'BeginMarker': 'string',
'EndMarker': 'string'
}
},
],
'LambdaResources': [
{
'LambdaArn': 'string',
'EventTriggers': [
{
'EventResourceARN': 'string'
},
]
},
]
},
Description='string',
AddressId='string',
KmsKeyARN='string',
RoleARN='string',
SnowballType='STANDARD'|'EDGE',
ShippingOption='SECOND_DAY'|'NEXT_DAY'|'EXPRESS'|'STANDARD',
Notification={
'SnsTopicARN': 'string',
'JobStatesToNotify': [
'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
],
'NotifyAll': True|False
},
ForwardingAddressId='string'
)
:type JobType: string
:param JobType: [REQUIRED]
The type of job for this cluster. Currently, the only job type supported for clusters is LOCAL_USE .
:type Resources: dict
:param Resources: [REQUIRED]
The resources associated with the cluster job. These resources include Amazon S3 buckets and optional AWS Lambda functions written in the Python language.
S3Resources (list) --An array of S3Resource objects.
(dict) --Each S3Resource object represents an Amazon S3 bucket that your transferred data will be exported from or imported into. For export jobs, this object can have an optional KeyRange value. The length of the range is defined at job creation, and has either an inclusive BeginMarker , an inclusive EndMarker , or both. Ranges are UTF-8 binary sorted.
BucketArn (string) --The Amazon Resource Name (ARN) of an Amazon S3 bucket.
KeyRange (dict) --For export jobs, you can provide an optional KeyRange within a specific Amazon S3 bucket. The length of the range is defined at job creation, and has either an inclusive BeginMarker , an inclusive EndMarker , or both. Ranges are UTF-8 binary sorted.
BeginMarker (string) --The key that starts an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
EndMarker (string) --The key that ends an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
LambdaResources (list) --The Python-language Lambda functions for this job.
(dict) --Identifies
LambdaArn (string) --An Amazon Resource Name (ARN) that represents an AWS Lambda function to be triggered by PUT object actions on the associated local Amazon S3 resource.
EventTriggers (list) --The array of ARNs for S3Resource objects to trigger the LambdaResource objects associated with this job.
(dict) --The container for the EventTriggerDefinition$EventResourceARN .
EventResourceARN (string) --The Amazon Resource Name (ARN) for any local Amazon S3 resource that is an AWS Lambda function's event trigger associated with this job.
:type Description: string
:param Description: An optional description of this specific cluster, for example Environmental Data Cluster-01 .
:type AddressId: string
:param AddressId: [REQUIRED]
The ID for the address that you want the cluster shipped to.
:type KmsKeyARN: string
:param KmsKeyARN: The KmsKeyARN value that you want to associate with this cluster. KmsKeyARN values are created by using the CreateKey API action in AWS Key Management Service (AWS KMS).
:type RoleARN: string
:param RoleARN: [REQUIRED]
The RoleARN that you want to associate with this cluster. RoleArn values are created by using the CreateRole API action in AWS Identity and Access Management (IAM).
:type SnowballType: string
:param SnowballType: The type of AWS Snowball appliance to use for this cluster. Currently, the only supported appliance type for cluster jobs is EDGE .
:type ShippingOption: string
:param ShippingOption: [REQUIRED]
The shipping speed for each node in this cluster. This speed doesn't dictate how soon you'll get each Snowball Edge appliance, rather it represents how quickly each appliance moves to its destination while in transit. Regional shipping speeds are as follows:
In Australia, you have access to express shipping. Typically, appliances shipped express are delivered in about a day.
In the European Union (EU), you have access to express shipping. Typically, Snowball Edges shipped express are delivered in about a day. In addition, most countries in the EU have access to standard shipping, which typically takes less than a week, one way.
In India, Snowball Edges are delivered in one to seven days.
In the US, you have access to one-day shipping and two-day shipping.
:type Notification: dict
:param Notification: The Amazon Simple Notification Service (Amazon SNS) notification settings for this cluster.
SnsTopicARN (string) --The new SNS TopicArn that you want to associate with this job. You can create Amazon Resource Names (ARNs) for topics by using the CreateTopic Amazon SNS API action.
You can subscribe email addresses to an Amazon SNS topic through the AWS Management Console, or by using the Subscribe AWS Simple Notification Service (SNS) API action.
JobStatesToNotify (list) --The list of job states that will trigger a notification for this job.
(string) --
NotifyAll (boolean) --Any change in job state will trigger a notification for this job.
:type ForwardingAddressId: string
:param ForwardingAddressId: The forwarding address ID for a cluster. This field is not supported in most regions.
:rtype: dict
:return: {
'ClusterId': 'string'
} | entailment |
def create_job(JobType=None, Resources=None, Description=None, AddressId=None, KmsKeyARN=None, RoleARN=None, SnowballCapacityPreference=None, ShippingOption=None, Notification=None, ClusterId=None, SnowballType=None, ForwardingAddressId=None):
"""
Creates a job to import or export data between Amazon S3 and your on-premises data center. Your AWS account must have the right trust policies and permissions in place to create a job for Snowball. If you're creating a job for a node in a cluster, you only need to provide the clusterId value; the other job attributes are inherited from the cluster.
See also: AWS API Documentation
Examples
Creates a job to import or export data between Amazon S3 and your on-premises data center. Your AWS account must have the right trust policies and permissions in place to create a job for Snowball. If you're creating a job for a node in a cluster, you only need to provide the clusterId value; the other job attributes are inherited from the cluster.
Expected Output:
:example: response = client.create_job(
JobType='IMPORT'|'EXPORT'|'LOCAL_USE',
Resources={
'S3Resources': [
{
'BucketArn': 'string',
'KeyRange': {
'BeginMarker': 'string',
'EndMarker': 'string'
}
},
],
'LambdaResources': [
{
'LambdaArn': 'string',
'EventTriggers': [
{
'EventResourceARN': 'string'
},
]
},
]
},
Description='string',
AddressId='string',
KmsKeyARN='string',
RoleARN='string',
SnowballCapacityPreference='T50'|'T80'|'T100'|'NoPreference',
ShippingOption='SECOND_DAY'|'NEXT_DAY'|'EXPRESS'|'STANDARD',
Notification={
'SnsTopicARN': 'string',
'JobStatesToNotify': [
'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
],
'NotifyAll': True|False
},
ClusterId='string',
SnowballType='STANDARD'|'EDGE',
ForwardingAddressId='string'
)
:type JobType: string
:param JobType: Defines the type of job that you're creating.
:type Resources: dict
:param Resources: Defines the Amazon S3 buckets associated with this job.
With IMPORT jobs, you specify the bucket or buckets that your transferred data will be imported into.
With EXPORT jobs, you specify the bucket or buckets that your transferred data will be exported from. Optionally, you can also specify a KeyRange value. If you choose to export a range, you define the length of the range by providing either an inclusive BeginMarker value, an inclusive EndMarker value, or both. Ranges are UTF-8 binary sorted.
S3Resources (list) --An array of S3Resource objects.
(dict) --Each S3Resource object represents an Amazon S3 bucket that your transferred data will be exported from or imported into. For export jobs, this object can have an optional KeyRange value. The length of the range is defined at job creation, and has either an inclusive BeginMarker , an inclusive EndMarker , or both. Ranges are UTF-8 binary sorted.
BucketArn (string) --The Amazon Resource Name (ARN) of an Amazon S3 bucket.
KeyRange (dict) --For export jobs, you can provide an optional KeyRange within a specific Amazon S3 bucket. The length of the range is defined at job creation, and has either an inclusive BeginMarker , an inclusive EndMarker , or both. Ranges are UTF-8 binary sorted.
BeginMarker (string) --The key that starts an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
EndMarker (string) --The key that ends an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
LambdaResources (list) --The Python-language Lambda functions for this job.
(dict) --Identifies
LambdaArn (string) --An Amazon Resource Name (ARN) that represents an AWS Lambda function to be triggered by PUT object actions on the associated local Amazon S3 resource.
EventTriggers (list) --The array of ARNs for S3Resource objects to trigger the LambdaResource objects associated with this job.
(dict) --The container for the EventTriggerDefinition$EventResourceARN .
EventResourceARN (string) --The Amazon Resource Name (ARN) for any local Amazon S3 resource that is an AWS Lambda function's event trigger associated with this job.
:type Description: string
:param Description: Defines an optional description of this specific job, for example Important Photos 2016-08-11 .
:type AddressId: string
:param AddressId: The ID for the address that you want the Snowball shipped to.
:type KmsKeyARN: string
:param KmsKeyARN: The KmsKeyARN that you want to associate with this job. KmsKeyARN s are created using the CreateKey AWS Key Management Service (KMS) API action.
:type RoleARN: string
:param RoleARN: The RoleARN that you want to associate with this job. RoleArn s are created using the CreateRole AWS Identity and Access Management (IAM) API action.
:type SnowballCapacityPreference: string
:param SnowballCapacityPreference: If your job is being created in one of the US regions, you have the option of specifying what size Snowball you'd like for this job. In all other regions, Snowballs come with 80 TB in storage capacity.
:type ShippingOption: string
:param ShippingOption: The shipping speed for this job. This speed doesn't dictate how soon you'll get the Snowball, rather it represents how quickly the Snowball moves to its destination while in transit. Regional shipping speeds are as follows:
In Australia, you have access to express shipping. Typically, Snowballs shipped express are delivered in about a day.
In the European Union (EU), you have access to express shipping. Typically, Snowballs shipped express are delivered in about a day. In addition, most countries in the EU have access to standard shipping, which typically takes less than a week, one way.
In India, Snowballs are delivered in one to seven days.
In the US, you have access to one-day shipping and two-day shipping.
:type Notification: dict
:param Notification: Defines the Amazon Simple Notification Service (Amazon SNS) notification settings for this job.
SnsTopicARN (string) --The new SNS TopicArn that you want to associate with this job. You can create Amazon Resource Names (ARNs) for topics by using the CreateTopic Amazon SNS API action.
You can subscribe email addresses to an Amazon SNS topic through the AWS Management Console, or by using the Subscribe AWS Simple Notification Service (SNS) API action.
JobStatesToNotify (list) --The list of job states that will trigger a notification for this job.
(string) --
NotifyAll (boolean) --Any change in job state will trigger a notification for this job.
:type ClusterId: string
:param ClusterId: The ID of a cluster. If you're creating a job for a node in a cluster, you need to provide only this clusterId value. The other job attributes are inherited from the cluster.
:type SnowballType: string
:param SnowballType: The type of AWS Snowball appliance to use for this job. Currently, the only supported appliance type for cluster jobs is EDGE .
:type ForwardingAddressId: string
:param ForwardingAddressId: The forwarding address ID for a job. This field is not supported in most regions.
:rtype: dict
:return: {
'JobId': 'string'
}
"""
pass | Creates a job to import or export data between Amazon S3 and your on-premises data center. Your AWS account must have the right trust policies and permissions in place to create a job for Snowball. If you're creating a job for a node in a cluster, you only need to provide the clusterId value; the other job attributes are inherited from the cluster.
See also: AWS API Documentation
Examples
Creates a job to import or export data between Amazon S3 and your on-premises data center. Your AWS account must have the right trust policies and permissions in place to create a job for Snowball. If you're creating a job for a node in a cluster, you only need to provide the clusterId value; the other job attributes are inherited from the cluster.
Expected Output:
:example: response = client.create_job(
JobType='IMPORT'|'EXPORT'|'LOCAL_USE',
Resources={
'S3Resources': [
{
'BucketArn': 'string',
'KeyRange': {
'BeginMarker': 'string',
'EndMarker': 'string'
}
},
],
'LambdaResources': [
{
'LambdaArn': 'string',
'EventTriggers': [
{
'EventResourceARN': 'string'
},
]
},
]
},
Description='string',
AddressId='string',
KmsKeyARN='string',
RoleARN='string',
SnowballCapacityPreference='T50'|'T80'|'T100'|'NoPreference',
ShippingOption='SECOND_DAY'|'NEXT_DAY'|'EXPRESS'|'STANDARD',
Notification={
'SnsTopicARN': 'string',
'JobStatesToNotify': [
'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
],
'NotifyAll': True|False
},
ClusterId='string',
SnowballType='STANDARD'|'EDGE',
ForwardingAddressId='string'
)
:type JobType: string
:param JobType: Defines the type of job that you're creating.
:type Resources: dict
:param Resources: Defines the Amazon S3 buckets associated with this job.
With IMPORT jobs, you specify the bucket or buckets that your transferred data will be imported into.
With EXPORT jobs, you specify the bucket or buckets that your transferred data will be exported from. Optionally, you can also specify a KeyRange value. If you choose to export a range, you define the length of the range by providing either an inclusive BeginMarker value, an inclusive EndMarker value, or both. Ranges are UTF-8 binary sorted.
S3Resources (list) --An array of S3Resource objects.
(dict) --Each S3Resource object represents an Amazon S3 bucket that your transferred data will be exported from or imported into. For export jobs, this object can have an optional KeyRange value. The length of the range is defined at job creation, and has either an inclusive BeginMarker , an inclusive EndMarker , or both. Ranges are UTF-8 binary sorted.
BucketArn (string) --The Amazon Resource Name (ARN) of an Amazon S3 bucket.
KeyRange (dict) --For export jobs, you can provide an optional KeyRange within a specific Amazon S3 bucket. The length of the range is defined at job creation, and has either an inclusive BeginMarker , an inclusive EndMarker , or both. Ranges are UTF-8 binary sorted.
BeginMarker (string) --The key that starts an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
EndMarker (string) --The key that ends an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
LambdaResources (list) --The Python-language Lambda functions for this job.
(dict) --Identifies
LambdaArn (string) --An Amazon Resource Name (ARN) that represents an AWS Lambda function to be triggered by PUT object actions on the associated local Amazon S3 resource.
EventTriggers (list) --The array of ARNs for S3Resource objects to trigger the LambdaResource objects associated with this job.
(dict) --The container for the EventTriggerDefinition$EventResourceARN .
EventResourceARN (string) --The Amazon Resource Name (ARN) for any local Amazon S3 resource that is an AWS Lambda function's event trigger associated with this job.
:type Description: string
:param Description: Defines an optional description of this specific job, for example Important Photos 2016-08-11 .
:type AddressId: string
:param AddressId: The ID for the address that you want the Snowball shipped to.
:type KmsKeyARN: string
:param KmsKeyARN: The KmsKeyARN that you want to associate with this job. KmsKeyARN s are created using the CreateKey AWS Key Management Service (KMS) API action.
:type RoleARN: string
:param RoleARN: The RoleARN that you want to associate with this job. RoleArn s are created using the CreateRole AWS Identity and Access Management (IAM) API action.
:type SnowballCapacityPreference: string
:param SnowballCapacityPreference: If your job is being created in one of the US regions, you have the option of specifying what size Snowball you'd like for this job. In all other regions, Snowballs come with 80 TB in storage capacity.
:type ShippingOption: string
:param ShippingOption: The shipping speed for this job. This speed doesn't dictate how soon you'll get the Snowball, rather it represents how quickly the Snowball moves to its destination while in transit. Regional shipping speeds are as follows:
In Australia, you have access to express shipping. Typically, Snowballs shipped express are delivered in about a day.
In the European Union (EU), you have access to express shipping. Typically, Snowballs shipped express are delivered in about a day. In addition, most countries in the EU have access to standard shipping, which typically takes less than a week, one way.
In India, Snowballs are delivered in one to seven days.
In the US, you have access to one-day shipping and two-day shipping.
:type Notification: dict
:param Notification: Defines the Amazon Simple Notification Service (Amazon SNS) notification settings for this job.
SnsTopicARN (string) --The new SNS TopicArn that you want to associate with this job. You can create Amazon Resource Names (ARNs) for topics by using the CreateTopic Amazon SNS API action.
You can subscribe email addresses to an Amazon SNS topic through the AWS Management Console, or by using the Subscribe AWS Simple Notification Service (SNS) API action.
JobStatesToNotify (list) --The list of job states that will trigger a notification for this job.
(string) --
NotifyAll (boolean) --Any change in job state will trigger a notification for this job.
:type ClusterId: string
:param ClusterId: The ID of a cluster. If you're creating a job for a node in a cluster, you need to provide only this clusterId value. The other job attributes are inherited from the cluster.
:type SnowballType: string
:param SnowballType: The type of AWS Snowball appliance to use for this job. Currently, the only supported appliance type for cluster jobs is EDGE .
:type ForwardingAddressId: string
:param ForwardingAddressId: The forwarding address ID for a job. This field is not supported in most regions.
:rtype: dict
:return: {
'JobId': 'string'
} | entailment |
def update_job(JobId=None, RoleARN=None, Notification=None, Resources=None, AddressId=None, ShippingOption=None, Description=None, SnowballCapacityPreference=None, ForwardingAddressId=None):
"""
While a job's JobState value is New , you can update some of the information associated with a job. Once the job changes to a different job state, usually within 60 minutes of the job being created, this action is no longer available.
See also: AWS API Documentation
Examples
This action allows you to update certain parameters for a job. Once the job changes to a different job state, usually within 60 minutes of the job being created, this action is no longer available.
Expected Output:
:example: response = client.update_job(
JobId='string',
RoleARN='string',
Notification={
'SnsTopicARN': 'string',
'JobStatesToNotify': [
'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
],
'NotifyAll': True|False
},
Resources={
'S3Resources': [
{
'BucketArn': 'string',
'KeyRange': {
'BeginMarker': 'string',
'EndMarker': 'string'
}
},
],
'LambdaResources': [
{
'LambdaArn': 'string',
'EventTriggers': [
{
'EventResourceARN': 'string'
},
]
},
]
},
AddressId='string',
ShippingOption='SECOND_DAY'|'NEXT_DAY'|'EXPRESS'|'STANDARD',
Description='string',
SnowballCapacityPreference='T50'|'T80'|'T100'|'NoPreference',
ForwardingAddressId='string'
)
:type JobId: string
:param JobId: [REQUIRED]
The job ID of the job that you want to update, for example JID123e4567-e89b-12d3-a456-426655440000 .
:type RoleARN: string
:param RoleARN: The new role Amazon Resource Name (ARN) that you want to associate with this job. To create a role ARN, use the CreateRole AWS Identity and Access Management (IAM) API action.
:type Notification: dict
:param Notification: The new or updated Notification object.
SnsTopicARN (string) --The new SNS TopicArn that you want to associate with this job. You can create Amazon Resource Names (ARNs) for topics by using the CreateTopic Amazon SNS API action.
You can subscribe email addresses to an Amazon SNS topic through the AWS Management Console, or by using the Subscribe AWS Simple Notification Service (SNS) API action.
JobStatesToNotify (list) --The list of job states that will trigger a notification for this job.
(string) --
NotifyAll (boolean) --Any change in job state will trigger a notification for this job.
:type Resources: dict
:param Resources: The updated S3Resource object (for a single Amazon S3 bucket or key range), or the updated JobResource object (for multiple buckets or key ranges).
S3Resources (list) --An array of S3Resource objects.
(dict) --Each S3Resource object represents an Amazon S3 bucket that your transferred data will be exported from or imported into. For export jobs, this object can have an optional KeyRange value. The length of the range is defined at job creation, and has either an inclusive BeginMarker , an inclusive EndMarker , or both. Ranges are UTF-8 binary sorted.
BucketArn (string) --The Amazon Resource Name (ARN) of an Amazon S3 bucket.
KeyRange (dict) --For export jobs, you can provide an optional KeyRange within a specific Amazon S3 bucket. The length of the range is defined at job creation, and has either an inclusive BeginMarker , an inclusive EndMarker , or both. Ranges are UTF-8 binary sorted.
BeginMarker (string) --The key that starts an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
EndMarker (string) --The key that ends an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
LambdaResources (list) --The Python-language Lambda functions for this job.
(dict) --Identifies
LambdaArn (string) --An Amazon Resource Name (ARN) that represents an AWS Lambda function to be triggered by PUT object actions on the associated local Amazon S3 resource.
EventTriggers (list) --The array of ARNs for S3Resource objects to trigger the LambdaResource objects associated with this job.
(dict) --The container for the EventTriggerDefinition$EventResourceARN .
EventResourceARN (string) --The Amazon Resource Name (ARN) for any local Amazon S3 resource that is an AWS Lambda function's event trigger associated with this job.
:type AddressId: string
:param AddressId: The ID of the updated Address object.
:type ShippingOption: string
:param ShippingOption: The updated shipping option value of this job's ShippingDetails object.
:type Description: string
:param Description: The updated description of this job's JobMetadata object.
:type SnowballCapacityPreference: string
:param SnowballCapacityPreference: The updated SnowballCapacityPreference of this job's JobMetadata object. The 50 TB Snowballs are only available in the US regions.
:type ForwardingAddressId: string
:param ForwardingAddressId: The updated ID for the forwarding address for a job. This field is not supported in most regions.
:rtype: dict
:return: {}
:returns:
(dict) --
"""
pass | While a job's JobState value is New , you can update some of the information associated with a job. Once the job changes to a different job state, usually within 60 minutes of the job being created, this action is no longer available.
See also: AWS API Documentation
Examples
This action allows you to update certain parameters for a job. Once the job changes to a different job state, usually within 60 minutes of the job being created, this action is no longer available.
Expected Output:
:example: response = client.update_job(
JobId='string',
RoleARN='string',
Notification={
'SnsTopicARN': 'string',
'JobStatesToNotify': [
'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
],
'NotifyAll': True|False
},
Resources={
'S3Resources': [
{
'BucketArn': 'string',
'KeyRange': {
'BeginMarker': 'string',
'EndMarker': 'string'
}
},
],
'LambdaResources': [
{
'LambdaArn': 'string',
'EventTriggers': [
{
'EventResourceARN': 'string'
},
]
},
]
},
AddressId='string',
ShippingOption='SECOND_DAY'|'NEXT_DAY'|'EXPRESS'|'STANDARD',
Description='string',
SnowballCapacityPreference='T50'|'T80'|'T100'|'NoPreference',
ForwardingAddressId='string'
)
:type JobId: string
:param JobId: [REQUIRED]
The job ID of the job that you want to update, for example JID123e4567-e89b-12d3-a456-426655440000 .
:type RoleARN: string
:param RoleARN: The new role Amazon Resource Name (ARN) that you want to associate with this job. To create a role ARN, use the CreateRole AWS Identity and Access Management (IAM) API action.
:type Notification: dict
:param Notification: The new or updated Notification object.
SnsTopicARN (string) --The new SNS TopicArn that you want to associate with this job. You can create Amazon Resource Names (ARNs) for topics by using the CreateTopic Amazon SNS API action.
You can subscribe email addresses to an Amazon SNS topic through the AWS Management Console, or by using the Subscribe AWS Simple Notification Service (SNS) API action.
JobStatesToNotify (list) --The list of job states that will trigger a notification for this job.
(string) --
NotifyAll (boolean) --Any change in job state will trigger a notification for this job.
:type Resources: dict
:param Resources: The updated S3Resource object (for a single Amazon S3 bucket or key range), or the updated JobResource object (for multiple buckets or key ranges).
S3Resources (list) --An array of S3Resource objects.
(dict) --Each S3Resource object represents an Amazon S3 bucket that your transferred data will be exported from or imported into. For export jobs, this object can have an optional KeyRange value. The length of the range is defined at job creation, and has either an inclusive BeginMarker , an inclusive EndMarker , or both. Ranges are UTF-8 binary sorted.
BucketArn (string) --The Amazon Resource Name (ARN) of an Amazon S3 bucket.
KeyRange (dict) --For export jobs, you can provide an optional KeyRange within a specific Amazon S3 bucket. The length of the range is defined at job creation, and has either an inclusive BeginMarker , an inclusive EndMarker , or both. Ranges are UTF-8 binary sorted.
BeginMarker (string) --The key that starts an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
EndMarker (string) --The key that ends an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
LambdaResources (list) --The Python-language Lambda functions for this job.
(dict) --Identifies
LambdaArn (string) --An Amazon Resource Name (ARN) that represents an AWS Lambda function to be triggered by PUT object actions on the associated local Amazon S3 resource.
EventTriggers (list) --The array of ARNs for S3Resource objects to trigger the LambdaResource objects associated with this job.
(dict) --The container for the EventTriggerDefinition$EventResourceARN .
EventResourceARN (string) --The Amazon Resource Name (ARN) for any local Amazon S3 resource that is an AWS Lambda function's event trigger associated with this job.
:type AddressId: string
:param AddressId: The ID of the updated Address object.
:type ShippingOption: string
:param ShippingOption: The updated shipping option value of this job's ShippingDetails object.
:type Description: string
:param Description: The updated description of this job's JobMetadata object.
:type SnowballCapacityPreference: string
:param SnowballCapacityPreference: The updated SnowballCapacityPreference of this job's JobMetadata object. The 50 TB Snowballs are only available in the US regions.
:type ForwardingAddressId: string
:param ForwardingAddressId: The updated ID for the forwarding address for a job. This field is not supported in most regions.
:rtype: dict
:return: {}
:returns:
(dict) -- | entailment |
def register_task_with_maintenance_window(WindowId=None, Targets=None, TaskArn=None, ServiceRoleArn=None, TaskType=None, TaskParameters=None, Priority=None, MaxConcurrency=None, MaxErrors=None, LoggingInfo=None, ClientToken=None):
"""
Adds a new task to a Maintenance Window.
See also: AWS API Documentation
:example: response = client.register_task_with_maintenance_window(
WindowId='string',
Targets=[
{
'Key': 'string',
'Values': [
'string',
]
},
],
TaskArn='string',
ServiceRoleArn='string',
TaskType='RUN_COMMAND',
TaskParameters={
'string': {
'Values': [
'string',
]
}
},
Priority=123,
MaxConcurrency='string',
MaxErrors='string',
LoggingInfo={
'S3BucketName': 'string',
'S3KeyPrefix': 'string',
'S3Region': 'string'
},
ClientToken='string'
)
:type WindowId: string
:param WindowId: [REQUIRED]
The id of the Maintenance Window the task should be added to.
:type Targets: list
:param Targets: [REQUIRED]
The targets (either instances or tags). Instances are specified using Key=instanceids,Values=instanceid1,instanceid2. Tags are specified using Key=tag name,Values=tag value.
(dict) --An array of search criteria that targets instances using a Key,Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:Amazon EC2 tagor InstanceIds. For more information about how to send commands that target instances using Key,Value parameters, see Executing a Command Using Systems Manager Run Command .
Values (list) --User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole,WebServer. For more information about how to send commands that target instances using Key,Value parameters, see Executing a Command Using Systems Manager Run Command .
(string) --
:type TaskArn: string
:param TaskArn: [REQUIRED]
The ARN of the task to execute
:type ServiceRoleArn: string
:param ServiceRoleArn: [REQUIRED]
The role that should be assumed when executing the task.
:type TaskType: string
:param TaskType: [REQUIRED]
The type of task being registered.
:type TaskParameters: dict
:param TaskParameters: The parameters that should be passed to the task when it is executed.
(string) --
(dict) --Defines the values for a task parameter.
Values (list) --This field contains an array of 0 or more strings, each 1 to 255 characters in length.
(string) --
:type Priority: integer
:param Priority: The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.
:type MaxConcurrency: string
:param MaxConcurrency: [REQUIRED]
The maximum number of targets this task can be run for in parallel.
:type MaxErrors: string
:param MaxErrors: [REQUIRED]
The maximum number of errors allowed before this task stops being scheduled.
:type LoggingInfo: dict
:param LoggingInfo: A structure containing information about an Amazon S3 bucket to write instance-level logs to.
S3BucketName (string) -- [REQUIRED]The name of an Amazon S3 bucket where execution logs are stored .
S3KeyPrefix (string) --(Optional) The Amazon S3 bucket subfolder.
S3Region (string) -- [REQUIRED]The region where the Amazon S3 bucket is located.
:type ClientToken: string
:param ClientToken: User-provided idempotency token.
This field is autopopulated if not provided.
:rtype: dict
:return: {
'WindowTaskId': 'string'
}
"""
pass | Adds a new task to a Maintenance Window.
See also: AWS API Documentation
:example: response = client.register_task_with_maintenance_window(
WindowId='string',
Targets=[
{
'Key': 'string',
'Values': [
'string',
]
},
],
TaskArn='string',
ServiceRoleArn='string',
TaskType='RUN_COMMAND',
TaskParameters={
'string': {
'Values': [
'string',
]
}
},
Priority=123,
MaxConcurrency='string',
MaxErrors='string',
LoggingInfo={
'S3BucketName': 'string',
'S3KeyPrefix': 'string',
'S3Region': 'string'
},
ClientToken='string'
)
:type WindowId: string
:param WindowId: [REQUIRED]
The id of the Maintenance Window the task should be added to.
:type Targets: list
:param Targets: [REQUIRED]
The targets (either instances or tags). Instances are specified using Key=instanceids,Values=instanceid1,instanceid2. Tags are specified using Key=tag name,Values=tag value.
(dict) --An array of search criteria that targets instances using a Key,Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:Amazon EC2 tagor InstanceIds. For more information about how to send commands that target instances using Key,Value parameters, see Executing a Command Using Systems Manager Run Command .
Values (list) --User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole,WebServer. For more information about how to send commands that target instances using Key,Value parameters, see Executing a Command Using Systems Manager Run Command .
(string) --
:type TaskArn: string
:param TaskArn: [REQUIRED]
The ARN of the task to execute
:type ServiceRoleArn: string
:param ServiceRoleArn: [REQUIRED]
The role that should be assumed when executing the task.
:type TaskType: string
:param TaskType: [REQUIRED]
The type of task being registered.
:type TaskParameters: dict
:param TaskParameters: The parameters that should be passed to the task when it is executed.
(string) --
(dict) --Defines the values for a task parameter.
Values (list) --This field contains an array of 0 or more strings, each 1 to 255 characters in length.
(string) --
:type Priority: integer
:param Priority: The priority of the task in the Maintenance Window, the lower the number the higher the priority. Tasks in a Maintenance Window are scheduled in priority order with tasks that have the same priority scheduled in parallel.
:type MaxConcurrency: string
:param MaxConcurrency: [REQUIRED]
The maximum number of targets this task can be run for in parallel.
:type MaxErrors: string
:param MaxErrors: [REQUIRED]
The maximum number of errors allowed before this task stops being scheduled.
:type LoggingInfo: dict
:param LoggingInfo: A structure containing information about an Amazon S3 bucket to write instance-level logs to.
S3BucketName (string) -- [REQUIRED]The name of an Amazon S3 bucket where execution logs are stored .
S3KeyPrefix (string) --(Optional) The Amazon S3 bucket subfolder.
S3Region (string) -- [REQUIRED]The region where the Amazon S3 bucket is located.
:type ClientToken: string
:param ClientToken: User-provided idempotency token.
This field is autopopulated if not provided.
:rtype: dict
:return: {
'WindowTaskId': 'string'
} | entailment |
def send_command(InstanceIds=None, Targets=None, DocumentName=None, DocumentHash=None, DocumentHashType=None, TimeoutSeconds=None, Comment=None, Parameters=None, OutputS3Region=None, OutputS3BucketName=None, OutputS3KeyPrefix=None, MaxConcurrency=None, MaxErrors=None, ServiceRoleArn=None, NotificationConfig=None):
"""
Executes commands on one or more remote instances.
See also: AWS API Documentation
:example: response = client.send_command(
InstanceIds=[
'string',
],
Targets=[
{
'Key': 'string',
'Values': [
'string',
]
},
],
DocumentName='string',
DocumentHash='string',
DocumentHashType='Sha256'|'Sha1',
TimeoutSeconds=123,
Comment='string',
Parameters={
'string': [
'string',
]
},
OutputS3Region='string',
OutputS3BucketName='string',
OutputS3KeyPrefix='string',
MaxConcurrency='string',
MaxErrors='string',
ServiceRoleArn='string',
NotificationConfig={
'NotificationArn': 'string',
'NotificationEvents': [
'All'|'InProgress'|'Success'|'TimedOut'|'Cancelled'|'Failed',
],
'NotificationType': 'Command'|'Invocation'
}
)
:type InstanceIds: list
:param InstanceIds: The instance IDs where the command should execute. You can specify a maximum of 50 IDs. If you prefer not to list individual instance IDs, you can instead send commands to a fleet of instances using the Targets parameter, which accepts EC2 tags.
(string) --
:type Targets: list
:param Targets: (Optional) An array of search criteria that targets instances using a Key,Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call. For more information about how to use Targets, see Executing a Command Using Systems Manager Run Command .
(dict) --An array of search criteria that targets instances using a Key,Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:Amazon EC2 tagor InstanceIds. For more information about how to send commands that target instances using Key,Value parameters, see Executing a Command Using Systems Manager Run Command .
Values (list) --User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole,WebServer. For more information about how to send commands that target instances using Key,Value parameters, see Executing a Command Using Systems Manager Run Command .
(string) --
:type DocumentName: string
:param DocumentName: [REQUIRED]
Required. The name of the Systems Manager document to execute. This can be a public document or a custom document.
:type DocumentHash: string
:param DocumentHash: The Sha256 or Sha1 hash created by the system when the document was created.
Note
Sha1 hashes have been deprecated.
:type DocumentHashType: string
:param DocumentHashType: Sha256 or Sha1.
Note
Sha1 hashes have been deprecated.
:type TimeoutSeconds: integer
:param TimeoutSeconds: If this time is reached and the command has not already started executing, it will not execute.
:type Comment: string
:param Comment: User-specified information about the command, such as a brief description of what the command should do.
:type Parameters: dict
:param Parameters: The required and optional parameters specified in the document being executed.
(string) --
(list) --
(string) --
:type OutputS3Region: string
:param OutputS3Region: (Optional) The region where the Amazon Simple Storage Service (Amazon S3) output bucket is located. The default value is the region where Run Command is being called.
:type OutputS3BucketName: string
:param OutputS3BucketName: The name of the S3 bucket where command execution responses should be stored.
:type OutputS3KeyPrefix: string
:param OutputS3KeyPrefix: The directory structure within the S3 bucket where the responses should be stored.
:type MaxConcurrency: string
:param MaxConcurrency: (Optional) The maximum number of instances that are allowed to execute the command at the same time. You can specify a number such as 10 or a percentage such as 10%. The default value is 50. For more information about how to use MaxConcurrency, see Executing a Command Using Systems Manager Run Command .
:type MaxErrors: string
:param MaxErrors: The maximum number of errors allowed without the command failing. When the command fails one more time beyond the value of MaxErrors, the systems stops sending the command to additional targets. You can specify a number like 10 or a percentage like 10%. The default value is 50. For more information about how to use MaxErrors, see Executing a Command Using Systems Manager Run Command .
:type ServiceRoleArn: string
:param ServiceRoleArn: The IAM role that Systems Manager uses to send notifications.
:type NotificationConfig: dict
:param NotificationConfig: Configurations for sending notifications.
NotificationArn (string) --An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.
NotificationEvents (list) --The different events for which you can receive notifications. These events include the following: All (events), InProgress, Success, TimedOut, Cancelled, Failed. To learn more about these events, see Setting Up Events and Notifications in the Amazon EC2 Systems Manager User Guide .
(string) --
NotificationType (string) --Command: Receive notification when the status of a command changes. Invocation: For commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes.
:rtype: dict
:return: {
'Command': {
'CommandId': 'string',
'DocumentName': 'string',
'Comment': 'string',
'ExpiresAfter': datetime(2015, 1, 1),
'Parameters': {
'string': [
'string',
]
},
'InstanceIds': [
'string',
],
'Targets': [
{
'Key': 'string',
'Values': [
'string',
]
},
],
'RequestedDateTime': datetime(2015, 1, 1),
'Status': 'Pending'|'InProgress'|'Success'|'Cancelled'|'Failed'|'TimedOut'|'Cancelling',
'StatusDetails': 'string',
'OutputS3Region': 'string',
'OutputS3BucketName': 'string',
'OutputS3KeyPrefix': 'string',
'MaxConcurrency': 'string',
'MaxErrors': 'string',
'TargetCount': 123,
'CompletedCount': 123,
'ErrorCount': 123,
'ServiceRole': 'string',
'NotificationConfig': {
'NotificationArn': 'string',
'NotificationEvents': [
'All'|'InProgress'|'Success'|'TimedOut'|'Cancelled'|'Failed',
],
'NotificationType': 'Command'|'Invocation'
}
}
}
:returns:
(string) --
(list) --
(string) --
"""
pass | Executes commands on one or more remote instances.
See also: AWS API Documentation
:example: response = client.send_command(
InstanceIds=[
'string',
],
Targets=[
{
'Key': 'string',
'Values': [
'string',
]
},
],
DocumentName='string',
DocumentHash='string',
DocumentHashType='Sha256'|'Sha1',
TimeoutSeconds=123,
Comment='string',
Parameters={
'string': [
'string',
]
},
OutputS3Region='string',
OutputS3BucketName='string',
OutputS3KeyPrefix='string',
MaxConcurrency='string',
MaxErrors='string',
ServiceRoleArn='string',
NotificationConfig={
'NotificationArn': 'string',
'NotificationEvents': [
'All'|'InProgress'|'Success'|'TimedOut'|'Cancelled'|'Failed',
],
'NotificationType': 'Command'|'Invocation'
}
)
:type InstanceIds: list
:param InstanceIds: The instance IDs where the command should execute. You can specify a maximum of 50 IDs. If you prefer not to list individual instance IDs, you can instead send commands to a fleet of instances using the Targets parameter, which accepts EC2 tags.
(string) --
:type Targets: list
:param Targets: (Optional) An array of search criteria that targets instances using a Key,Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call. For more information about how to use Targets, see Executing a Command Using Systems Manager Run Command .
(dict) --An array of search criteria that targets instances using a Key,Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.
Key (string) --User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:Amazon EC2 tagor InstanceIds. For more information about how to send commands that target instances using Key,Value parameters, see Executing a Command Using Systems Manager Run Command .
Values (list) --User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole,WebServer. For more information about how to send commands that target instances using Key,Value parameters, see Executing a Command Using Systems Manager Run Command .
(string) --
:type DocumentName: string
:param DocumentName: [REQUIRED]
Required. The name of the Systems Manager document to execute. This can be a public document or a custom document.
:type DocumentHash: string
:param DocumentHash: The Sha256 or Sha1 hash created by the system when the document was created.
Note
Sha1 hashes have been deprecated.
:type DocumentHashType: string
:param DocumentHashType: Sha256 or Sha1.
Note
Sha1 hashes have been deprecated.
:type TimeoutSeconds: integer
:param TimeoutSeconds: If this time is reached and the command has not already started executing, it will not execute.
:type Comment: string
:param Comment: User-specified information about the command, such as a brief description of what the command should do.
:type Parameters: dict
:param Parameters: The required and optional parameters specified in the document being executed.
(string) --
(list) --
(string) --
:type OutputS3Region: string
:param OutputS3Region: (Optional) The region where the Amazon Simple Storage Service (Amazon S3) output bucket is located. The default value is the region where Run Command is being called.
:type OutputS3BucketName: string
:param OutputS3BucketName: The name of the S3 bucket where command execution responses should be stored.
:type OutputS3KeyPrefix: string
:param OutputS3KeyPrefix: The directory structure within the S3 bucket where the responses should be stored.
:type MaxConcurrency: string
:param MaxConcurrency: (Optional) The maximum number of instances that are allowed to execute the command at the same time. You can specify a number such as 10 or a percentage such as 10%. The default value is 50. For more information about how to use MaxConcurrency, see Executing a Command Using Systems Manager Run Command .
:type MaxErrors: string
:param MaxErrors: The maximum number of errors allowed without the command failing. When the command fails one more time beyond the value of MaxErrors, the systems stops sending the command to additional targets. You can specify a number like 10 or a percentage like 10%. The default value is 50. For more information about how to use MaxErrors, see Executing a Command Using Systems Manager Run Command .
:type ServiceRoleArn: string
:param ServiceRoleArn: The IAM role that Systems Manager uses to send notifications.
:type NotificationConfig: dict
:param NotificationConfig: Configurations for sending notifications.
NotificationArn (string) --An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic. Run Command pushes notifications about command status changes to this topic.
NotificationEvents (list) --The different events for which you can receive notifications. These events include the following: All (events), InProgress, Success, TimedOut, Cancelled, Failed. To learn more about these events, see Setting Up Events and Notifications in the Amazon EC2 Systems Manager User Guide .
(string) --
NotificationType (string) --Command: Receive notification when the status of a command changes. Invocation: For commands sent to multiple instances, receive notification on a per-instance basis when the status of a command changes.
:rtype: dict
:return: {
'Command': {
'CommandId': 'string',
'DocumentName': 'string',
'Comment': 'string',
'ExpiresAfter': datetime(2015, 1, 1),
'Parameters': {
'string': [
'string',
]
},
'InstanceIds': [
'string',
],
'Targets': [
{
'Key': 'string',
'Values': [
'string',
]
},
],
'RequestedDateTime': datetime(2015, 1, 1),
'Status': 'Pending'|'InProgress'|'Success'|'Cancelled'|'Failed'|'TimedOut'|'Cancelling',
'StatusDetails': 'string',
'OutputS3Region': 'string',
'OutputS3BucketName': 'string',
'OutputS3KeyPrefix': 'string',
'MaxConcurrency': 'string',
'MaxErrors': 'string',
'TargetCount': 123,
'CompletedCount': 123,
'ErrorCount': 123,
'ServiceRole': 'string',
'NotificationConfig': {
'NotificationArn': 'string',
'NotificationEvents': [
'All'|'InProgress'|'Success'|'TimedOut'|'Cancelled'|'Failed',
],
'NotificationType': 'Command'|'Invocation'
}
}
}
:returns:
(string) --
(list) --
(string) -- | entailment |
def create_server(AssociatePublicIpAddress=None, DisableAutomatedBackup=None, Engine=None, EngineModel=None, EngineVersion=None, EngineAttributes=None, BackupRetentionCount=None, ServerName=None, InstanceProfileArn=None, InstanceType=None, KeyPair=None, PreferredMaintenanceWindow=None, PreferredBackupWindow=None, SecurityGroupIds=None, ServiceRoleArn=None, SubnetIds=None, BackupId=None):
"""
Creates and immedately starts a new server. The server is ready to use when it is in the HEALTHY state. By default, you can create a maximum of 10 servers.
This operation is asynchronous.
A LimitExceededException is thrown when you have created the maximum number of servers (10). A ResourceAlreadyExistsException is thrown when a server with the same name already exists in the account. A ResourceNotFoundException is thrown when you specify a backup ID that is not valid or is for a backup that does not exist. A ValidationException is thrown when parameters of the request are not valid.
If you do not specify a security group by adding the SecurityGroupIds parameter, AWS OpsWorks creates a new security group. The default security group opens the Chef server to the world on TCP port 443. If a KeyName is present, AWS OpsWorks enables SSH access. SSH is also open to the world on TCP port 22.
By default, the Chef Server is accessible from any IP address. We recommend that you update your security group rules to allow access from known IP addresses and address ranges only. To edit security group rules, open Security Groups in the navigation pane of the EC2 management console.
See also: AWS API Documentation
:example: response = client.create_server(
AssociatePublicIpAddress=True|False,
DisableAutomatedBackup=True|False,
Engine='string',
EngineModel='string',
EngineVersion='string',
EngineAttributes=[
{
'Name': 'string',
'Value': 'string'
},
],
BackupRetentionCount=123,
ServerName='string',
InstanceProfileArn='string',
InstanceType='string',
KeyPair='string',
PreferredMaintenanceWindow='string',
PreferredBackupWindow='string',
SecurityGroupIds=[
'string',
],
ServiceRoleArn='string',
SubnetIds=[
'string',
],
BackupId='string'
)
:type AssociatePublicIpAddress: boolean
:param AssociatePublicIpAddress: Associate a public IP address with a server that you are launching. Valid values are true or false . The default value is true .
:type DisableAutomatedBackup: boolean
:param DisableAutomatedBackup: Enable or disable scheduled backups. Valid values are true or false . The default value is true .
:type Engine: string
:param Engine: The configuration management engine to use. Valid values include Chef .
:type EngineModel: string
:param EngineModel: The engine model, or option. Valid values include Single .
:type EngineVersion: string
:param EngineVersion: The major release version of the engine that you want to use. Values depend on the engine that you choose.
:type EngineAttributes: list
:param EngineAttributes: Optional engine attributes on a specified server.
Attributes accepted in a createServer request:
CHEF_PIVOTAL_KEY : A base64-encoded RSA private key that is not stored by AWS OpsWorks for Chef. This private key is required to access the Chef API. When no CHEF_PIVOTAL_KEY is set, one is generated and returned in the response.
CHEF_DELIVERY_ADMIN_PASSWORD : The password for the administrative user in the Chef Automate GUI. The password length is a minimum of eight characters, and a maximum of 32. The password can contain letters, numbers, and special characters (!/@#$%^+=_). The password must contain at least one lower case letter, one upper case letter, one number, and one special character. When no CHEF_DELIVERY_ADMIN_PASSWORD is set, one is generated and returned in the response.
(dict) --A name and value pair that is specific to the engine of the server.
Name (string) --The name of the engine attribute.
Value (string) --The value of the engine attribute.
:type BackupRetentionCount: integer
:param BackupRetentionCount: The number of automated backups that you want to keep. Whenever a new backup is created, AWS OpsWorks for Chef Automate deletes the oldest backups if this number is exceeded. The default value is 1 .
:type ServerName: string
:param ServerName: [REQUIRED]
The name of the server. The server name must be unique within your AWS account, within each region. Server names must start with a letter; then letters, numbers, or hyphens (-) are allowed, up to a maximum of 40 characters.
:type InstanceProfileArn: string
:param InstanceProfileArn: [REQUIRED]
The ARN of the instance profile that your Amazon EC2 instances use. Although the AWS OpsWorks console typically creates the instance profile for you, if you are using API commands instead, run the service-role-creation.yaml AWS CloudFormation template, located at https://s3.amazonaws.com/opsworks-cm-us-east-1-prod-default-assets/misc/opsworks-cm-roles.yaml. This template creates a CloudFormation stack that includes the instance profile you need.
:type InstanceType: string
:param InstanceType: [REQUIRED]
The Amazon EC2 instance type to use. Valid values must be specified in the following format: ^([cm][34]|t2).* For example, m4.large . Valid values are t2.medium , m4.large , or m4.2xlarge .
:type KeyPair: string
:param KeyPair: The Amazon EC2 key pair to set for the instance. This parameter is optional; if desired, you may specify this parameter to connect to your instances by using SSH.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The start time for a one-hour period each week during which AWS OpsWorks for Chef Automate performs maintenance on the instance. Valid values must be specified in the following format: DDD:HH:MM . The specified time is in coordinated universal time (UTC). The default value is a random one-hour period on Tuesday, Wednesday, or Friday. See TimeWindowDefinition for more information.
Example: Mon:08:00 , which represents a start time of every Monday at 08:00 UTC. (8:00 a.m.)
:type PreferredBackupWindow: string
:param PreferredBackupWindow: The start time for a one-hour period during which AWS OpsWorks for Chef Automate backs up application-level data on your server if automated backups are enabled. Valid values must be specified in one of the following formats:
HH:MM for daily backups
DDD:HH:MM for weekly backups
The specified time is in coordinated universal time (UTC). The default value is a random, daily start time.
Example: 08:00 , which represents a daily start time of 08:00 UTC.Example: Mon:08:00 , which represents a start time of every Monday at 08:00 UTC. (8:00 a.m.)
:type SecurityGroupIds: list
:param SecurityGroupIds: A list of security group IDs to attach to the Amazon EC2 instance. If you add this parameter, the specified security groups must be within the VPC that is specified by SubnetIds .
If you do not specify this parameter, AWS OpsWorks for Chef Automate creates one new security group that uses TCP ports 22 and 443, open to 0.0.0.0/0 (everyone).
(string) --
:type ServiceRoleArn: string
:param ServiceRoleArn: [REQUIRED]
The service role that the AWS OpsWorks for Chef Automate service backend uses to work with your account. Although the AWS OpsWorks management console typically creates the service role for you, if you are using the AWS CLI or API commands, run the service-role-creation.yaml AWS CloudFormation template, located at https://s3.amazonaws.com/opsworks-stuff/latest/service-role-creation.yaml. This template creates a CloudFormation stack that includes the service role that you need.
:type SubnetIds: list
:param SubnetIds: The IDs of subnets in which to launch the server EC2 instance.
Amazon EC2-Classic customers: This field is required. All servers must run within a VPC. The VPC must have 'Auto Assign Public IP' enabled.
EC2-VPC customers: This field is optional. If you do not specify subnet IDs, your EC2 instances are created in a default subnet that is selected by Amazon EC2. If you specify subnet IDs, the VPC must have 'Auto Assign Public IP' enabled.
For more information about supported Amazon EC2 platforms, see Supported Platforms .
(string) --
:type BackupId: string
:param BackupId: If you specify this field, AWS OpsWorks for Chef Automate creates the server by using the backup represented by BackupId.
:rtype: dict
:return: {
'Server': {
'AssociatePublicIpAddress': True|False,
'BackupRetentionCount': 123,
'ServerName': 'string',
'CreatedAt': datetime(2015, 1, 1),
'CloudFormationStackArn': 'string',
'DisableAutomatedBackup': True|False,
'Endpoint': 'string',
'Engine': 'string',
'EngineModel': 'string',
'EngineAttributes': [
{
'Name': 'string',
'Value': 'string'
},
],
'EngineVersion': 'string',
'InstanceProfileArn': 'string',
'InstanceType': 'string',
'KeyPair': 'string',
'MaintenanceStatus': 'SUCCESS'|'FAILED',
'PreferredMaintenanceWindow': 'string',
'PreferredBackupWindow': 'string',
'SecurityGroupIds': [
'string',
],
'ServiceRoleArn': 'string',
'Status': 'BACKING_UP'|'CONNECTION_LOST'|'CREATING'|'DELETING'|'MODIFYING'|'FAILED'|'HEALTHY'|'RUNNING'|'RESTORING'|'SETUP'|'UNDER_MAINTENANCE'|'UNHEALTHY'|'TERMINATED',
'StatusReason': 'string',
'SubnetIds': [
'string',
],
'ServerArn': 'string'
}
}
:returns:
CHEF_PIVOTAL_KEY : A base64-encoded RSA private key that is generated by AWS OpsWorks for Chef Automate. This private key is required to access the Chef API.
CHEF_STARTER_KIT : A base64-encoded ZIP file. The ZIP file contains a Chef starter kit, which includes a README, a configuration file, and the required RSA private key. Save this file, unzip it, and then change to the directory where you've unzipped the file contents. From this directory, you can run Knife commands.
"""
pass | Creates and immedately starts a new server. The server is ready to use when it is in the HEALTHY state. By default, you can create a maximum of 10 servers.
This operation is asynchronous.
A LimitExceededException is thrown when you have created the maximum number of servers (10). A ResourceAlreadyExistsException is thrown when a server with the same name already exists in the account. A ResourceNotFoundException is thrown when you specify a backup ID that is not valid or is for a backup that does not exist. A ValidationException is thrown when parameters of the request are not valid.
If you do not specify a security group by adding the SecurityGroupIds parameter, AWS OpsWorks creates a new security group. The default security group opens the Chef server to the world on TCP port 443. If a KeyName is present, AWS OpsWorks enables SSH access. SSH is also open to the world on TCP port 22.
By default, the Chef Server is accessible from any IP address. We recommend that you update your security group rules to allow access from known IP addresses and address ranges only. To edit security group rules, open Security Groups in the navigation pane of the EC2 management console.
See also: AWS API Documentation
:example: response = client.create_server(
AssociatePublicIpAddress=True|False,
DisableAutomatedBackup=True|False,
Engine='string',
EngineModel='string',
EngineVersion='string',
EngineAttributes=[
{
'Name': 'string',
'Value': 'string'
},
],
BackupRetentionCount=123,
ServerName='string',
InstanceProfileArn='string',
InstanceType='string',
KeyPair='string',
PreferredMaintenanceWindow='string',
PreferredBackupWindow='string',
SecurityGroupIds=[
'string',
],
ServiceRoleArn='string',
SubnetIds=[
'string',
],
BackupId='string'
)
:type AssociatePublicIpAddress: boolean
:param AssociatePublicIpAddress: Associate a public IP address with a server that you are launching. Valid values are true or false . The default value is true .
:type DisableAutomatedBackup: boolean
:param DisableAutomatedBackup: Enable or disable scheduled backups. Valid values are true or false . The default value is true .
:type Engine: string
:param Engine: The configuration management engine to use. Valid values include Chef .
:type EngineModel: string
:param EngineModel: The engine model, or option. Valid values include Single .
:type EngineVersion: string
:param EngineVersion: The major release version of the engine that you want to use. Values depend on the engine that you choose.
:type EngineAttributes: list
:param EngineAttributes: Optional engine attributes on a specified server.
Attributes accepted in a createServer request:
CHEF_PIVOTAL_KEY : A base64-encoded RSA private key that is not stored by AWS OpsWorks for Chef. This private key is required to access the Chef API. When no CHEF_PIVOTAL_KEY is set, one is generated and returned in the response.
CHEF_DELIVERY_ADMIN_PASSWORD : The password for the administrative user in the Chef Automate GUI. The password length is a minimum of eight characters, and a maximum of 32. The password can contain letters, numbers, and special characters (!/@#$%^+=_). The password must contain at least one lower case letter, one upper case letter, one number, and one special character. When no CHEF_DELIVERY_ADMIN_PASSWORD is set, one is generated and returned in the response.
(dict) --A name and value pair that is specific to the engine of the server.
Name (string) --The name of the engine attribute.
Value (string) --The value of the engine attribute.
:type BackupRetentionCount: integer
:param BackupRetentionCount: The number of automated backups that you want to keep. Whenever a new backup is created, AWS OpsWorks for Chef Automate deletes the oldest backups if this number is exceeded. The default value is 1 .
:type ServerName: string
:param ServerName: [REQUIRED]
The name of the server. The server name must be unique within your AWS account, within each region. Server names must start with a letter; then letters, numbers, or hyphens (-) are allowed, up to a maximum of 40 characters.
:type InstanceProfileArn: string
:param InstanceProfileArn: [REQUIRED]
The ARN of the instance profile that your Amazon EC2 instances use. Although the AWS OpsWorks console typically creates the instance profile for you, if you are using API commands instead, run the service-role-creation.yaml AWS CloudFormation template, located at https://s3.amazonaws.com/opsworks-cm-us-east-1-prod-default-assets/misc/opsworks-cm-roles.yaml. This template creates a CloudFormation stack that includes the instance profile you need.
:type InstanceType: string
:param InstanceType: [REQUIRED]
The Amazon EC2 instance type to use. Valid values must be specified in the following format: ^([cm][34]|t2).* For example, m4.large . Valid values are t2.medium , m4.large , or m4.2xlarge .
:type KeyPair: string
:param KeyPair: The Amazon EC2 key pair to set for the instance. This parameter is optional; if desired, you may specify this parameter to connect to your instances by using SSH.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The start time for a one-hour period each week during which AWS OpsWorks for Chef Automate performs maintenance on the instance. Valid values must be specified in the following format: DDD:HH:MM . The specified time is in coordinated universal time (UTC). The default value is a random one-hour period on Tuesday, Wednesday, or Friday. See TimeWindowDefinition for more information.
Example: Mon:08:00 , which represents a start time of every Monday at 08:00 UTC. (8:00 a.m.)
:type PreferredBackupWindow: string
:param PreferredBackupWindow: The start time for a one-hour period during which AWS OpsWorks for Chef Automate backs up application-level data on your server if automated backups are enabled. Valid values must be specified in one of the following formats:
HH:MM for daily backups
DDD:HH:MM for weekly backups
The specified time is in coordinated universal time (UTC). The default value is a random, daily start time.
Example: 08:00 , which represents a daily start time of 08:00 UTC.Example: Mon:08:00 , which represents a start time of every Monday at 08:00 UTC. (8:00 a.m.)
:type SecurityGroupIds: list
:param SecurityGroupIds: A list of security group IDs to attach to the Amazon EC2 instance. If you add this parameter, the specified security groups must be within the VPC that is specified by SubnetIds .
If you do not specify this parameter, AWS OpsWorks for Chef Automate creates one new security group that uses TCP ports 22 and 443, open to 0.0.0.0/0 (everyone).
(string) --
:type ServiceRoleArn: string
:param ServiceRoleArn: [REQUIRED]
The service role that the AWS OpsWorks for Chef Automate service backend uses to work with your account. Although the AWS OpsWorks management console typically creates the service role for you, if you are using the AWS CLI or API commands, run the service-role-creation.yaml AWS CloudFormation template, located at https://s3.amazonaws.com/opsworks-stuff/latest/service-role-creation.yaml. This template creates a CloudFormation stack that includes the service role that you need.
:type SubnetIds: list
:param SubnetIds: The IDs of subnets in which to launch the server EC2 instance.
Amazon EC2-Classic customers: This field is required. All servers must run within a VPC. The VPC must have 'Auto Assign Public IP' enabled.
EC2-VPC customers: This field is optional. If you do not specify subnet IDs, your EC2 instances are created in a default subnet that is selected by Amazon EC2. If you specify subnet IDs, the VPC must have 'Auto Assign Public IP' enabled.
For more information about supported Amazon EC2 platforms, see Supported Platforms .
(string) --
:type BackupId: string
:param BackupId: If you specify this field, AWS OpsWorks for Chef Automate creates the server by using the backup represented by BackupId.
:rtype: dict
:return: {
'Server': {
'AssociatePublicIpAddress': True|False,
'BackupRetentionCount': 123,
'ServerName': 'string',
'CreatedAt': datetime(2015, 1, 1),
'CloudFormationStackArn': 'string',
'DisableAutomatedBackup': True|False,
'Endpoint': 'string',
'Engine': 'string',
'EngineModel': 'string',
'EngineAttributes': [
{
'Name': 'string',
'Value': 'string'
},
],
'EngineVersion': 'string',
'InstanceProfileArn': 'string',
'InstanceType': 'string',
'KeyPair': 'string',
'MaintenanceStatus': 'SUCCESS'|'FAILED',
'PreferredMaintenanceWindow': 'string',
'PreferredBackupWindow': 'string',
'SecurityGroupIds': [
'string',
],
'ServiceRoleArn': 'string',
'Status': 'BACKING_UP'|'CONNECTION_LOST'|'CREATING'|'DELETING'|'MODIFYING'|'FAILED'|'HEALTHY'|'RUNNING'|'RESTORING'|'SETUP'|'UNDER_MAINTENANCE'|'UNHEALTHY'|'TERMINATED',
'StatusReason': 'string',
'SubnetIds': [
'string',
],
'ServerArn': 'string'
}
}
:returns:
CHEF_PIVOTAL_KEY : A base64-encoded RSA private key that is generated by AWS OpsWorks for Chef Automate. This private key is required to access the Chef API.
CHEF_STARTER_KIT : A base64-encoded ZIP file. The ZIP file contains a Chef starter kit, which includes a README, a configuration file, and the required RSA private key. Save this file, unzip it, and then change to the directory where you've unzipped the file contents. From this directory, you can run Knife commands. | entailment |
def create_product(AcceptLanguage=None, Name=None, Owner=None, Description=None, Distributor=None, SupportDescription=None, SupportEmail=None, SupportUrl=None, ProductType=None, Tags=None, ProvisioningArtifactParameters=None, IdempotencyToken=None):
"""
Creates a new product.
See also: AWS API Documentation
:example: response = client.create_product(
AcceptLanguage='string',
Name='string',
Owner='string',
Description='string',
Distributor='string',
SupportDescription='string',
SupportEmail='string',
SupportUrl='string',
ProductType='CLOUD_FORMATION_TEMPLATE',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
ProvisioningArtifactParameters={
'Name': 'string',
'Description': 'string',
'Info': {
'string': 'string'
},
'Type': 'CLOUD_FORMATION_TEMPLATE'
},
IdempotencyToken='string'
)
:type AcceptLanguage: string
:param AcceptLanguage: The language code to use for this operation. Supported language codes are as follows:
'en' (English)
'jp' (Japanese)
'zh' (Chinese)
If no code is specified, 'en' is used as the default.
:type Name: string
:param Name: [REQUIRED]
The name of the product.
:type Owner: string
:param Owner: [REQUIRED]
The owner of the product.
:type Description: string
:param Description: The text description of the product.
:type Distributor: string
:param Distributor: The distributor of the product.
:type SupportDescription: string
:param SupportDescription: Support information about the product.
:type SupportEmail: string
:param SupportEmail: Contact email for product support.
:type SupportUrl: string
:param SupportUrl: Contact URL for product support.
:type ProductType: string
:param ProductType: [REQUIRED]
The type of the product to create.
:type Tags: list
:param Tags: Tags to associate with the new product.
(dict) --Key/value pairs to associate with this provisioning. These tags are entirely discretionary and are propagated to the resources created in the provisioning.
Key (string) -- [REQUIRED]The ProvisioningArtifactParameter.TagKey parameter from DescribeProvisioningParameters .
Value (string) -- [REQUIRED]The esired value for this key.
:type ProvisioningArtifactParameters: dict
:param ProvisioningArtifactParameters: [REQUIRED]
Parameters for the provisioning artifact.
Name (string) --The name assigned to the provisioning artifact properties.
Description (string) --The text description of the provisioning artifact properties.
Info (dict) -- [REQUIRED]Additional information about the provisioning artifact properties.
(string) --
(string) --
Type (string) --The type of the provisioning artifact properties.
:type IdempotencyToken: string
:param IdempotencyToken: [REQUIRED]
A token to disambiguate duplicate requests. You can create multiple resources using the same input in multiple requests, provided that you also specify a different idempotency token for each request.
This field is autopopulated if not provided.
:rtype: dict
:return: {
'ProductViewDetail': {
'ProductViewSummary': {
'Id': 'string',
'ProductId': 'string',
'Name': 'string',
'Owner': 'string',
'ShortDescription': 'string',
'Type': 'CLOUD_FORMATION_TEMPLATE',
'Distributor': 'string',
'HasDefaultPath': True|False,
'SupportEmail': 'string',
'SupportDescription': 'string',
'SupportUrl': 'string'
},
'Status': 'AVAILABLE'|'CREATING'|'FAILED',
'ProductARN': 'string',
'CreatedTime': datetime(2015, 1, 1)
},
'ProvisioningArtifactDetail': {
'Id': 'string',
'Name': 'string',
'Description': 'string',
'Type': 'CLOUD_FORMATION_TEMPLATE',
'CreatedTime': datetime(2015, 1, 1)
},
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
"""
pass | Creates a new product.
See also: AWS API Documentation
:example: response = client.create_product(
AcceptLanguage='string',
Name='string',
Owner='string',
Description='string',
Distributor='string',
SupportDescription='string',
SupportEmail='string',
SupportUrl='string',
ProductType='CLOUD_FORMATION_TEMPLATE',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
ProvisioningArtifactParameters={
'Name': 'string',
'Description': 'string',
'Info': {
'string': 'string'
},
'Type': 'CLOUD_FORMATION_TEMPLATE'
},
IdempotencyToken='string'
)
:type AcceptLanguage: string
:param AcceptLanguage: The language code to use for this operation. Supported language codes are as follows:
'en' (English)
'jp' (Japanese)
'zh' (Chinese)
If no code is specified, 'en' is used as the default.
:type Name: string
:param Name: [REQUIRED]
The name of the product.
:type Owner: string
:param Owner: [REQUIRED]
The owner of the product.
:type Description: string
:param Description: The text description of the product.
:type Distributor: string
:param Distributor: The distributor of the product.
:type SupportDescription: string
:param SupportDescription: Support information about the product.
:type SupportEmail: string
:param SupportEmail: Contact email for product support.
:type SupportUrl: string
:param SupportUrl: Contact URL for product support.
:type ProductType: string
:param ProductType: [REQUIRED]
The type of the product to create.
:type Tags: list
:param Tags: Tags to associate with the new product.
(dict) --Key/value pairs to associate with this provisioning. These tags are entirely discretionary and are propagated to the resources created in the provisioning.
Key (string) -- [REQUIRED]The ProvisioningArtifactParameter.TagKey parameter from DescribeProvisioningParameters .
Value (string) -- [REQUIRED]The esired value for this key.
:type ProvisioningArtifactParameters: dict
:param ProvisioningArtifactParameters: [REQUIRED]
Parameters for the provisioning artifact.
Name (string) --The name assigned to the provisioning artifact properties.
Description (string) --The text description of the provisioning artifact properties.
Info (dict) -- [REQUIRED]Additional information about the provisioning artifact properties.
(string) --
(string) --
Type (string) --The type of the provisioning artifact properties.
:type IdempotencyToken: string
:param IdempotencyToken: [REQUIRED]
A token to disambiguate duplicate requests. You can create multiple resources using the same input in multiple requests, provided that you also specify a different idempotency token for each request.
This field is autopopulated if not provided.
:rtype: dict
:return: {
'ProductViewDetail': {
'ProductViewSummary': {
'Id': 'string',
'ProductId': 'string',
'Name': 'string',
'Owner': 'string',
'ShortDescription': 'string',
'Type': 'CLOUD_FORMATION_TEMPLATE',
'Distributor': 'string',
'HasDefaultPath': True|False,
'SupportEmail': 'string',
'SupportDescription': 'string',
'SupportUrl': 'string'
},
'Status': 'AVAILABLE'|'CREATING'|'FAILED',
'ProductARN': 'string',
'CreatedTime': datetime(2015, 1, 1)
},
'ProvisioningArtifactDetail': {
'Id': 'string',
'Name': 'string',
'Description': 'string',
'Type': 'CLOUD_FORMATION_TEMPLATE',
'CreatedTime': datetime(2015, 1, 1)
},
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
} | entailment |
def provision_product(AcceptLanguage=None, ProductId=None, ProvisioningArtifactId=None, PathId=None, ProvisionedProductName=None, ProvisioningParameters=None, Tags=None, NotificationArns=None, ProvisionToken=None):
"""
Requests a Provision of a specified product. A ProvisionedProduct is a resourced instance for a product. For example, provisioning a CloudFormation-template-backed product results in launching a CloudFormation stack and all the underlying resources that come with it.
You can check the status of this request using the DescribeRecord operation.
See also: AWS API Documentation
:example: response = client.provision_product(
AcceptLanguage='string',
ProductId='string',
ProvisioningArtifactId='string',
PathId='string',
ProvisionedProductName='string',
ProvisioningParameters=[
{
'Key': 'string',
'Value': 'string'
},
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
NotificationArns=[
'string',
],
ProvisionToken='string'
)
:type AcceptLanguage: string
:param AcceptLanguage: The language code to use for this operation. Supported language codes are as follows:
'en' (English)
'jp' (Japanese)
'zh' (Chinese)
If no code is specified, 'en' is used as the default.
:type ProductId: string
:param ProductId: [REQUIRED]
The product identifier.
:type ProvisioningArtifactId: string
:param ProvisioningArtifactId: [REQUIRED]
The provisioning artifact identifier for this product.
:type PathId: string
:param PathId: The identifier of the path for this product's provisioning. This value is optional if the product has a default path, and is required if there is more than one path for the specified product.
:type ProvisionedProductName: string
:param ProvisionedProductName: [REQUIRED]
A user-friendly name to identify the ProvisionedProduct object. This value must be unique for the AWS account and cannot be updated after the product is provisioned.
:type ProvisioningParameters: list
:param ProvisioningParameters: Parameters specified by the administrator that are required for provisioning the product.
(dict) --The arameter key/value pairs used to provision a product.
Key (string) --The ProvisioningArtifactParameter.ParameterKey parameter from DescribeProvisioningParameters .
Value (string) --The value to use for provisioning. Any constraints on this value can be found in ProvisioningArtifactParameter for Key .
:type Tags: list
:param Tags: A list of tags to use as provisioning options.
(dict) --Key/value pairs to associate with this provisioning. These tags are entirely discretionary and are propagated to the resources created in the provisioning.
Key (string) -- [REQUIRED]The ProvisioningArtifactParameter.TagKey parameter from DescribeProvisioningParameters .
Value (string) -- [REQUIRED]The esired value for this key.
:type NotificationArns: list
:param NotificationArns: Passed to CloudFormation. The SNS topic ARNs to which to publish stack-related events.
(string) --
:type ProvisionToken: string
:param ProvisionToken: [REQUIRED]
An idempotency token that uniquely identifies the provisioning request.
This field is autopopulated if not provided.
:rtype: dict
:return: {
'RecordDetail': {
'RecordId': 'string',
'ProvisionedProductName': 'string',
'Status': 'IN_PROGRESS'|'SUCCEEDED'|'ERROR',
'CreatedTime': datetime(2015, 1, 1),
'UpdatedTime': datetime(2015, 1, 1),
'ProvisionedProductType': 'string',
'RecordType': 'string',
'ProvisionedProductId': 'string',
'ProductId': 'string',
'ProvisioningArtifactId': 'string',
'PathId': 'string',
'RecordErrors': [
{
'Code': 'string',
'Description': 'string'
},
],
'RecordTags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
}
"""
pass | Requests a Provision of a specified product. A ProvisionedProduct is a resourced instance for a product. For example, provisioning a CloudFormation-template-backed product results in launching a CloudFormation stack and all the underlying resources that come with it.
You can check the status of this request using the DescribeRecord operation.
See also: AWS API Documentation
:example: response = client.provision_product(
AcceptLanguage='string',
ProductId='string',
ProvisioningArtifactId='string',
PathId='string',
ProvisionedProductName='string',
ProvisioningParameters=[
{
'Key': 'string',
'Value': 'string'
},
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
NotificationArns=[
'string',
],
ProvisionToken='string'
)
:type AcceptLanguage: string
:param AcceptLanguage: The language code to use for this operation. Supported language codes are as follows:
'en' (English)
'jp' (Japanese)
'zh' (Chinese)
If no code is specified, 'en' is used as the default.
:type ProductId: string
:param ProductId: [REQUIRED]
The product identifier.
:type ProvisioningArtifactId: string
:param ProvisioningArtifactId: [REQUIRED]
The provisioning artifact identifier for this product.
:type PathId: string
:param PathId: The identifier of the path for this product's provisioning. This value is optional if the product has a default path, and is required if there is more than one path for the specified product.
:type ProvisionedProductName: string
:param ProvisionedProductName: [REQUIRED]
A user-friendly name to identify the ProvisionedProduct object. This value must be unique for the AWS account and cannot be updated after the product is provisioned.
:type ProvisioningParameters: list
:param ProvisioningParameters: Parameters specified by the administrator that are required for provisioning the product.
(dict) --The arameter key/value pairs used to provision a product.
Key (string) --The ProvisioningArtifactParameter.ParameterKey parameter from DescribeProvisioningParameters .
Value (string) --The value to use for provisioning. Any constraints on this value can be found in ProvisioningArtifactParameter for Key .
:type Tags: list
:param Tags: A list of tags to use as provisioning options.
(dict) --Key/value pairs to associate with this provisioning. These tags are entirely discretionary and are propagated to the resources created in the provisioning.
Key (string) -- [REQUIRED]The ProvisioningArtifactParameter.TagKey parameter from DescribeProvisioningParameters .
Value (string) -- [REQUIRED]The esired value for this key.
:type NotificationArns: list
:param NotificationArns: Passed to CloudFormation. The SNS topic ARNs to which to publish stack-related events.
(string) --
:type ProvisionToken: string
:param ProvisionToken: [REQUIRED]
An idempotency token that uniquely identifies the provisioning request.
This field is autopopulated if not provided.
:rtype: dict
:return: {
'RecordDetail': {
'RecordId': 'string',
'ProvisionedProductName': 'string',
'Status': 'IN_PROGRESS'|'SUCCEEDED'|'ERROR',
'CreatedTime': datetime(2015, 1, 1),
'UpdatedTime': datetime(2015, 1, 1),
'ProvisionedProductType': 'string',
'RecordType': 'string',
'ProvisionedProductId': 'string',
'ProductId': 'string',
'ProvisioningArtifactId': 'string',
'PathId': 'string',
'RecordErrors': [
{
'Code': 'string',
'Description': 'string'
},
],
'RecordTags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
} | entailment |
def update_product(AcceptLanguage=None, Id=None, Name=None, Owner=None, Description=None, Distributor=None, SupportDescription=None, SupportEmail=None, SupportUrl=None, AddTags=None, RemoveTags=None):
"""
Updates an existing product.
See also: AWS API Documentation
:example: response = client.update_product(
AcceptLanguage='string',
Id='string',
Name='string',
Owner='string',
Description='string',
Distributor='string',
SupportDescription='string',
SupportEmail='string',
SupportUrl='string',
AddTags=[
{
'Key': 'string',
'Value': 'string'
},
],
RemoveTags=[
'string',
]
)
:type AcceptLanguage: string
:param AcceptLanguage: The language code to use for this operation. Supported language codes are as follows:
'en' (English)
'jp' (Japanese)
'zh' (Chinese)
If no code is specified, 'en' is used as the default.
:type Id: string
:param Id: [REQUIRED]
The identifier of the product for the update request.
:type Name: string
:param Name: The updated product name.
:type Owner: string
:param Owner: The updated owner of the product.
:type Description: string
:param Description: The updated text description of the product.
:type Distributor: string
:param Distributor: The updated distributor of the product.
:type SupportDescription: string
:param SupportDescription: The updated support description for the product.
:type SupportEmail: string
:param SupportEmail: The updated support email for the product.
:type SupportUrl: string
:param SupportUrl: The updated support URL for the product.
:type AddTags: list
:param AddTags: Tags to add to the existing list of tags associated with the product.
(dict) --Key/value pairs to associate with this provisioning. These tags are entirely discretionary and are propagated to the resources created in the provisioning.
Key (string) -- [REQUIRED]The ProvisioningArtifactParameter.TagKey parameter from DescribeProvisioningParameters .
Value (string) -- [REQUIRED]The esired value for this key.
:type RemoveTags: list
:param RemoveTags: Tags to remove from the existing list of tags associated with the product.
(string) --
:rtype: dict
:return: {
'ProductViewDetail': {
'ProductViewSummary': {
'Id': 'string',
'ProductId': 'string',
'Name': 'string',
'Owner': 'string',
'ShortDescription': 'string',
'Type': 'CLOUD_FORMATION_TEMPLATE',
'Distributor': 'string',
'HasDefaultPath': True|False,
'SupportEmail': 'string',
'SupportDescription': 'string',
'SupportUrl': 'string'
},
'Status': 'AVAILABLE'|'CREATING'|'FAILED',
'ProductARN': 'string',
'CreatedTime': datetime(2015, 1, 1)
},
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
"""
pass | Updates an existing product.
See also: AWS API Documentation
:example: response = client.update_product(
AcceptLanguage='string',
Id='string',
Name='string',
Owner='string',
Description='string',
Distributor='string',
SupportDescription='string',
SupportEmail='string',
SupportUrl='string',
AddTags=[
{
'Key': 'string',
'Value': 'string'
},
],
RemoveTags=[
'string',
]
)
:type AcceptLanguage: string
:param AcceptLanguage: The language code to use for this operation. Supported language codes are as follows:
'en' (English)
'jp' (Japanese)
'zh' (Chinese)
If no code is specified, 'en' is used as the default.
:type Id: string
:param Id: [REQUIRED]
The identifier of the product for the update request.
:type Name: string
:param Name: The updated product name.
:type Owner: string
:param Owner: The updated owner of the product.
:type Description: string
:param Description: The updated text description of the product.
:type Distributor: string
:param Distributor: The updated distributor of the product.
:type SupportDescription: string
:param SupportDescription: The updated support description for the product.
:type SupportEmail: string
:param SupportEmail: The updated support email for the product.
:type SupportUrl: string
:param SupportUrl: The updated support URL for the product.
:type AddTags: list
:param AddTags: Tags to add to the existing list of tags associated with the product.
(dict) --Key/value pairs to associate with this provisioning. These tags are entirely discretionary and are propagated to the resources created in the provisioning.
Key (string) -- [REQUIRED]The ProvisioningArtifactParameter.TagKey parameter from DescribeProvisioningParameters .
Value (string) -- [REQUIRED]The esired value for this key.
:type RemoveTags: list
:param RemoveTags: Tags to remove from the existing list of tags associated with the product.
(string) --
:rtype: dict
:return: {
'ProductViewDetail': {
'ProductViewSummary': {
'Id': 'string',
'ProductId': 'string',
'Name': 'string',
'Owner': 'string',
'ShortDescription': 'string',
'Type': 'CLOUD_FORMATION_TEMPLATE',
'Distributor': 'string',
'HasDefaultPath': True|False,
'SupportEmail': 'string',
'SupportDescription': 'string',
'SupportUrl': 'string'
},
'Status': 'AVAILABLE'|'CREATING'|'FAILED',
'ProductARN': 'string',
'CreatedTime': datetime(2015, 1, 1)
},
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
} | entailment |
def list_closed_workflow_executions(domain=None, startTimeFilter=None, closeTimeFilter=None, executionFilter=None, closeStatusFilter=None, typeFilter=None, tagFilter=None, nextPageToken=None, maximumPageSize=None, reverseOrder=None):
"""
Returns a list of closed workflow executions in the specified domain that meet the filtering criteria. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.
Access Control
You can use IAM policies to control this action's access to Amazon SWF resources as follows:
If the caller does not have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter will be set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows .
See also: AWS API Documentation
:example: response = client.list_closed_workflow_executions(
domain='string',
startTimeFilter={
'oldestDate': datetime(2015, 1, 1),
'latestDate': datetime(2015, 1, 1)
},
closeTimeFilter={
'oldestDate': datetime(2015, 1, 1),
'latestDate': datetime(2015, 1, 1)
},
executionFilter={
'workflowId': 'string'
},
closeStatusFilter={
'status': 'COMPLETED'|'FAILED'|'CANCELED'|'TERMINATED'|'CONTINUED_AS_NEW'|'TIMED_OUT'
},
typeFilter={
'name': 'string',
'version': 'string'
},
tagFilter={
'tag': 'string'
},
nextPageToken='string',
maximumPageSize=123,
reverseOrder=True|False
)
:type domain: string
:param domain: [REQUIRED]
The name of the domain that contains the workflow executions to list.
:type startTimeFilter: dict
:param startTimeFilter: If specified, the workflow executions are included in the returned results based on whether their start times are within the range specified by this filter. Also, if this parameter is specified, the returned results are ordered by their start times.
Note
startTimeFilter and closeTimeFilter are mutually exclusive. You must specify one of these in a request but not both.
oldestDate (datetime) -- [REQUIRED]Specifies the oldest start or close date and time to return.
latestDate (datetime) --Specifies the latest start or close date and time to return.
:type closeTimeFilter: dict
:param closeTimeFilter: If specified, the workflow executions are included in the returned results based on whether their close times are within the range specified by this filter. Also, if this parameter is specified, the returned results are ordered by their close times.
Note
startTimeFilter and closeTimeFilter are mutually exclusive. You must specify one of these in a request but not both.
oldestDate (datetime) -- [REQUIRED]Specifies the oldest start or close date and time to return.
latestDate (datetime) --Specifies the latest start or close date and time to return.
:type executionFilter: dict
:param executionFilter: If specified, only workflow executions matching the workflow ID specified in the filter are returned.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
workflowId (string) -- [REQUIRED]The workflowId to pass of match the criteria of this filter.
:type closeStatusFilter: dict
:param closeStatusFilter: If specified, only workflow executions that match this close status are listed. For example, if TERMINATED is specified, then only TERMINATED workflow executions are listed.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
status (string) -- [REQUIRED]Required. The close status that must match the close status of an execution for it to meet the criteria of this filter.
:type typeFilter: dict
:param typeFilter: If specified, only executions of the type specified in the filter are returned.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
name (string) -- [REQUIRED]Required. Name of the workflow type.
version (string) --Version of the workflow type.
:type tagFilter: dict
:param tagFilter: If specified, only executions that have the matching tag are listed.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
tag (string) -- [REQUIRED]Required. Specifies the tag that must be associated with the execution for it to meet the filter criteria.
:type nextPageToken: string
:param nextPageToken: If a NextPageToken was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in nextPageToken . Keep all other arguments unchanged.
The configured maximumPageSize determines how many results can be returned in a single call.
:type maximumPageSize: integer
:param maximumPageSize: The maximum number of results that will be returned per call. nextPageToken can be used to obtain futher pages of results. The default is 1000, which is the maximum allowed page size. You can, however, specify a page size smaller than the maximum.
This is an upper limit only; the actual number of results returned per call may be fewer than the specified maximum.
:type reverseOrder: boolean
:param reverseOrder: When set to true , returns the results in reverse order. By default the results are returned in descending order of the start or the close time of the executions.
:rtype: dict
:return: {
'executionInfos': [
{
'execution': {
'workflowId': 'string',
'runId': 'string'
},
'workflowType': {
'name': 'string',
'version': 'string'
},
'startTimestamp': datetime(2015, 1, 1),
'closeTimestamp': datetime(2015, 1, 1),
'executionStatus': 'OPEN'|'CLOSED',
'closeStatus': 'COMPLETED'|'FAILED'|'CANCELED'|'TERMINATED'|'CONTINUED_AS_NEW'|'TIMED_OUT',
'parent': {
'workflowId': 'string',
'runId': 'string'
},
'tagList': [
'string',
],
'cancelRequested': True|False
},
],
'nextPageToken': 'string'
}
:returns:
domain (string) -- [REQUIRED]
The name of the domain that contains the workflow executions to list.
startTimeFilter (dict) -- If specified, the workflow executions are included in the returned results based on whether their start times are within the range specified by this filter. Also, if this parameter is specified, the returned results are ordered by their start times.
Note
startTimeFilter and closeTimeFilter are mutually exclusive. You must specify one of these in a request but not both.
oldestDate (datetime) -- [REQUIRED]Specifies the oldest start or close date and time to return.
latestDate (datetime) --Specifies the latest start or close date and time to return.
closeTimeFilter (dict) -- If specified, the workflow executions are included in the returned results based on whether their close times are within the range specified by this filter. Also, if this parameter is specified, the returned results are ordered by their close times.
Note
startTimeFilter and closeTimeFilter are mutually exclusive. You must specify one of these in a request but not both.
oldestDate (datetime) -- [REQUIRED]Specifies the oldest start or close date and time to return.
latestDate (datetime) --Specifies the latest start or close date and time to return.
executionFilter (dict) -- If specified, only workflow executions matching the workflow ID specified in the filter are returned.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
workflowId (string) -- [REQUIRED]The workflowId to pass of match the criteria of this filter.
closeStatusFilter (dict) -- If specified, only workflow executions that match this close status are listed. For example, if TERMINATED is specified, then only TERMINATED workflow executions are listed.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
status (string) -- [REQUIRED]Required. The close status that must match the close status of an execution for it to meet the criteria of this filter.
typeFilter (dict) -- If specified, only executions of the type specified in the filter are returned.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
name (string) -- [REQUIRED]Required. Name of the workflow type.
version (string) --Version of the workflow type.
tagFilter (dict) -- If specified, only executions that have the matching tag are listed.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
tag (string) -- [REQUIRED]Required. Specifies the tag that must be associated with the execution for it to meet the filter criteria.
nextPageToken (string) -- If a NextPageToken was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in nextPageToken . Keep all other arguments unchanged.
The configured maximumPageSize determines how many results can be returned in a single call.
maximumPageSize (integer) -- The maximum number of results that will be returned per call. nextPageToken can be used to obtain futher pages of results. The default is 1000, which is the maximum allowed page size. You can, however, specify a page size smaller than the maximum.
This is an upper limit only; the actual number of results returned per call may be fewer than the specified maximum.
reverseOrder (boolean) -- When set to true , returns the results in reverse order. By default the results are returned in descending order of the start or the close time of the executions.
"""
pass | Returns a list of closed workflow executions in the specified domain that meet the filtering criteria. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.
Access Control
You can use IAM policies to control this action's access to Amazon SWF resources as follows:
If the caller does not have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter will be set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows .
See also: AWS API Documentation
:example: response = client.list_closed_workflow_executions(
domain='string',
startTimeFilter={
'oldestDate': datetime(2015, 1, 1),
'latestDate': datetime(2015, 1, 1)
},
closeTimeFilter={
'oldestDate': datetime(2015, 1, 1),
'latestDate': datetime(2015, 1, 1)
},
executionFilter={
'workflowId': 'string'
},
closeStatusFilter={
'status': 'COMPLETED'|'FAILED'|'CANCELED'|'TERMINATED'|'CONTINUED_AS_NEW'|'TIMED_OUT'
},
typeFilter={
'name': 'string',
'version': 'string'
},
tagFilter={
'tag': 'string'
},
nextPageToken='string',
maximumPageSize=123,
reverseOrder=True|False
)
:type domain: string
:param domain: [REQUIRED]
The name of the domain that contains the workflow executions to list.
:type startTimeFilter: dict
:param startTimeFilter: If specified, the workflow executions are included in the returned results based on whether their start times are within the range specified by this filter. Also, if this parameter is specified, the returned results are ordered by their start times.
Note
startTimeFilter and closeTimeFilter are mutually exclusive. You must specify one of these in a request but not both.
oldestDate (datetime) -- [REQUIRED]Specifies the oldest start or close date and time to return.
latestDate (datetime) --Specifies the latest start or close date and time to return.
:type closeTimeFilter: dict
:param closeTimeFilter: If specified, the workflow executions are included in the returned results based on whether their close times are within the range specified by this filter. Also, if this parameter is specified, the returned results are ordered by their close times.
Note
startTimeFilter and closeTimeFilter are mutually exclusive. You must specify one of these in a request but not both.
oldestDate (datetime) -- [REQUIRED]Specifies the oldest start or close date and time to return.
latestDate (datetime) --Specifies the latest start or close date and time to return.
:type executionFilter: dict
:param executionFilter: If specified, only workflow executions matching the workflow ID specified in the filter are returned.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
workflowId (string) -- [REQUIRED]The workflowId to pass of match the criteria of this filter.
:type closeStatusFilter: dict
:param closeStatusFilter: If specified, only workflow executions that match this close status are listed. For example, if TERMINATED is specified, then only TERMINATED workflow executions are listed.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
status (string) -- [REQUIRED]Required. The close status that must match the close status of an execution for it to meet the criteria of this filter.
:type typeFilter: dict
:param typeFilter: If specified, only executions of the type specified in the filter are returned.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
name (string) -- [REQUIRED]Required. Name of the workflow type.
version (string) --Version of the workflow type.
:type tagFilter: dict
:param tagFilter: If specified, only executions that have the matching tag are listed.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
tag (string) -- [REQUIRED]Required. Specifies the tag that must be associated with the execution for it to meet the filter criteria.
:type nextPageToken: string
:param nextPageToken: If a NextPageToken was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in nextPageToken . Keep all other arguments unchanged.
The configured maximumPageSize determines how many results can be returned in a single call.
:type maximumPageSize: integer
:param maximumPageSize: The maximum number of results that will be returned per call. nextPageToken can be used to obtain futher pages of results. The default is 1000, which is the maximum allowed page size. You can, however, specify a page size smaller than the maximum.
This is an upper limit only; the actual number of results returned per call may be fewer than the specified maximum.
:type reverseOrder: boolean
:param reverseOrder: When set to true , returns the results in reverse order. By default the results are returned in descending order of the start or the close time of the executions.
:rtype: dict
:return: {
'executionInfos': [
{
'execution': {
'workflowId': 'string',
'runId': 'string'
},
'workflowType': {
'name': 'string',
'version': 'string'
},
'startTimestamp': datetime(2015, 1, 1),
'closeTimestamp': datetime(2015, 1, 1),
'executionStatus': 'OPEN'|'CLOSED',
'closeStatus': 'COMPLETED'|'FAILED'|'CANCELED'|'TERMINATED'|'CONTINUED_AS_NEW'|'TIMED_OUT',
'parent': {
'workflowId': 'string',
'runId': 'string'
},
'tagList': [
'string',
],
'cancelRequested': True|False
},
],
'nextPageToken': 'string'
}
:returns:
domain (string) -- [REQUIRED]
The name of the domain that contains the workflow executions to list.
startTimeFilter (dict) -- If specified, the workflow executions are included in the returned results based on whether their start times are within the range specified by this filter. Also, if this parameter is specified, the returned results are ordered by their start times.
Note
startTimeFilter and closeTimeFilter are mutually exclusive. You must specify one of these in a request but not both.
oldestDate (datetime) -- [REQUIRED]Specifies the oldest start or close date and time to return.
latestDate (datetime) --Specifies the latest start or close date and time to return.
closeTimeFilter (dict) -- If specified, the workflow executions are included in the returned results based on whether their close times are within the range specified by this filter. Also, if this parameter is specified, the returned results are ordered by their close times.
Note
startTimeFilter and closeTimeFilter are mutually exclusive. You must specify one of these in a request but not both.
oldestDate (datetime) -- [REQUIRED]Specifies the oldest start or close date and time to return.
latestDate (datetime) --Specifies the latest start or close date and time to return.
executionFilter (dict) -- If specified, only workflow executions matching the workflow ID specified in the filter are returned.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
workflowId (string) -- [REQUIRED]The workflowId to pass of match the criteria of this filter.
closeStatusFilter (dict) -- If specified, only workflow executions that match this close status are listed. For example, if TERMINATED is specified, then only TERMINATED workflow executions are listed.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
status (string) -- [REQUIRED]Required. The close status that must match the close status of an execution for it to meet the criteria of this filter.
typeFilter (dict) -- If specified, only executions of the type specified in the filter are returned.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
name (string) -- [REQUIRED]Required. Name of the workflow type.
version (string) --Version of the workflow type.
tagFilter (dict) -- If specified, only executions that have the matching tag are listed.
Note
closeStatusFilter , executionFilter , typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
tag (string) -- [REQUIRED]Required. Specifies the tag that must be associated with the execution for it to meet the filter criteria.
nextPageToken (string) -- If a NextPageToken was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in nextPageToken . Keep all other arguments unchanged.
The configured maximumPageSize determines how many results can be returned in a single call.
maximumPageSize (integer) -- The maximum number of results that will be returned per call. nextPageToken can be used to obtain futher pages of results. The default is 1000, which is the maximum allowed page size. You can, however, specify a page size smaller than the maximum.
This is an upper limit only; the actual number of results returned per call may be fewer than the specified maximum.
reverseOrder (boolean) -- When set to true , returns the results in reverse order. By default the results are returned in descending order of the start or the close time of the executions. | entailment |
def register_activity_type(domain=None, name=None, version=None, description=None, defaultTaskStartToCloseTimeout=None, defaultTaskHeartbeatTimeout=None, defaultTaskList=None, defaultTaskPriority=None, defaultTaskScheduleToStartTimeout=None, defaultTaskScheduleToCloseTimeout=None):
"""
Registers a new activity type along with its configuration settings in the specified domain.
Access Control
You can use IAM policies to control this action's access to Amazon SWF resources as follows:
If the caller does not have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter will be set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows .
See also: AWS API Documentation
:example: response = client.register_activity_type(
domain='string',
name='string',
version='string',
description='string',
defaultTaskStartToCloseTimeout='string',
defaultTaskHeartbeatTimeout='string',
defaultTaskList={
'name': 'string'
},
defaultTaskPriority='string',
defaultTaskScheduleToStartTimeout='string',
defaultTaskScheduleToCloseTimeout='string'
)
:type domain: string
:param domain: [REQUIRED]
The name of the domain in which this activity is to be registered.
:type name: string
:param name: [REQUIRED]
The name of the activity type within the domain.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
:type version: string
:param version: [REQUIRED]
The version of the activity type.
Note
The activity type consists of the name and version, the combination of which must be unique within the domain.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
:type description: string
:param description: A textual description of the activity type.
:type defaultTaskStartToCloseTimeout: string
:param defaultTaskStartToCloseTimeout: If set, specifies the default maximum duration that a worker can take to process tasks of this activity type. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value 'NONE' can be used to specify unlimited duration.
:type defaultTaskHeartbeatTimeout: string
:param defaultTaskHeartbeatTimeout: If set, specifies the default maximum time before which a worker processing a task of this type must report progress by calling RecordActivityTaskHeartbeat . If the timeout is exceeded, the activity task is automatically timed out. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision. If the activity worker subsequently attempts to record a heartbeat or returns a result, the activity worker receives an UnknownResource fault. In this case, Amazon SWF no longer considers the activity task to be valid; the activity worker should clean up the activity task.
The duration is specified in seconds; an integer greater than or equal to 0. The value 'NONE' can be used to specify unlimited duration.
:type defaultTaskList: dict
:param defaultTaskList: If set, specifies the default task list to use for scheduling tasks of this activity type. This default task list is used if a task list is not provided when a task is scheduled through the ScheduleActivityTask decision.
name (string) -- [REQUIRED]The name of the task list.
:type defaultTaskPriority: string
:param defaultTaskPriority: The default task priority to assign to the activity type. If not assigned, then '0' will be used. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority.
For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer Guide .
:type defaultTaskScheduleToStartTimeout: string
:param defaultTaskScheduleToStartTimeout: If set, specifies the default maximum duration that a task of this activity type can wait before being assigned to a worker. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value 'NONE' can be used to specify unlimited duration.
:type defaultTaskScheduleToCloseTimeout: string
:param defaultTaskScheduleToCloseTimeout: If set, specifies the default maximum duration for a task of this activity type. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value 'NONE' can be used to specify unlimited duration.
:returns:
domain (string) -- [REQUIRED]
The name of the domain in which this activity is to be registered.
name (string) -- [REQUIRED]
The name of the activity type within the domain.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
version (string) -- [REQUIRED]
The version of the activity type.
Note
The activity type consists of the name and version, the combination of which must be unique within the domain.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
description (string) -- A textual description of the activity type.
defaultTaskStartToCloseTimeout (string) -- If set, specifies the default maximum duration that a worker can take to process tasks of this activity type. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value "NONE" can be used to specify unlimited duration.
defaultTaskHeartbeatTimeout (string) -- If set, specifies the default maximum time before which a worker processing a task of this type must report progress by calling RecordActivityTaskHeartbeat . If the timeout is exceeded, the activity task is automatically timed out. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision. If the activity worker subsequently attempts to record a heartbeat or returns a result, the activity worker receives an UnknownResource fault. In this case, Amazon SWF no longer considers the activity task to be valid; the activity worker should clean up the activity task.
The duration is specified in seconds; an integer greater than or equal to 0. The value "NONE" can be used to specify unlimited duration.
defaultTaskList (dict) -- If set, specifies the default task list to use for scheduling tasks of this activity type. This default task list is used if a task list is not provided when a task is scheduled through the ScheduleActivityTask decision.
name (string) -- [REQUIRED]The name of the task list.
defaultTaskPriority (string) -- The default task priority to assign to the activity type. If not assigned, then "0" will be used. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority.
For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer Guide .
defaultTaskScheduleToStartTimeout (string) -- If set, specifies the default maximum duration that a task of this activity type can wait before being assigned to a worker. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value "NONE" can be used to specify unlimited duration.
defaultTaskScheduleToCloseTimeout (string) -- If set, specifies the default maximum duration for a task of this activity type. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value "NONE" can be used to specify unlimited duration.
"""
pass | Registers a new activity type along with its configuration settings in the specified domain.
Access Control
You can use IAM policies to control this action's access to Amazon SWF resources as follows:
If the caller does not have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter will be set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows .
See also: AWS API Documentation
:example: response = client.register_activity_type(
domain='string',
name='string',
version='string',
description='string',
defaultTaskStartToCloseTimeout='string',
defaultTaskHeartbeatTimeout='string',
defaultTaskList={
'name': 'string'
},
defaultTaskPriority='string',
defaultTaskScheduleToStartTimeout='string',
defaultTaskScheduleToCloseTimeout='string'
)
:type domain: string
:param domain: [REQUIRED]
The name of the domain in which this activity is to be registered.
:type name: string
:param name: [REQUIRED]
The name of the activity type within the domain.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
:type version: string
:param version: [REQUIRED]
The version of the activity type.
Note
The activity type consists of the name and version, the combination of which must be unique within the domain.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
:type description: string
:param description: A textual description of the activity type.
:type defaultTaskStartToCloseTimeout: string
:param defaultTaskStartToCloseTimeout: If set, specifies the default maximum duration that a worker can take to process tasks of this activity type. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value 'NONE' can be used to specify unlimited duration.
:type defaultTaskHeartbeatTimeout: string
:param defaultTaskHeartbeatTimeout: If set, specifies the default maximum time before which a worker processing a task of this type must report progress by calling RecordActivityTaskHeartbeat . If the timeout is exceeded, the activity task is automatically timed out. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision. If the activity worker subsequently attempts to record a heartbeat or returns a result, the activity worker receives an UnknownResource fault. In this case, Amazon SWF no longer considers the activity task to be valid; the activity worker should clean up the activity task.
The duration is specified in seconds; an integer greater than or equal to 0. The value 'NONE' can be used to specify unlimited duration.
:type defaultTaskList: dict
:param defaultTaskList: If set, specifies the default task list to use for scheduling tasks of this activity type. This default task list is used if a task list is not provided when a task is scheduled through the ScheduleActivityTask decision.
name (string) -- [REQUIRED]The name of the task list.
:type defaultTaskPriority: string
:param defaultTaskPriority: The default task priority to assign to the activity type. If not assigned, then '0' will be used. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority.
For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer Guide .
:type defaultTaskScheduleToStartTimeout: string
:param defaultTaskScheduleToStartTimeout: If set, specifies the default maximum duration that a task of this activity type can wait before being assigned to a worker. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value 'NONE' can be used to specify unlimited duration.
:type defaultTaskScheduleToCloseTimeout: string
:param defaultTaskScheduleToCloseTimeout: If set, specifies the default maximum duration for a task of this activity type. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value 'NONE' can be used to specify unlimited duration.
:returns:
domain (string) -- [REQUIRED]
The name of the domain in which this activity is to be registered.
name (string) -- [REQUIRED]
The name of the activity type within the domain.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
version (string) -- [REQUIRED]
The version of the activity type.
Note
The activity type consists of the name and version, the combination of which must be unique within the domain.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
description (string) -- A textual description of the activity type.
defaultTaskStartToCloseTimeout (string) -- If set, specifies the default maximum duration that a worker can take to process tasks of this activity type. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value "NONE" can be used to specify unlimited duration.
defaultTaskHeartbeatTimeout (string) -- If set, specifies the default maximum time before which a worker processing a task of this type must report progress by calling RecordActivityTaskHeartbeat . If the timeout is exceeded, the activity task is automatically timed out. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision. If the activity worker subsequently attempts to record a heartbeat or returns a result, the activity worker receives an UnknownResource fault. In this case, Amazon SWF no longer considers the activity task to be valid; the activity worker should clean up the activity task.
The duration is specified in seconds; an integer greater than or equal to 0. The value "NONE" can be used to specify unlimited duration.
defaultTaskList (dict) -- If set, specifies the default task list to use for scheduling tasks of this activity type. This default task list is used if a task list is not provided when a task is scheduled through the ScheduleActivityTask decision.
name (string) -- [REQUIRED]The name of the task list.
defaultTaskPriority (string) -- The default task priority to assign to the activity type. If not assigned, then "0" will be used. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority.
For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer Guide .
defaultTaskScheduleToStartTimeout (string) -- If set, specifies the default maximum duration that a task of this activity type can wait before being assigned to a worker. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value "NONE" can be used to specify unlimited duration.
defaultTaskScheduleToCloseTimeout (string) -- If set, specifies the default maximum duration for a task of this activity type. This default can be overridden when scheduling an activity task using the ScheduleActivityTask decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value "NONE" can be used to specify unlimited duration. | entailment |
def register_workflow_type(domain=None, name=None, version=None, description=None, defaultTaskStartToCloseTimeout=None, defaultExecutionStartToCloseTimeout=None, defaultTaskList=None, defaultTaskPriority=None, defaultChildPolicy=None, defaultLambdaRole=None):
"""
Registers a new workflow type and its configuration settings in the specified domain.
The retention period for the workflow history is set by the RegisterDomain action.
Access Control
You can use IAM policies to control this action's access to Amazon SWF resources as follows:
If the caller does not have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter will be set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows .
See also: AWS API Documentation
:example: response = client.register_workflow_type(
domain='string',
name='string',
version='string',
description='string',
defaultTaskStartToCloseTimeout='string',
defaultExecutionStartToCloseTimeout='string',
defaultTaskList={
'name': 'string'
},
defaultTaskPriority='string',
defaultChildPolicy='TERMINATE'|'REQUEST_CANCEL'|'ABANDON',
defaultLambdaRole='string'
)
:type domain: string
:param domain: [REQUIRED]
The name of the domain in which to register the workflow type.
:type name: string
:param name: [REQUIRED]
The name of the workflow type.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
:type version: string
:param version: [REQUIRED]
The version of the workflow type.
Note
The workflow type consists of the name and version, the combination of which must be unique within the domain. To get a list of all currently registered workflow types, use the ListWorkflowTypes action.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
:type description: string
:param description: Textual description of the workflow type.
:type defaultTaskStartToCloseTimeout: string
:param defaultTaskStartToCloseTimeout: If set, specifies the default maximum duration of decision tasks for this workflow type. This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value 'NONE' can be used to specify unlimited duration.
:type defaultExecutionStartToCloseTimeout: string
:param defaultExecutionStartToCloseTimeout: If set, specifies the default maximum duration for executions of this workflow type. You can override this default when starting an execution through the StartWorkflowExecution action or StartChildWorkflowExecution decision.
The duration is specified in seconds; an integer greater than or equal to 0. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of 'NONE' for defaultExecutionStartToCloseTimeout ; there is a one-year max limit on the time that a workflow execution can run. Exceeding this limit will always cause the workflow execution to time out.
:type defaultTaskList: dict
:param defaultTaskList: If set, specifies the default task list to use for scheduling decision tasks for executions of this workflow type. This default is used only if a task list is not provided when starting the execution through the StartWorkflowExecution action or StartChildWorkflowExecution decision.
name (string) -- [REQUIRED]The name of the task list.
:type defaultTaskPriority: string
:param defaultTaskPriority: The default task priority to assign to the workflow type. If not assigned, then '0' will be used. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority.
For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer Guide .
:type defaultChildPolicy: string
:param defaultChildPolicy: If set, specifies the default policy to use for the child workflow executions when a workflow execution of this type is terminated, by calling the TerminateWorkflowExecution action explicitly or due to an expired timeout. This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution decision.
The supported child policies are:
TERMINATE: the child executions will be terminated.
REQUEST_CANCEL: a request to cancel will be attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.
ABANDON: no action will be taken. The child executions will continue to run.
:type defaultLambdaRole: string
:param defaultLambdaRole: The ARN of the default IAM role to use when a workflow execution of this type invokes AWS Lambda functions.
This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution and ContinueAsNewWorkflowExecution decision.
:returns:
domain (string) -- [REQUIRED]
The name of the domain in which to register the workflow type.
name (string) -- [REQUIRED]
The name of the workflow type.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
version (string) -- [REQUIRED]
The version of the workflow type.
Note
The workflow type consists of the name and version, the combination of which must be unique within the domain. To get a list of all currently registered workflow types, use the ListWorkflowTypes action.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
description (string) -- Textual description of the workflow type.
defaultTaskStartToCloseTimeout (string) -- If set, specifies the default maximum duration of decision tasks for this workflow type. This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value "NONE" can be used to specify unlimited duration.
defaultExecutionStartToCloseTimeout (string) -- If set, specifies the default maximum duration for executions of this workflow type. You can override this default when starting an execution through the StartWorkflowExecution action or StartChildWorkflowExecution decision.
The duration is specified in seconds; an integer greater than or equal to 0. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of "NONE" for defaultExecutionStartToCloseTimeout ; there is a one-year max limit on the time that a workflow execution can run. Exceeding this limit will always cause the workflow execution to time out.
defaultTaskList (dict) -- If set, specifies the default task list to use for scheduling decision tasks for executions of this workflow type. This default is used only if a task list is not provided when starting the execution through the StartWorkflowExecution action or StartChildWorkflowExecution decision.
name (string) -- [REQUIRED]The name of the task list.
defaultTaskPriority (string) -- The default task priority to assign to the workflow type. If not assigned, then "0" will be used. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority.
For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer Guide .
defaultChildPolicy (string) -- If set, specifies the default policy to use for the child workflow executions when a workflow execution of this type is terminated, by calling the TerminateWorkflowExecution action explicitly or due to an expired timeout. This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution decision.
The supported child policies are:
TERMINATE: the child executions will be terminated.
REQUEST_CANCEL: a request to cancel will be attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.
ABANDON: no action will be taken. The child executions will continue to run.
defaultLambdaRole (string) -- The ARN of the default IAM role to use when a workflow execution of this type invokes AWS Lambda functions.
This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution and ContinueAsNewWorkflowExecution decision.
"""
pass | Registers a new workflow type and its configuration settings in the specified domain.
The retention period for the workflow history is set by the RegisterDomain action.
Access Control
You can use IAM policies to control this action's access to Amazon SWF resources as follows:
If the caller does not have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter will be set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows .
See also: AWS API Documentation
:example: response = client.register_workflow_type(
domain='string',
name='string',
version='string',
description='string',
defaultTaskStartToCloseTimeout='string',
defaultExecutionStartToCloseTimeout='string',
defaultTaskList={
'name': 'string'
},
defaultTaskPriority='string',
defaultChildPolicy='TERMINATE'|'REQUEST_CANCEL'|'ABANDON',
defaultLambdaRole='string'
)
:type domain: string
:param domain: [REQUIRED]
The name of the domain in which to register the workflow type.
:type name: string
:param name: [REQUIRED]
The name of the workflow type.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
:type version: string
:param version: [REQUIRED]
The version of the workflow type.
Note
The workflow type consists of the name and version, the combination of which must be unique within the domain. To get a list of all currently registered workflow types, use the ListWorkflowTypes action.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
:type description: string
:param description: Textual description of the workflow type.
:type defaultTaskStartToCloseTimeout: string
:param defaultTaskStartToCloseTimeout: If set, specifies the default maximum duration of decision tasks for this workflow type. This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value 'NONE' can be used to specify unlimited duration.
:type defaultExecutionStartToCloseTimeout: string
:param defaultExecutionStartToCloseTimeout: If set, specifies the default maximum duration for executions of this workflow type. You can override this default when starting an execution through the StartWorkflowExecution action or StartChildWorkflowExecution decision.
The duration is specified in seconds; an integer greater than or equal to 0. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of 'NONE' for defaultExecutionStartToCloseTimeout ; there is a one-year max limit on the time that a workflow execution can run. Exceeding this limit will always cause the workflow execution to time out.
:type defaultTaskList: dict
:param defaultTaskList: If set, specifies the default task list to use for scheduling decision tasks for executions of this workflow type. This default is used only if a task list is not provided when starting the execution through the StartWorkflowExecution action or StartChildWorkflowExecution decision.
name (string) -- [REQUIRED]The name of the task list.
:type defaultTaskPriority: string
:param defaultTaskPriority: The default task priority to assign to the workflow type. If not assigned, then '0' will be used. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority.
For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer Guide .
:type defaultChildPolicy: string
:param defaultChildPolicy: If set, specifies the default policy to use for the child workflow executions when a workflow execution of this type is terminated, by calling the TerminateWorkflowExecution action explicitly or due to an expired timeout. This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution decision.
The supported child policies are:
TERMINATE: the child executions will be terminated.
REQUEST_CANCEL: a request to cancel will be attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.
ABANDON: no action will be taken. The child executions will continue to run.
:type defaultLambdaRole: string
:param defaultLambdaRole: The ARN of the default IAM role to use when a workflow execution of this type invokes AWS Lambda functions.
This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution and ContinueAsNewWorkflowExecution decision.
:returns:
domain (string) -- [REQUIRED]
The name of the domain in which to register the workflow type.
name (string) -- [REQUIRED]
The name of the workflow type.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
version (string) -- [REQUIRED]
The version of the workflow type.
Note
The workflow type consists of the name and version, the combination of which must be unique within the domain. To get a list of all currently registered workflow types, use the ListWorkflowTypes action.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
description (string) -- Textual description of the workflow type.
defaultTaskStartToCloseTimeout (string) -- If set, specifies the default maximum duration of decision tasks for this workflow type. This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution decision.
The duration is specified in seconds; an integer greater than or equal to 0. The value "NONE" can be used to specify unlimited duration.
defaultExecutionStartToCloseTimeout (string) -- If set, specifies the default maximum duration for executions of this workflow type. You can override this default when starting an execution through the StartWorkflowExecution action or StartChildWorkflowExecution decision.
The duration is specified in seconds; an integer greater than or equal to 0. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of "NONE" for defaultExecutionStartToCloseTimeout ; there is a one-year max limit on the time that a workflow execution can run. Exceeding this limit will always cause the workflow execution to time out.
defaultTaskList (dict) -- If set, specifies the default task list to use for scheduling decision tasks for executions of this workflow type. This default is used only if a task list is not provided when starting the execution through the StartWorkflowExecution action or StartChildWorkflowExecution decision.
name (string) -- [REQUIRED]The name of the task list.
defaultTaskPriority (string) -- The default task priority to assign to the workflow type. If not assigned, then "0" will be used. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority.
For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer Guide .
defaultChildPolicy (string) -- If set, specifies the default policy to use for the child workflow executions when a workflow execution of this type is terminated, by calling the TerminateWorkflowExecution action explicitly or due to an expired timeout. This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution decision.
The supported child policies are:
TERMINATE: the child executions will be terminated.
REQUEST_CANCEL: a request to cancel will be attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.
ABANDON: no action will be taken. The child executions will continue to run.
defaultLambdaRole (string) -- The ARN of the default IAM role to use when a workflow execution of this type invokes AWS Lambda functions.
This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution and ContinueAsNewWorkflowExecution decision. | entailment |
def start_workflow_execution(domain=None, workflowId=None, workflowType=None, taskList=None, taskPriority=None, input=None, executionStartToCloseTimeout=None, tagList=None, taskStartToCloseTimeout=None, childPolicy=None, lambdaRole=None):
"""
Starts an execution of the workflow type in the specified domain using the provided workflowId and input data.
This action returns the newly started workflow execution.
Access Control
You can use IAM policies to control this action's access to Amazon SWF resources as follows:
If the caller does not have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter will be set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows .
See also: AWS API Documentation
:example: response = client.start_workflow_execution(
domain='string',
workflowId='string',
workflowType={
'name': 'string',
'version': 'string'
},
taskList={
'name': 'string'
},
taskPriority='string',
input='string',
executionStartToCloseTimeout='string',
tagList=[
'string',
],
taskStartToCloseTimeout='string',
childPolicy='TERMINATE'|'REQUEST_CANCEL'|'ABANDON',
lambdaRole='string'
)
:type domain: string
:param domain: [REQUIRED]
The name of the domain in which the workflow execution is created.
:type workflowId: string
:param workflowId: [REQUIRED]
The user defined identifier associated with the workflow execution. You can use this to associate a custom identifier with the workflow execution. You may specify the same identifier if a workflow execution is logically a restart of a previous execution. You cannot have two open workflow executions with the same workflowId at the same time.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
:type workflowType: dict
:param workflowType: [REQUIRED]
The type of the workflow to start.
name (string) -- [REQUIRED]Required. The name of the workflow type.
Note
The combination of workflow type name and version must be unique with in a domain.
version (string) -- [REQUIRED]Required. The version of the workflow type.
Note
The combination of workflow type name and version must be unique with in a domain.
:type taskList: dict
:param taskList: The task list to use for the decision tasks generated for this workflow execution. This overrides the defaultTaskList specified when registering the workflow type.
Note
A task list for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task list was specified at registration time then a fault will be returned.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
name (string) -- [REQUIRED]The name of the task list.
:type taskPriority: string
:param taskPriority: The task priority to use for this workflow execution. This will override any default priority that was assigned when the workflow type was registered. If not set, then the default task priority for the workflow type will be used. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority.
For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer Guide .
:type input: string
:param input: The input for the workflow execution. This is a free form string which should be meaningful to the workflow you are starting. This input is made available to the new workflow execution in the WorkflowExecutionStarted history event.
:type executionStartToCloseTimeout: string
:param executionStartToCloseTimeout: The total duration for this workflow execution. This overrides the defaultExecutionStartToCloseTimeout specified when registering the workflow type.
The duration is specified in seconds; an integer greater than or equal to 0. Exceeding this limit will cause the workflow execution to time out. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of 'NONE' for this timeout; there is a one-year max limit on the time that a workflow execution can run.
Note
An execution start-to-close timeout must be specified either through this parameter or as a default when the workflow type is registered. If neither this parameter nor a default execution start-to-close timeout is specified, a fault is returned.
:type tagList: list
:param tagList: The list of tags to associate with the workflow execution. You can specify a maximum of 5 tags. You can list workflow executions with a specific tag by calling ListOpenWorkflowExecutions or ListClosedWorkflowExecutions and specifying a TagFilter .
(string) --
:type taskStartToCloseTimeout: string
:param taskStartToCloseTimeout: Specifies the maximum duration of decision tasks for this workflow execution. This parameter overrides the defaultTaskStartToCloseTimout specified when registering the workflow type using RegisterWorkflowType .
The duration is specified in seconds; an integer greater than or equal to 0. The value 'NONE' can be used to specify unlimited duration.
Note
A task start-to-close timeout for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task start-to-close timeout was specified at registration time then a fault will be returned.
:type childPolicy: string
:param childPolicy: If set, specifies the policy to use for the child workflow executions of this workflow execution if it is terminated, by calling the TerminateWorkflowExecution action explicitly or due to an expired timeout. This policy overrides the default child policy specified when registering the workflow type using RegisterWorkflowType .
The supported child policies are:
TERMINATE: the child executions will be terminated.
REQUEST_CANCEL: a request to cancel will be attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.
ABANDON: no action will be taken. The child executions will continue to run.
Note
A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time then a fault will be returned.
:type lambdaRole: string
:param lambdaRole: The ARN of an IAM role that authorizes Amazon SWF to invoke AWS Lambda functions.
Note
In order for this workflow execution to invoke AWS Lambda functions, an appropriate IAM role must be specified either as a default for the workflow type or through this field.
:rtype: dict
:return: {
'runId': 'string'
}
:returns:
domain (string) -- [REQUIRED]
The name of the domain in which the workflow execution is created.
workflowId (string) -- [REQUIRED]
The user defined identifier associated with the workflow execution. You can use this to associate a custom identifier with the workflow execution. You may specify the same identifier if a workflow execution is logically a restart of a previous execution. You cannot have two open workflow executions with the same workflowId at the same time.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
workflowType (dict) -- [REQUIRED]
The type of the workflow to start.
name (string) -- [REQUIRED]Required. The name of the workflow type.
Note
The combination of workflow type name and version must be unique with in a domain.
version (string) -- [REQUIRED]Required. The version of the workflow type.
Note
The combination of workflow type name and version must be unique with in a domain.
taskList (dict) -- The task list to use for the decision tasks generated for this workflow execution. This overrides the defaultTaskList specified when registering the workflow type.
Note
A task list for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task list was specified at registration time then a fault will be returned.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
name (string) -- [REQUIRED]The name of the task list.
taskPriority (string) -- The task priority to use for this workflow execution. This will override any default priority that was assigned when the workflow type was registered. If not set, then the default task priority for the workflow type will be used. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority.
For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer Guide .
input (string) -- The input for the workflow execution. This is a free form string which should be meaningful to the workflow you are starting. This input is made available to the new workflow execution in the WorkflowExecutionStarted history event.
executionStartToCloseTimeout (string) -- The total duration for this workflow execution. This overrides the defaultExecutionStartToCloseTimeout specified when registering the workflow type.
The duration is specified in seconds; an integer greater than or equal to 0. Exceeding this limit will cause the workflow execution to time out. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of "NONE" for this timeout; there is a one-year max limit on the time that a workflow execution can run.
Note
An execution start-to-close timeout must be specified either through this parameter or as a default when the workflow type is registered. If neither this parameter nor a default execution start-to-close timeout is specified, a fault is returned.
tagList (list) -- The list of tags to associate with the workflow execution. You can specify a maximum of 5 tags. You can list workflow executions with a specific tag by calling ListOpenWorkflowExecutions or ListClosedWorkflowExecutions and specifying a TagFilter .
(string) --
taskStartToCloseTimeout (string) -- Specifies the maximum duration of decision tasks for this workflow execution. This parameter overrides the defaultTaskStartToCloseTimout specified when registering the workflow type using RegisterWorkflowType .
The duration is specified in seconds; an integer greater than or equal to 0. The value "NONE" can be used to specify unlimited duration.
Note
A task start-to-close timeout for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task start-to-close timeout was specified at registration time then a fault will be returned.
childPolicy (string) -- If set, specifies the policy to use for the child workflow executions of this workflow execution if it is terminated, by calling the TerminateWorkflowExecution action explicitly or due to an expired timeout. This policy overrides the default child policy specified when registering the workflow type using RegisterWorkflowType .
The supported child policies are:
TERMINATE: the child executions will be terminated.
REQUEST_CANCEL: a request to cancel will be attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.
ABANDON: no action will be taken. The child executions will continue to run.
Note
A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time then a fault will be returned.
lambdaRole (string) -- The ARN of an IAM role that authorizes Amazon SWF to invoke AWS Lambda functions.
Note
In order for this workflow execution to invoke AWS Lambda functions, an appropriate IAM role must be specified either as a default for the workflow type or through this field.
"""
pass | Starts an execution of the workflow type in the specified domain using the provided workflowId and input data.
This action returns the newly started workflow execution.
Access Control
You can use IAM policies to control this action's access to Amazon SWF resources as follows:
If the caller does not have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter will be set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows .
See also: AWS API Documentation
:example: response = client.start_workflow_execution(
domain='string',
workflowId='string',
workflowType={
'name': 'string',
'version': 'string'
},
taskList={
'name': 'string'
},
taskPriority='string',
input='string',
executionStartToCloseTimeout='string',
tagList=[
'string',
],
taskStartToCloseTimeout='string',
childPolicy='TERMINATE'|'REQUEST_CANCEL'|'ABANDON',
lambdaRole='string'
)
:type domain: string
:param domain: [REQUIRED]
The name of the domain in which the workflow execution is created.
:type workflowId: string
:param workflowId: [REQUIRED]
The user defined identifier associated with the workflow execution. You can use this to associate a custom identifier with the workflow execution. You may specify the same identifier if a workflow execution is logically a restart of a previous execution. You cannot have two open workflow executions with the same workflowId at the same time.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
:type workflowType: dict
:param workflowType: [REQUIRED]
The type of the workflow to start.
name (string) -- [REQUIRED]Required. The name of the workflow type.
Note
The combination of workflow type name and version must be unique with in a domain.
version (string) -- [REQUIRED]Required. The version of the workflow type.
Note
The combination of workflow type name and version must be unique with in a domain.
:type taskList: dict
:param taskList: The task list to use for the decision tasks generated for this workflow execution. This overrides the defaultTaskList specified when registering the workflow type.
Note
A task list for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task list was specified at registration time then a fault will be returned.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
name (string) -- [REQUIRED]The name of the task list.
:type taskPriority: string
:param taskPriority: The task priority to use for this workflow execution. This will override any default priority that was assigned when the workflow type was registered. If not set, then the default task priority for the workflow type will be used. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority.
For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer Guide .
:type input: string
:param input: The input for the workflow execution. This is a free form string which should be meaningful to the workflow you are starting. This input is made available to the new workflow execution in the WorkflowExecutionStarted history event.
:type executionStartToCloseTimeout: string
:param executionStartToCloseTimeout: The total duration for this workflow execution. This overrides the defaultExecutionStartToCloseTimeout specified when registering the workflow type.
The duration is specified in seconds; an integer greater than or equal to 0. Exceeding this limit will cause the workflow execution to time out. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of 'NONE' for this timeout; there is a one-year max limit on the time that a workflow execution can run.
Note
An execution start-to-close timeout must be specified either through this parameter or as a default when the workflow type is registered. If neither this parameter nor a default execution start-to-close timeout is specified, a fault is returned.
:type tagList: list
:param tagList: The list of tags to associate with the workflow execution. You can specify a maximum of 5 tags. You can list workflow executions with a specific tag by calling ListOpenWorkflowExecutions or ListClosedWorkflowExecutions and specifying a TagFilter .
(string) --
:type taskStartToCloseTimeout: string
:param taskStartToCloseTimeout: Specifies the maximum duration of decision tasks for this workflow execution. This parameter overrides the defaultTaskStartToCloseTimout specified when registering the workflow type using RegisterWorkflowType .
The duration is specified in seconds; an integer greater than or equal to 0. The value 'NONE' can be used to specify unlimited duration.
Note
A task start-to-close timeout for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task start-to-close timeout was specified at registration time then a fault will be returned.
:type childPolicy: string
:param childPolicy: If set, specifies the policy to use for the child workflow executions of this workflow execution if it is terminated, by calling the TerminateWorkflowExecution action explicitly or due to an expired timeout. This policy overrides the default child policy specified when registering the workflow type using RegisterWorkflowType .
The supported child policies are:
TERMINATE: the child executions will be terminated.
REQUEST_CANCEL: a request to cancel will be attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.
ABANDON: no action will be taken. The child executions will continue to run.
Note
A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time then a fault will be returned.
:type lambdaRole: string
:param lambdaRole: The ARN of an IAM role that authorizes Amazon SWF to invoke AWS Lambda functions.
Note
In order for this workflow execution to invoke AWS Lambda functions, an appropriate IAM role must be specified either as a default for the workflow type or through this field.
:rtype: dict
:return: {
'runId': 'string'
}
:returns:
domain (string) -- [REQUIRED]
The name of the domain in which the workflow execution is created.
workflowId (string) -- [REQUIRED]
The user defined identifier associated with the workflow execution. You can use this to associate a custom identifier with the workflow execution. You may specify the same identifier if a workflow execution is logically a restart of a previous execution. You cannot have two open workflow executions with the same workflowId at the same time.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
workflowType (dict) -- [REQUIRED]
The type of the workflow to start.
name (string) -- [REQUIRED]Required. The name of the workflow type.
Note
The combination of workflow type name and version must be unique with in a domain.
version (string) -- [REQUIRED]Required. The version of the workflow type.
Note
The combination of workflow type name and version must be unique with in a domain.
taskList (dict) -- The task list to use for the decision tasks generated for this workflow execution. This overrides the defaultTaskList specified when registering the workflow type.
Note
A task list for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task list was specified at registration time then a fault will be returned.
The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (u0000-u001f | u007f - u009f). Also, it must not contain the literal string quotarnquot.
name (string) -- [REQUIRED]The name of the task list.
taskPriority (string) -- The task priority to use for this workflow execution. This will override any default priority that was assigned when the workflow type was registered. If not set, then the default task priority for the workflow type will be used. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority.
For more information about setting task priority, see Setting Task Priority in the Amazon Simple Workflow Developer Guide .
input (string) -- The input for the workflow execution. This is a free form string which should be meaningful to the workflow you are starting. This input is made available to the new workflow execution in the WorkflowExecutionStarted history event.
executionStartToCloseTimeout (string) -- The total duration for this workflow execution. This overrides the defaultExecutionStartToCloseTimeout specified when registering the workflow type.
The duration is specified in seconds; an integer greater than or equal to 0. Exceeding this limit will cause the workflow execution to time out. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of "NONE" for this timeout; there is a one-year max limit on the time that a workflow execution can run.
Note
An execution start-to-close timeout must be specified either through this parameter or as a default when the workflow type is registered. If neither this parameter nor a default execution start-to-close timeout is specified, a fault is returned.
tagList (list) -- The list of tags to associate with the workflow execution. You can specify a maximum of 5 tags. You can list workflow executions with a specific tag by calling ListOpenWorkflowExecutions or ListClosedWorkflowExecutions and specifying a TagFilter .
(string) --
taskStartToCloseTimeout (string) -- Specifies the maximum duration of decision tasks for this workflow execution. This parameter overrides the defaultTaskStartToCloseTimout specified when registering the workflow type using RegisterWorkflowType .
The duration is specified in seconds; an integer greater than or equal to 0. The value "NONE" can be used to specify unlimited duration.
Note
A task start-to-close timeout for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task start-to-close timeout was specified at registration time then a fault will be returned.
childPolicy (string) -- If set, specifies the policy to use for the child workflow executions of this workflow execution if it is terminated, by calling the TerminateWorkflowExecution action explicitly or due to an expired timeout. This policy overrides the default child policy specified when registering the workflow type using RegisterWorkflowType .
The supported child policies are:
TERMINATE: the child executions will be terminated.
REQUEST_CANCEL: a request to cancel will be attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.
ABANDON: no action will be taken. The child executions will continue to run.
Note
A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time then a fault will be returned.
lambdaRole (string) -- The ARN of an IAM role that authorizes Amazon SWF to invoke AWS Lambda functions.
Note
In order for this workflow execution to invoke AWS Lambda functions, an appropriate IAM role must be specified either as a default for the workflow type or through this field. | entailment |
def create_db_cluster(AvailabilityZones=None, BackupRetentionPeriod=None, CharacterSetName=None, DatabaseName=None, DBClusterIdentifier=None, DBClusterParameterGroupName=None, VpcSecurityGroupIds=None, DBSubnetGroupName=None, Engine=None, EngineVersion=None, Port=None, MasterUsername=None, MasterUserPassword=None, OptionGroupName=None, PreferredBackupWindow=None, PreferredMaintenanceWindow=None, ReplicationSourceIdentifier=None, Tags=None, StorageEncrypted=None, KmsKeyId=None, PreSignedUrl=None, EnableIAMDatabaseAuthentication=None, SourceRegion=None):
"""
Creates a new Amazon Aurora DB cluster.
You can use the ReplicationSourceIdentifier parameter to create the DB cluster as a Read Replica of another DB cluster or Amazon RDS MySQL DB instance. For cross-region replication where the DB cluster identified by ReplicationSourceIdentifier is encrypted, you must also specify the PreSignedUrl parameter.
For more information on Amazon Aurora, see Aurora on Amazon RDS in the Amazon RDS User Guide.
See also: AWS API Documentation
Examples
This example creates a DB cluster.
Expected Output:
:example: response = client.create_db_cluster(
AvailabilityZones=[
'string',
],
BackupRetentionPeriod=123,
CharacterSetName='string',
DatabaseName='string',
DBClusterIdentifier='string',
DBClusterParameterGroupName='string',
VpcSecurityGroupIds=[
'string',
],
DBSubnetGroupName='string',
Engine='string',
EngineVersion='string',
Port=123,
MasterUsername='string',
MasterUserPassword='string',
OptionGroupName='string',
PreferredBackupWindow='string',
PreferredMaintenanceWindow='string',
ReplicationSourceIdentifier='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
StorageEncrypted=True|False,
KmsKeyId='string',
EnableIAMDatabaseAuthentication=True|False,
SourceRegion='string'
)
:type AvailabilityZones: list
:param AvailabilityZones: A list of EC2 Availability Zones that instances in the DB cluster can be created in. For information on regions and Availability Zones, see Regions and Availability Zones .
(string) --
:type BackupRetentionPeriod: integer
:param BackupRetentionPeriod: The number of days for which automated backups are retained. You must specify a minimum value of 1.
Default: 1
Constraints:
Must be a value from 1 to 35
:type CharacterSetName: string
:param CharacterSetName: A value that indicates that the DB cluster should be associated with the specified CharacterSet.
:type DatabaseName: string
:param DatabaseName: The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon RDS will not create a database in the DB cluster you are creating.
:type DBClusterIdentifier: string
:param DBClusterIdentifier: [REQUIRED]
The DB cluster identifier. This parameter is stored as a lowercase string.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Example: my-cluster1
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName: The name of the DB cluster parameter group to associate with this DB cluster. If this argument is omitted, default.aurora5.6 will be used.
Constraints:
Must be 1 to 255 alphanumeric characters
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of EC2 VPC security groups to associate with this DB cluster.
(string) --
:type DBSubnetGroupName: string
:param DBSubnetGroupName: A DB subnet group to associate with this DB cluster.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.
Example: mySubnetgroup
:type Engine: string
:param Engine: [REQUIRED]
The name of the database engine to be used for this DB cluster.
Valid Values: aurora
:type EngineVersion: string
:param EngineVersion: The version number of the database engine to use.
Aurora
Example: 5.6.10a
:type Port: integer
:param Port: The port number on which the instances in the DB cluster accept connections.
Default: 3306
:type MasterUsername: string
:param MasterUsername: The name of the master user for the DB cluster.
Constraints:
Must be 1 to 16 alphanumeric characters.
First character must be a letter.
Cannot be a reserved word for the chosen database engine.
:type MasterUserPassword: string
:param MasterUserPassword: The password for the master database user. This password can contain any printable ASCII character except '/', ''', or '@'.
Constraints: Must contain from 8 to 41 characters.
:type OptionGroupName: string
:param OptionGroupName: A value that indicates that the DB cluster should be associated with the specified option group.
Permanent options cannot be removed from an option group. The option group cannot be removed from a DB cluster once it is associated with a DB cluster.
:type PreferredBackupWindow: string
:param PreferredBackupWindow: The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.
Default: A 30-minute window selected at random from an 8-hour block of time per region. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Constraints:
Must be in the format hh24:mi-hh24:mi .
Times should be in Universal Coordinated Time (UTC).
Must not conflict with the preferred maintenance window.
Must be at least 30 minutes.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
Format: ddd:hh24:mi-ddd:hh24:mi
Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
:type ReplicationSourceIdentifier: string
:param ReplicationSourceIdentifier: The Amazon Resource Name (ARN) of the source DB instance or DB cluster if this DB cluster is created as a Read Replica.
:type Tags: list
:param Tags: A list of tags.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type StorageEncrypted: boolean
:param StorageEncrypted: Specifies whether the DB cluster is encrypted.
:type KmsKeyId: string
:param KmsKeyId: The KMS key identifier for an encrypted DB cluster.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key.
If the StorageEncrypted parameter is true, and you do not specify a value for the KmsKeyId parameter, then Amazon RDS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region.
If you create a Read Replica of an encrypted DB cluster in another region, you must set KmsKeyId to a KMS key ID that is valid in the destination region. This key is used to encrypt the Read Replica in that region.
:type PreSignedUrl: string
:param PreSignedUrl: A URL that contains a Signature Version 4 signed request for the CreateDBCluster action to be called in the source region where the DB cluster will be replicated from. You only need to specify PreSignedUrl when you are performing cross-region replication from an encrypted DB cluster.
The pre-signed URL must be a valid request for the CreateDBCluster API action that can be executed in the source region that contains the encrypted DB cluster to be copied.
The pre-signed URL request must contain the following parameter values:
KmsKeyId - The KMS key identifier for the key to use to encrypt the copy of the DB cluster in the destination region. This should refer to the same KMS key for both the CreateDBCluster action that is called in the destination region, and the action contained in the pre-signed URL.
DestinationRegion - The name of the region that Aurora Read Replica will be created in.
ReplicationSourceIdentifier - The DB cluster identifier for the encrypted DB cluster to be copied. This identifier must be in the Amazon Resource Name (ARN) format for the source region. For example, if you are copying an encrypted DB cluster from the us-west-2 region, then your ReplicationSourceIdentifier would look like Example: arn:aws:rds:us-west-2:123456789012:cluster:aurora-cluster1 .
To learn how to generate a Signature Version 4 signed request, see Authenticating Requests: Using Query Parameters (AWS Signature Version 4) and Signature Version 4 Signing Process .
Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: A Boolean value that is true to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.
Default: false
:type SourceRegion: string
:param SourceRegion: The ID of the region that contains the source for the db cluster.
:rtype: dict
:return: {
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
:returns:
CreateDBCluster
DeleteDBCluster
FailoverDBCluster
ModifyDBCluster
RestoreDBClusterFromSnapshot
RestoreDBClusterToPointInTime
"""
pass | Creates a new Amazon Aurora DB cluster.
You can use the ReplicationSourceIdentifier parameter to create the DB cluster as a Read Replica of another DB cluster or Amazon RDS MySQL DB instance. For cross-region replication where the DB cluster identified by ReplicationSourceIdentifier is encrypted, you must also specify the PreSignedUrl parameter.
For more information on Amazon Aurora, see Aurora on Amazon RDS in the Amazon RDS User Guide.
See also: AWS API Documentation
Examples
This example creates a DB cluster.
Expected Output:
:example: response = client.create_db_cluster(
AvailabilityZones=[
'string',
],
BackupRetentionPeriod=123,
CharacterSetName='string',
DatabaseName='string',
DBClusterIdentifier='string',
DBClusterParameterGroupName='string',
VpcSecurityGroupIds=[
'string',
],
DBSubnetGroupName='string',
Engine='string',
EngineVersion='string',
Port=123,
MasterUsername='string',
MasterUserPassword='string',
OptionGroupName='string',
PreferredBackupWindow='string',
PreferredMaintenanceWindow='string',
ReplicationSourceIdentifier='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
StorageEncrypted=True|False,
KmsKeyId='string',
EnableIAMDatabaseAuthentication=True|False,
SourceRegion='string'
)
:type AvailabilityZones: list
:param AvailabilityZones: A list of EC2 Availability Zones that instances in the DB cluster can be created in. For information on regions and Availability Zones, see Regions and Availability Zones .
(string) --
:type BackupRetentionPeriod: integer
:param BackupRetentionPeriod: The number of days for which automated backups are retained. You must specify a minimum value of 1.
Default: 1
Constraints:
Must be a value from 1 to 35
:type CharacterSetName: string
:param CharacterSetName: A value that indicates that the DB cluster should be associated with the specified CharacterSet.
:type DatabaseName: string
:param DatabaseName: The name for your database of up to 64 alpha-numeric characters. If you do not provide a name, Amazon RDS will not create a database in the DB cluster you are creating.
:type DBClusterIdentifier: string
:param DBClusterIdentifier: [REQUIRED]
The DB cluster identifier. This parameter is stored as a lowercase string.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Example: my-cluster1
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName: The name of the DB cluster parameter group to associate with this DB cluster. If this argument is omitted, default.aurora5.6 will be used.
Constraints:
Must be 1 to 255 alphanumeric characters
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of EC2 VPC security groups to associate with this DB cluster.
(string) --
:type DBSubnetGroupName: string
:param DBSubnetGroupName: A DB subnet group to associate with this DB cluster.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.
Example: mySubnetgroup
:type Engine: string
:param Engine: [REQUIRED]
The name of the database engine to be used for this DB cluster.
Valid Values: aurora
:type EngineVersion: string
:param EngineVersion: The version number of the database engine to use.
Aurora
Example: 5.6.10a
:type Port: integer
:param Port: The port number on which the instances in the DB cluster accept connections.
Default: 3306
:type MasterUsername: string
:param MasterUsername: The name of the master user for the DB cluster.
Constraints:
Must be 1 to 16 alphanumeric characters.
First character must be a letter.
Cannot be a reserved word for the chosen database engine.
:type MasterUserPassword: string
:param MasterUserPassword: The password for the master database user. This password can contain any printable ASCII character except '/', ''', or '@'.
Constraints: Must contain from 8 to 41 characters.
:type OptionGroupName: string
:param OptionGroupName: A value that indicates that the DB cluster should be associated with the specified option group.
Permanent options cannot be removed from an option group. The option group cannot be removed from a DB cluster once it is associated with a DB cluster.
:type PreferredBackupWindow: string
:param PreferredBackupWindow: The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.
Default: A 30-minute window selected at random from an 8-hour block of time per region. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Constraints:
Must be in the format hh24:mi-hh24:mi .
Times should be in Universal Coordinated Time (UTC).
Must not conflict with the preferred maintenance window.
Must be at least 30 minutes.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
Format: ddd:hh24:mi-ddd:hh24:mi
Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
:type ReplicationSourceIdentifier: string
:param ReplicationSourceIdentifier: The Amazon Resource Name (ARN) of the source DB instance or DB cluster if this DB cluster is created as a Read Replica.
:type Tags: list
:param Tags: A list of tags.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type StorageEncrypted: boolean
:param StorageEncrypted: Specifies whether the DB cluster is encrypted.
:type KmsKeyId: string
:param KmsKeyId: The KMS key identifier for an encrypted DB cluster.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key.
If the StorageEncrypted parameter is true, and you do not specify a value for the KmsKeyId parameter, then Amazon RDS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region.
If you create a Read Replica of an encrypted DB cluster in another region, you must set KmsKeyId to a KMS key ID that is valid in the destination region. This key is used to encrypt the Read Replica in that region.
:type PreSignedUrl: string
:param PreSignedUrl: A URL that contains a Signature Version 4 signed request for the CreateDBCluster action to be called in the source region where the DB cluster will be replicated from. You only need to specify PreSignedUrl when you are performing cross-region replication from an encrypted DB cluster.
The pre-signed URL must be a valid request for the CreateDBCluster API action that can be executed in the source region that contains the encrypted DB cluster to be copied.
The pre-signed URL request must contain the following parameter values:
KmsKeyId - The KMS key identifier for the key to use to encrypt the copy of the DB cluster in the destination region. This should refer to the same KMS key for both the CreateDBCluster action that is called in the destination region, and the action contained in the pre-signed URL.
DestinationRegion - The name of the region that Aurora Read Replica will be created in.
ReplicationSourceIdentifier - The DB cluster identifier for the encrypted DB cluster to be copied. This identifier must be in the Amazon Resource Name (ARN) format for the source region. For example, if you are copying an encrypted DB cluster from the us-west-2 region, then your ReplicationSourceIdentifier would look like Example: arn:aws:rds:us-west-2:123456789012:cluster:aurora-cluster1 .
To learn how to generate a Signature Version 4 signed request, see Authenticating Requests: Using Query Parameters (AWS Signature Version 4) and Signature Version 4 Signing Process .
Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: A Boolean value that is true to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.
Default: false
:type SourceRegion: string
:param SourceRegion: The ID of the region that contains the source for the db cluster.
:rtype: dict
:return: {
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
:returns:
CreateDBCluster
DeleteDBCluster
FailoverDBCluster
ModifyDBCluster
RestoreDBClusterFromSnapshot
RestoreDBClusterToPointInTime | entailment |
def create_db_instance(DBName=None, DBInstanceIdentifier=None, AllocatedStorage=None, DBInstanceClass=None, Engine=None, MasterUsername=None, MasterUserPassword=None, DBSecurityGroups=None, VpcSecurityGroupIds=None, AvailabilityZone=None, DBSubnetGroupName=None, PreferredMaintenanceWindow=None, DBParameterGroupName=None, BackupRetentionPeriod=None, PreferredBackupWindow=None, Port=None, MultiAZ=None, EngineVersion=None, AutoMinorVersionUpgrade=None, LicenseModel=None, Iops=None, OptionGroupName=None, CharacterSetName=None, PubliclyAccessible=None, Tags=None, DBClusterIdentifier=None, StorageType=None, TdeCredentialArn=None, TdeCredentialPassword=None, StorageEncrypted=None, KmsKeyId=None, Domain=None, CopyTagsToSnapshot=None, MonitoringInterval=None, MonitoringRoleArn=None, DomainIAMRoleName=None, PromotionTier=None, Timezone=None, EnableIAMDatabaseAuthentication=None):
"""
Creates a new DB instance.
See also: AWS API Documentation
Examples
This example creates a DB instance.
Expected Output:
:example: response = client.create_db_instance(
DBName='string',
DBInstanceIdentifier='string',
AllocatedStorage=123,
DBInstanceClass='string',
Engine='string',
MasterUsername='string',
MasterUserPassword='string',
DBSecurityGroups=[
'string',
],
VpcSecurityGroupIds=[
'string',
],
AvailabilityZone='string',
DBSubnetGroupName='string',
PreferredMaintenanceWindow='string',
DBParameterGroupName='string',
BackupRetentionPeriod=123,
PreferredBackupWindow='string',
Port=123,
MultiAZ=True|False,
EngineVersion='string',
AutoMinorVersionUpgrade=True|False,
LicenseModel='string',
Iops=123,
OptionGroupName='string',
CharacterSetName='string',
PubliclyAccessible=True|False,
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
DBClusterIdentifier='string',
StorageType='string',
TdeCredentialArn='string',
TdeCredentialPassword='string',
StorageEncrypted=True|False,
KmsKeyId='string',
Domain='string',
CopyTagsToSnapshot=True|False,
MonitoringInterval=123,
MonitoringRoleArn='string',
DomainIAMRoleName='string',
PromotionTier=123,
Timezone='string',
EnableIAMDatabaseAuthentication=True|False
)
:type DBName: string
:param DBName: The meaning of this parameter differs according to the database engine you use.
Type: String
MySQL
The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.
Constraints:
Must contain 1 to 64 alphanumeric characters
Cannot be a word reserved by the specified database engine
MariaDB
The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.
Constraints:
Must contain 1 to 64 alphanumeric characters
Cannot be a word reserved by the specified database engine
PostgreSQL
The name of the database to create when the DB instance is created. If this parameter is not specified, the default 'postgres' database is created in the DB instance.
Constraints:
Must contain 1 to 63 alphanumeric characters
Must begin with a letter or an underscore. Subsequent characters can be letters, underscores, or digits (0-9).
Cannot be a word reserved by the specified database engine
Oracle
The Oracle System ID (SID) of the created DB instance. If you specify null , the default value ORCL is used. You can't specify the string NULL, or any other reserved word, for DBName .
Default: ORCL
Constraints:
Cannot be longer than 8 characters
SQL Server
Not applicable. Must be null.
Amazon Aurora
The name of the database to create when the primary instance of the DB cluster is created. If this parameter is not specified, no database is created in the DB instance.
Constraints:
Must contain 1 to 64 alphanumeric characters
Cannot be a word reserved by the specified database engine
:type DBInstanceIdentifier: string
:param DBInstanceIdentifier: [REQUIRED]
The DB instance identifier. This parameter is stored as a lowercase string.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens (1 to 15 for SQL Server).
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Example: mydbinstance
:type AllocatedStorage: integer
:param AllocatedStorage: The amount of storage (in gigabytes) to be initially allocated for the database instance.
Type: Integer
Amazon Aurora
Not applicable. Aurora cluster volumes automatically grow as the amount of data in your database increases, though you are only charged for the space that you use in an Aurora cluster volume.
MySQL
Constraints: Must be an integer from 5 to 6144.
MariaDB
Constraints: Must be an integer from 5 to 6144.
PostgreSQL
Constraints: Must be an integer from 5 to 6144.
Oracle
Constraints: Must be an integer from 10 to 6144.
SQL Server
Constraints: Must be an integer from 200 to 4096 (Standard Edition and Enterprise Edition) or from 20 to 4096 (Express Edition and Web Edition)
:type DBInstanceClass: string
:param DBInstanceClass: [REQUIRED]
The compute and memory capacity of the DB instance. Note that not all instance classes are available in all regions for all DB engines.
Valid Values: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.xlarge |db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large | db.m3.xlarge | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium | db.t2.large
:type Engine: string
:param Engine: [REQUIRED]
The name of the database engine to be used for this instance.
Valid Values: mysql | mariadb | oracle-se1 | oracle-se2 | oracle-se | oracle-ee | sqlserver-ee | sqlserver-se | sqlserver-ex | sqlserver-web | postgres | aurora
Not every database engine is available for every AWS region.
:type MasterUsername: string
:param MasterUsername: The name for the master database user.
Amazon Aurora
Not applicable. You specify the name for the master database user when you create your DB cluster.
MariaDB
Constraints:
Must be 1 to 16 alphanumeric characters.
Cannot be a reserved word for the chosen database engine.
Microsoft SQL Server
Constraints:
Must be 1 to 128 alphanumeric characters.
First character must be a letter.
Cannot be a reserved word for the chosen database engine.
MySQL
Constraints:
Must be 1 to 16 alphanumeric characters.
First character must be a letter.
Cannot be a reserved word for the chosen database engine.
Oracle
Constraints:
Must be 1 to 30 alphanumeric characters.
First character must be a letter.
Cannot be a reserved word for the chosen database engine.
PostgreSQL
Constraints:
Must be 1 to 63 alphanumeric characters.
First character must be a letter.
Cannot be a reserved word for the chosen database engine.
:type MasterUserPassword: string
:param MasterUserPassword: The password for the master database user. Can be any printable ASCII character except '/', ''', or '@'.
Amazon Aurora
Not applicable. You specify the password for the master database user when you create your DB cluster.
MariaDB
Constraints: Must contain from 8 to 41 characters.
Microsoft SQL Server
Constraints: Must contain from 8 to 128 characters.
MySQL
Constraints: Must contain from 8 to 41 characters.
Oracle
Constraints: Must contain from 8 to 30 characters.
PostgreSQL
Constraints: Must contain from 8 to 128 characters.
:type DBSecurityGroups: list
:param DBSecurityGroups: A list of DB security groups to associate with this DB instance.
Default: The default DB security group for the database engine.
(string) --
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of EC2 VPC security groups to associate with this DB instance.
Default: The default EC2 VPC security group for the DB subnet group's VPC.
(string) --
:type AvailabilityZone: string
:param AvailabilityZone: The EC2 Availability Zone that the database instance will be created in. For information on regions and Availability Zones, see Regions and Availability Zones .
Default: A random, system-chosen Availability Zone in the endpoint's region.
Example: us-east-1d
Constraint: The AvailabilityZone parameter cannot be specified if the MultiAZ parameter is set to true . The specified Availability Zone must be in the same region as the current endpoint.
:type DBSubnetGroupName: string
:param DBSubnetGroupName: A DB subnet group to associate with this DB instance.
If there is no DB subnet group, then it is a non-VPC DB instance.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). For more information, see DB Instance Maintenance .
Format: ddd:hh24:mi-ddd:hh24:mi
Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
:type DBParameterGroupName: string
:param DBParameterGroupName: The name of the DB parameter group to associate with this DB instance. If this argument is omitted, the default DBParameterGroup for the specified engine will be used.
Constraints:
Must be 1 to 255 alphanumeric characters
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type BackupRetentionPeriod: integer
:param BackupRetentionPeriod: The number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups.
Default: 1
Constraints:
Must be a value from 0 to 35
Cannot be set to 0 if the DB instance is a source to Read Replicas
:type PreferredBackupWindow: string
:param PreferredBackupWindow: The daily time range during which automated backups are created if automated backups are enabled, using the BackupRetentionPeriod parameter. For more information, see DB Instance Backups .
Default: A 30-minute window selected at random from an 8-hour block of time per region. To see the time blocks available, see Adjusting the Preferred DB Instance Maintenance Window .
Constraints:
Must be in the format hh24:mi-hh24:mi .
Times should be in Universal Coordinated Time (UTC).
Must not conflict with the preferred maintenance window.
Must be at least 30 minutes.
:type Port: integer
:param Port: The port number on which the database accepts connections.
MySQL
Default: 3306
Valid Values: 1150-65535
Type: Integer
MariaDB
Default: 3306
Valid Values: 1150-65535
Type: Integer
PostgreSQL
Default: 5432
Valid Values: 1150-65535
Type: Integer
Oracle
Default: 1521
Valid Values: 1150-65535
SQL Server
Default: 1433
Valid Values: 1150-65535 except for 1434 , 3389 , 47001 , 49152 , and 49152 through 49156 .
Amazon Aurora
Default: 3306
Valid Values: 1150-65535
Type: Integer
:type MultiAZ: boolean
:param MultiAZ: Specifies if the DB instance is a Multi-AZ deployment. You cannot set the AvailabilityZone parameter if the MultiAZ parameter is set to true.
:type EngineVersion: string
:param EngineVersion: The version number of the database engine to use.
The following are the database engines and major and minor versions that are available with Amazon RDS. Not every database engine is available for every AWS region.
Amazon Aurora
Version 5.6 (available in these AWS regions: ap-northeast-1, ap-northeast-2, ap-south-1, ap-southeast-2, eu-west-1, us-east-1, us-east-2, us-west-2): 5.6.10a
MariaDB
Version 10.1 (available in these AWS regions: us-east-2): 10.1.16
Version 10.1 (available in these AWS regions: ap-northeast-1, ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1, us-east-1, us-west-1, us-west-2): 10.1.14
Version 10.0 (available in all AWS regions): 10.0.24
Version 10.0 (available in these AWS regions: ap-northeast-1, ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1, us-east-1, us-gov-west-1, us-west-1, us-west-2): 10.0.17
Microsoft SQL Server 2016
13.00.2164.0.v1 (supported for all editions, and all AWS regions except sa-east-1)
Microsoft SQL Server 2014
12.00.5000.0.v1 (supported for all editions, and all AWS regions)
12.00.4422.0.v1 (supported for all editions except Enterprise Edition, and all AWS regions except us-east-2)
Microsoft SQL Server 2012
11.00.6020.0.v1 (supported for all editions, and all AWS regions)
11.00.5058.0.v1 (supported for all editions, and all AWS regions except us-east-2)
11.00.2100.60.v1 (supported for all editions, and all AWS regions except us-east-2)
Microsoft SQL Server 2008 R2
10.50.6529.0.v1 (supported for all editions, and all AWS regions except us-east-2)
10.50.6000.34.v1 (supported for all editions, and all AWS regions except us-east-2)
10.50.2789.0.v1 (supported for all editions, and all AWS regions except us-east-2)
MySQL
Version 5.7 (available in all AWS regions): 5.7.11
Version 5.7 (available in these AWS regions: ap-northeast-1, ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1, us-east-1, us-gov-west-1, us-west-1, us-west-2): 5.7.10
Version 5.6 (available in all AWS regions): 5.6.29
Version 5.6 (available in these AWS regions: ap-northeast-1, ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1, us-east-1, us-gov-west-1, us-west-1, us-west-2): 5.6.27
Version 5.6 (available in these AWS regions: ap-northeast-1, ap-northeast-2, ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1, us-east-1, us-gov-west-1, us-west-1, us-west-2): 5.6.23
Version 5.6 (available in these AWS regions: ap-northeast-1, ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1, us-east-1, us-gov-west-1, us-west-1, us-west-2): 5.6.19a | 5.6.19b | 5.6.21 | 5.6.21b | 5.6.22
Version 5.5 (available in all AWS regions): 5.5.46
Version 5.1 (only available in AWS regions ap-northeast-1, ap-southeast-1, ap-southeast-2, eu-west-1, sa-east-1, us-east-1, us-gov-west-1, us-west-1, us-west-2): 5.1.73a | 5.1.73b
Oracle 12c
12.1.0.2.v8 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
12.1.0.2.v7 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
12.1.0.2.v6 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
12.1.0.2.v5 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
12.1.0.2.v4 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
12.1.0.2.v3 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
12.1.0.2.v2 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
12.1.0.2.v1 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
Oracle 11g
11.2.0.4.v12 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v11 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v10 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v9 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v8 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v7 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v6 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v5 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v4 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v3 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v1 (supported for EE, SE1, and SE, in all AWS regions)
PostgreSQL
Version 9.6.x: 9.6.1 | 9.6.2
Version 9.5.x: 9.5.6 | 9.5.4 | 9.5.2
Version 9.4.x: 9.4.11 | 9.4.9 | 9.4.7
Version 9.3.x: 9.3.16 | 9.3.14 | 9.3.12
:type AutoMinorVersionUpgrade: boolean
:param AutoMinorVersionUpgrade: Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window.
Default: true
:type LicenseModel: string
:param LicenseModel: License model information for this DB instance.
Valid values: license-included | bring-your-own-license | general-public-license
:type Iops: integer
:param Iops: The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance.
Constraints: Must be a multiple between 3 and 10 of the storage amount for the DB instance. Must also be an integer multiple of 1000. For example, if the size of your DB instance is 500 GB, then your Iops value can be 2000, 3000, 4000, or 5000.
:type OptionGroupName: string
:param OptionGroupName: Indicates that the DB instance should be associated with the specified option group.
Permanent options, such as the TDE option for Oracle Advanced Security TDE, cannot be removed from an option group, and that option group cannot be removed from a DB instance once it is associated with a DB instance
:type CharacterSetName: string
:param CharacterSetName: For supported engines, indicates that the DB instance should be associated with the specified CharacterSet.
:type PubliclyAccessible: boolean
:param PubliclyAccessible: Specifies the accessibility options for the DB instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.
Default: The default behavior varies depending on whether a VPC has been requested or not. The following list shows the default behavior in each case.
Default VPC: true
VPC: false
If no DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be private.
:type Tags: list
:param Tags: A list of tags.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type DBClusterIdentifier: string
:param DBClusterIdentifier: The identifier of the DB cluster that the instance will belong to.
For information on creating a DB cluster, see CreateDBCluster .
Type: String
:type StorageType: string
:param StorageType: Specifies the storage type to be associated with the DB instance.
Valid values: standard | gp2 | io1
If you specify io1 , you must also include a value for the Iops parameter.
Default: io1 if the Iops parameter is specified; otherwise standard
:type TdeCredentialArn: string
:param TdeCredentialArn: The ARN from the Key Store with which to associate the instance for TDE encryption.
:type TdeCredentialPassword: string
:param TdeCredentialPassword: The password for the given ARN from the Key Store in order to access the device.
:type StorageEncrypted: boolean
:param StorageEncrypted: Specifies whether the DB instance is encrypted.
Default: false
:type KmsKeyId: string
:param KmsKeyId: The KMS key identifier for an encrypted DB instance.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB instance with the same AWS account that owns the KMS encryption key used to encrypt the new DB instance, then you can use the KMS key alias instead of the ARN for the KM encryption key.
If the StorageEncrypted parameter is true, and you do not specify a value for the KmsKeyId parameter, then Amazon RDS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region.
:type Domain: string
:param Domain: Specify the Active Directory Domain to create the instance in.
:type CopyTagsToSnapshot: boolean
:param CopyTagsToSnapshot: True to copy all tags from the DB instance to snapshots of the DB instance; otherwise false. The default is false.
:type MonitoringInterval: integer
:param MonitoringInterval: The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0.
If MonitoringRoleArn is specified, then you must also set MonitoringInterval to a value other than 0.
Valid Values: 0, 1, 5, 10, 15, 30, 60
:type MonitoringRoleArn: string
:param MonitoringRoleArn: The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess . For information on creating a monitoring role, go to Setting Up and Enabling Enhanced Monitoring .
If MonitoringInterval is set to a value other than 0, then you must supply a MonitoringRoleArn value.
:type DomainIAMRoleName: string
:param DomainIAMRoleName: Specify the name of the IAM role to be used when making API calls to the Directory Service.
:type PromotionTier: integer
:param PromotionTier: A value that specifies the order in which an Aurora Replica is promoted to the primary instance after a failure of the existing primary instance. For more information, see Fault Tolerance for an Aurora DB Cluster .
Default: 1
Valid Values: 0 - 15
:type Timezone: string
:param Timezone: The time zone of the DB instance. The time zone parameter is currently supported only by Microsoft SQL Server .
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts; otherwise false.
You can enable IAM database authentication for the following database engines
For MySQL 5.6, minor version 5.6.34 or higher
For MySQL 5.7, minor version 5.7.16 or higher
Default: false
:rtype: dict
:return: {
'DBInstance': {
'DBInstanceIdentifier': 'string',
'DBInstanceClass': 'string',
'Engine': 'string',
'DBInstanceStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123,
'HostedZoneId': 'string'
},
'AllocatedStorage': 123,
'InstanceCreateTime': datetime(2015, 1, 1),
'PreferredBackupWindow': 'string',
'BackupRetentionPeriod': 123,
'DBSecurityGroups': [
{
'DBSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'ParameterApplyStatus': 'string'
},
],
'AvailabilityZone': 'string',
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'DBInstanceClass': 'string',
'AllocatedStorage': 123,
'MasterUserPassword': 'string',
'Port': 123,
'BackupRetentionPeriod': 123,
'MultiAZ': True|False,
'EngineVersion': 'string',
'LicenseModel': 'string',
'Iops': 123,
'DBInstanceIdentifier': 'string',
'StorageType': 'string',
'CACertificateIdentifier': 'string',
'DBSubnetGroupName': 'string'
},
'LatestRestorableTime': datetime(2015, 1, 1),
'MultiAZ': True|False,
'EngineVersion': 'string',
'AutoMinorVersionUpgrade': True|False,
'ReadReplicaSourceDBInstanceIdentifier': 'string',
'ReadReplicaDBInstanceIdentifiers': [
'string',
],
'ReadReplicaDBClusterIdentifiers': [
'string',
],
'LicenseModel': 'string',
'Iops': 123,
'OptionGroupMemberships': [
{
'OptionGroupName': 'string',
'Status': 'string'
},
],
'CharacterSetName': 'string',
'SecondaryAvailabilityZone': 'string',
'PubliclyAccessible': True|False,
'StatusInfos': [
{
'StatusType': 'string',
'Normal': True|False,
'Status': 'string',
'Message': 'string'
},
],
'StorageType': 'string',
'TdeCredentialArn': 'string',
'DbInstancePort': 123,
'DBClusterIdentifier': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbiResourceId': 'string',
'CACertificateIdentifier': 'string',
'DomainMemberships': [
{
'Domain': 'string',
'Status': 'string',
'FQDN': 'string',
'IAMRoleName': 'string'
},
],
'CopyTagsToSnapshot': True|False,
'MonitoringInterval': 123,
'EnhancedMonitoringResourceArn': 'string',
'MonitoringRoleArn': 'string',
'PromotionTier': 123,
'DBInstanceArn': 'string',
'Timezone': 'string',
'IAMDatabaseAuthenticationEnabled': True|False
}
}
:returns:
CreateDBInstance
DeleteDBInstance
ModifyDBInstance
"""
pass | Creates a new DB instance.
See also: AWS API Documentation
Examples
This example creates a DB instance.
Expected Output:
:example: response = client.create_db_instance(
DBName='string',
DBInstanceIdentifier='string',
AllocatedStorage=123,
DBInstanceClass='string',
Engine='string',
MasterUsername='string',
MasterUserPassword='string',
DBSecurityGroups=[
'string',
],
VpcSecurityGroupIds=[
'string',
],
AvailabilityZone='string',
DBSubnetGroupName='string',
PreferredMaintenanceWindow='string',
DBParameterGroupName='string',
BackupRetentionPeriod=123,
PreferredBackupWindow='string',
Port=123,
MultiAZ=True|False,
EngineVersion='string',
AutoMinorVersionUpgrade=True|False,
LicenseModel='string',
Iops=123,
OptionGroupName='string',
CharacterSetName='string',
PubliclyAccessible=True|False,
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
DBClusterIdentifier='string',
StorageType='string',
TdeCredentialArn='string',
TdeCredentialPassword='string',
StorageEncrypted=True|False,
KmsKeyId='string',
Domain='string',
CopyTagsToSnapshot=True|False,
MonitoringInterval=123,
MonitoringRoleArn='string',
DomainIAMRoleName='string',
PromotionTier=123,
Timezone='string',
EnableIAMDatabaseAuthentication=True|False
)
:type DBName: string
:param DBName: The meaning of this parameter differs according to the database engine you use.
Type: String
MySQL
The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.
Constraints:
Must contain 1 to 64 alphanumeric characters
Cannot be a word reserved by the specified database engine
MariaDB
The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.
Constraints:
Must contain 1 to 64 alphanumeric characters
Cannot be a word reserved by the specified database engine
PostgreSQL
The name of the database to create when the DB instance is created. If this parameter is not specified, the default 'postgres' database is created in the DB instance.
Constraints:
Must contain 1 to 63 alphanumeric characters
Must begin with a letter or an underscore. Subsequent characters can be letters, underscores, or digits (0-9).
Cannot be a word reserved by the specified database engine
Oracle
The Oracle System ID (SID) of the created DB instance. If you specify null , the default value ORCL is used. You can't specify the string NULL, or any other reserved word, for DBName .
Default: ORCL
Constraints:
Cannot be longer than 8 characters
SQL Server
Not applicable. Must be null.
Amazon Aurora
The name of the database to create when the primary instance of the DB cluster is created. If this parameter is not specified, no database is created in the DB instance.
Constraints:
Must contain 1 to 64 alphanumeric characters
Cannot be a word reserved by the specified database engine
:type DBInstanceIdentifier: string
:param DBInstanceIdentifier: [REQUIRED]
The DB instance identifier. This parameter is stored as a lowercase string.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens (1 to 15 for SQL Server).
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Example: mydbinstance
:type AllocatedStorage: integer
:param AllocatedStorage: The amount of storage (in gigabytes) to be initially allocated for the database instance.
Type: Integer
Amazon Aurora
Not applicable. Aurora cluster volumes automatically grow as the amount of data in your database increases, though you are only charged for the space that you use in an Aurora cluster volume.
MySQL
Constraints: Must be an integer from 5 to 6144.
MariaDB
Constraints: Must be an integer from 5 to 6144.
PostgreSQL
Constraints: Must be an integer from 5 to 6144.
Oracle
Constraints: Must be an integer from 10 to 6144.
SQL Server
Constraints: Must be an integer from 200 to 4096 (Standard Edition and Enterprise Edition) or from 20 to 4096 (Express Edition and Web Edition)
:type DBInstanceClass: string
:param DBInstanceClass: [REQUIRED]
The compute and memory capacity of the DB instance. Note that not all instance classes are available in all regions for all DB engines.
Valid Values: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.xlarge |db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large | db.m3.xlarge | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium | db.t2.large
:type Engine: string
:param Engine: [REQUIRED]
The name of the database engine to be used for this instance.
Valid Values: mysql | mariadb | oracle-se1 | oracle-se2 | oracle-se | oracle-ee | sqlserver-ee | sqlserver-se | sqlserver-ex | sqlserver-web | postgres | aurora
Not every database engine is available for every AWS region.
:type MasterUsername: string
:param MasterUsername: The name for the master database user.
Amazon Aurora
Not applicable. You specify the name for the master database user when you create your DB cluster.
MariaDB
Constraints:
Must be 1 to 16 alphanumeric characters.
Cannot be a reserved word for the chosen database engine.
Microsoft SQL Server
Constraints:
Must be 1 to 128 alphanumeric characters.
First character must be a letter.
Cannot be a reserved word for the chosen database engine.
MySQL
Constraints:
Must be 1 to 16 alphanumeric characters.
First character must be a letter.
Cannot be a reserved word for the chosen database engine.
Oracle
Constraints:
Must be 1 to 30 alphanumeric characters.
First character must be a letter.
Cannot be a reserved word for the chosen database engine.
PostgreSQL
Constraints:
Must be 1 to 63 alphanumeric characters.
First character must be a letter.
Cannot be a reserved word for the chosen database engine.
:type MasterUserPassword: string
:param MasterUserPassword: The password for the master database user. Can be any printable ASCII character except '/', ''', or '@'.
Amazon Aurora
Not applicable. You specify the password for the master database user when you create your DB cluster.
MariaDB
Constraints: Must contain from 8 to 41 characters.
Microsoft SQL Server
Constraints: Must contain from 8 to 128 characters.
MySQL
Constraints: Must contain from 8 to 41 characters.
Oracle
Constraints: Must contain from 8 to 30 characters.
PostgreSQL
Constraints: Must contain from 8 to 128 characters.
:type DBSecurityGroups: list
:param DBSecurityGroups: A list of DB security groups to associate with this DB instance.
Default: The default DB security group for the database engine.
(string) --
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of EC2 VPC security groups to associate with this DB instance.
Default: The default EC2 VPC security group for the DB subnet group's VPC.
(string) --
:type AvailabilityZone: string
:param AvailabilityZone: The EC2 Availability Zone that the database instance will be created in. For information on regions and Availability Zones, see Regions and Availability Zones .
Default: A random, system-chosen Availability Zone in the endpoint's region.
Example: us-east-1d
Constraint: The AvailabilityZone parameter cannot be specified if the MultiAZ parameter is set to true . The specified Availability Zone must be in the same region as the current endpoint.
:type DBSubnetGroupName: string
:param DBSubnetGroupName: A DB subnet group to associate with this DB instance.
If there is no DB subnet group, then it is a non-VPC DB instance.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). For more information, see DB Instance Maintenance .
Format: ddd:hh24:mi-ddd:hh24:mi
Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
:type DBParameterGroupName: string
:param DBParameterGroupName: The name of the DB parameter group to associate with this DB instance. If this argument is omitted, the default DBParameterGroup for the specified engine will be used.
Constraints:
Must be 1 to 255 alphanumeric characters
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type BackupRetentionPeriod: integer
:param BackupRetentionPeriod: The number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups.
Default: 1
Constraints:
Must be a value from 0 to 35
Cannot be set to 0 if the DB instance is a source to Read Replicas
:type PreferredBackupWindow: string
:param PreferredBackupWindow: The daily time range during which automated backups are created if automated backups are enabled, using the BackupRetentionPeriod parameter. For more information, see DB Instance Backups .
Default: A 30-minute window selected at random from an 8-hour block of time per region. To see the time blocks available, see Adjusting the Preferred DB Instance Maintenance Window .
Constraints:
Must be in the format hh24:mi-hh24:mi .
Times should be in Universal Coordinated Time (UTC).
Must not conflict with the preferred maintenance window.
Must be at least 30 minutes.
:type Port: integer
:param Port: The port number on which the database accepts connections.
MySQL
Default: 3306
Valid Values: 1150-65535
Type: Integer
MariaDB
Default: 3306
Valid Values: 1150-65535
Type: Integer
PostgreSQL
Default: 5432
Valid Values: 1150-65535
Type: Integer
Oracle
Default: 1521
Valid Values: 1150-65535
SQL Server
Default: 1433
Valid Values: 1150-65535 except for 1434 , 3389 , 47001 , 49152 , and 49152 through 49156 .
Amazon Aurora
Default: 3306
Valid Values: 1150-65535
Type: Integer
:type MultiAZ: boolean
:param MultiAZ: Specifies if the DB instance is a Multi-AZ deployment. You cannot set the AvailabilityZone parameter if the MultiAZ parameter is set to true.
:type EngineVersion: string
:param EngineVersion: The version number of the database engine to use.
The following are the database engines and major and minor versions that are available with Amazon RDS. Not every database engine is available for every AWS region.
Amazon Aurora
Version 5.6 (available in these AWS regions: ap-northeast-1, ap-northeast-2, ap-south-1, ap-southeast-2, eu-west-1, us-east-1, us-east-2, us-west-2): 5.6.10a
MariaDB
Version 10.1 (available in these AWS regions: us-east-2): 10.1.16
Version 10.1 (available in these AWS regions: ap-northeast-1, ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1, us-east-1, us-west-1, us-west-2): 10.1.14
Version 10.0 (available in all AWS regions): 10.0.24
Version 10.0 (available in these AWS regions: ap-northeast-1, ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1, us-east-1, us-gov-west-1, us-west-1, us-west-2): 10.0.17
Microsoft SQL Server 2016
13.00.2164.0.v1 (supported for all editions, and all AWS regions except sa-east-1)
Microsoft SQL Server 2014
12.00.5000.0.v1 (supported for all editions, and all AWS regions)
12.00.4422.0.v1 (supported for all editions except Enterprise Edition, and all AWS regions except us-east-2)
Microsoft SQL Server 2012
11.00.6020.0.v1 (supported for all editions, and all AWS regions)
11.00.5058.0.v1 (supported for all editions, and all AWS regions except us-east-2)
11.00.2100.60.v1 (supported for all editions, and all AWS regions except us-east-2)
Microsoft SQL Server 2008 R2
10.50.6529.0.v1 (supported for all editions, and all AWS regions except us-east-2)
10.50.6000.34.v1 (supported for all editions, and all AWS regions except us-east-2)
10.50.2789.0.v1 (supported for all editions, and all AWS regions except us-east-2)
MySQL
Version 5.7 (available in all AWS regions): 5.7.11
Version 5.7 (available in these AWS regions: ap-northeast-1, ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1, us-east-1, us-gov-west-1, us-west-1, us-west-2): 5.7.10
Version 5.6 (available in all AWS regions): 5.6.29
Version 5.6 (available in these AWS regions: ap-northeast-1, ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1, us-east-1, us-gov-west-1, us-west-1, us-west-2): 5.6.27
Version 5.6 (available in these AWS regions: ap-northeast-1, ap-northeast-2, ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1, us-east-1, us-gov-west-1, us-west-1, us-west-2): 5.6.23
Version 5.6 (available in these AWS regions: ap-northeast-1, ap-southeast-1, ap-southeast-2, eu-central-1, eu-west-1, sa-east-1, us-east-1, us-gov-west-1, us-west-1, us-west-2): 5.6.19a | 5.6.19b | 5.6.21 | 5.6.21b | 5.6.22
Version 5.5 (available in all AWS regions): 5.5.46
Version 5.1 (only available in AWS regions ap-northeast-1, ap-southeast-1, ap-southeast-2, eu-west-1, sa-east-1, us-east-1, us-gov-west-1, us-west-1, us-west-2): 5.1.73a | 5.1.73b
Oracle 12c
12.1.0.2.v8 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
12.1.0.2.v7 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
12.1.0.2.v6 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
12.1.0.2.v5 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
12.1.0.2.v4 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
12.1.0.2.v3 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
12.1.0.2.v2 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
12.1.0.2.v1 (supported for EE in all AWS regions, and SE2 in all AWS regions except us-gov-west-1)
Oracle 11g
11.2.0.4.v12 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v11 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v10 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v9 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v8 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v7 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v6 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v5 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v4 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v3 (supported for EE, SE1, and SE, in all AWS regions)
11.2.0.4.v1 (supported for EE, SE1, and SE, in all AWS regions)
PostgreSQL
Version 9.6.x: 9.6.1 | 9.6.2
Version 9.5.x: 9.5.6 | 9.5.4 | 9.5.2
Version 9.4.x: 9.4.11 | 9.4.9 | 9.4.7
Version 9.3.x: 9.3.16 | 9.3.14 | 9.3.12
:type AutoMinorVersionUpgrade: boolean
:param AutoMinorVersionUpgrade: Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window.
Default: true
:type LicenseModel: string
:param LicenseModel: License model information for this DB instance.
Valid values: license-included | bring-your-own-license | general-public-license
:type Iops: integer
:param Iops: The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance.
Constraints: Must be a multiple between 3 and 10 of the storage amount for the DB instance. Must also be an integer multiple of 1000. For example, if the size of your DB instance is 500 GB, then your Iops value can be 2000, 3000, 4000, or 5000.
:type OptionGroupName: string
:param OptionGroupName: Indicates that the DB instance should be associated with the specified option group.
Permanent options, such as the TDE option for Oracle Advanced Security TDE, cannot be removed from an option group, and that option group cannot be removed from a DB instance once it is associated with a DB instance
:type CharacterSetName: string
:param CharacterSetName: For supported engines, indicates that the DB instance should be associated with the specified CharacterSet.
:type PubliclyAccessible: boolean
:param PubliclyAccessible: Specifies the accessibility options for the DB instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.
Default: The default behavior varies depending on whether a VPC has been requested or not. The following list shows the default behavior in each case.
Default VPC: true
VPC: false
If no DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be private.
:type Tags: list
:param Tags: A list of tags.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type DBClusterIdentifier: string
:param DBClusterIdentifier: The identifier of the DB cluster that the instance will belong to.
For information on creating a DB cluster, see CreateDBCluster .
Type: String
:type StorageType: string
:param StorageType: Specifies the storage type to be associated with the DB instance.
Valid values: standard | gp2 | io1
If you specify io1 , you must also include a value for the Iops parameter.
Default: io1 if the Iops parameter is specified; otherwise standard
:type TdeCredentialArn: string
:param TdeCredentialArn: The ARN from the Key Store with which to associate the instance for TDE encryption.
:type TdeCredentialPassword: string
:param TdeCredentialPassword: The password for the given ARN from the Key Store in order to access the device.
:type StorageEncrypted: boolean
:param StorageEncrypted: Specifies whether the DB instance is encrypted.
Default: false
:type KmsKeyId: string
:param KmsKeyId: The KMS key identifier for an encrypted DB instance.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB instance with the same AWS account that owns the KMS encryption key used to encrypt the new DB instance, then you can use the KMS key alias instead of the ARN for the KM encryption key.
If the StorageEncrypted parameter is true, and you do not specify a value for the KmsKeyId parameter, then Amazon RDS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region.
:type Domain: string
:param Domain: Specify the Active Directory Domain to create the instance in.
:type CopyTagsToSnapshot: boolean
:param CopyTagsToSnapshot: True to copy all tags from the DB instance to snapshots of the DB instance; otherwise false. The default is false.
:type MonitoringInterval: integer
:param MonitoringInterval: The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0.
If MonitoringRoleArn is specified, then you must also set MonitoringInterval to a value other than 0.
Valid Values: 0, 1, 5, 10, 15, 30, 60
:type MonitoringRoleArn: string
:param MonitoringRoleArn: The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess . For information on creating a monitoring role, go to Setting Up and Enabling Enhanced Monitoring .
If MonitoringInterval is set to a value other than 0, then you must supply a MonitoringRoleArn value.
:type DomainIAMRoleName: string
:param DomainIAMRoleName: Specify the name of the IAM role to be used when making API calls to the Directory Service.
:type PromotionTier: integer
:param PromotionTier: A value that specifies the order in which an Aurora Replica is promoted to the primary instance after a failure of the existing primary instance. For more information, see Fault Tolerance for an Aurora DB Cluster .
Default: 1
Valid Values: 0 - 15
:type Timezone: string
:param Timezone: The time zone of the DB instance. The time zone parameter is currently supported only by Microsoft SQL Server .
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts; otherwise false.
You can enable IAM database authentication for the following database engines
For MySQL 5.6, minor version 5.6.34 or higher
For MySQL 5.7, minor version 5.7.16 or higher
Default: false
:rtype: dict
:return: {
'DBInstance': {
'DBInstanceIdentifier': 'string',
'DBInstanceClass': 'string',
'Engine': 'string',
'DBInstanceStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123,
'HostedZoneId': 'string'
},
'AllocatedStorage': 123,
'InstanceCreateTime': datetime(2015, 1, 1),
'PreferredBackupWindow': 'string',
'BackupRetentionPeriod': 123,
'DBSecurityGroups': [
{
'DBSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'ParameterApplyStatus': 'string'
},
],
'AvailabilityZone': 'string',
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'DBInstanceClass': 'string',
'AllocatedStorage': 123,
'MasterUserPassword': 'string',
'Port': 123,
'BackupRetentionPeriod': 123,
'MultiAZ': True|False,
'EngineVersion': 'string',
'LicenseModel': 'string',
'Iops': 123,
'DBInstanceIdentifier': 'string',
'StorageType': 'string',
'CACertificateIdentifier': 'string',
'DBSubnetGroupName': 'string'
},
'LatestRestorableTime': datetime(2015, 1, 1),
'MultiAZ': True|False,
'EngineVersion': 'string',
'AutoMinorVersionUpgrade': True|False,
'ReadReplicaSourceDBInstanceIdentifier': 'string',
'ReadReplicaDBInstanceIdentifiers': [
'string',
],
'ReadReplicaDBClusterIdentifiers': [
'string',
],
'LicenseModel': 'string',
'Iops': 123,
'OptionGroupMemberships': [
{
'OptionGroupName': 'string',
'Status': 'string'
},
],
'CharacterSetName': 'string',
'SecondaryAvailabilityZone': 'string',
'PubliclyAccessible': True|False,
'StatusInfos': [
{
'StatusType': 'string',
'Normal': True|False,
'Status': 'string',
'Message': 'string'
},
],
'StorageType': 'string',
'TdeCredentialArn': 'string',
'DbInstancePort': 123,
'DBClusterIdentifier': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbiResourceId': 'string',
'CACertificateIdentifier': 'string',
'DomainMemberships': [
{
'Domain': 'string',
'Status': 'string',
'FQDN': 'string',
'IAMRoleName': 'string'
},
],
'CopyTagsToSnapshot': True|False,
'MonitoringInterval': 123,
'EnhancedMonitoringResourceArn': 'string',
'MonitoringRoleArn': 'string',
'PromotionTier': 123,
'DBInstanceArn': 'string',
'Timezone': 'string',
'IAMDatabaseAuthenticationEnabled': True|False
}
}
:returns:
CreateDBInstance
DeleteDBInstance
ModifyDBInstance | entailment |
def create_db_instance_read_replica(DBInstanceIdentifier=None, SourceDBInstanceIdentifier=None, DBInstanceClass=None, AvailabilityZone=None, Port=None, AutoMinorVersionUpgrade=None, Iops=None, OptionGroupName=None, PubliclyAccessible=None, Tags=None, DBSubnetGroupName=None, StorageType=None, CopyTagsToSnapshot=None, MonitoringInterval=None, MonitoringRoleArn=None, KmsKeyId=None, PreSignedUrl=None, EnableIAMDatabaseAuthentication=None, SourceRegion=None):
"""
Creates a DB instance for a DB instance running MySQL, MariaDB, or PostgreSQL that acts as a Read Replica of a source DB instance.
All Read Replica DB instances are created as Single-AZ deployments with backups disabled. All other DB instance attributes (including DB security groups and DB parameter groups) are inherited from the source DB instance, except as specified below.
You can create an encrypted Read Replica in a different AWS Region than the source DB instance. In that case, the region where you call the CreateDBInstanceReadReplica action is the destination region of the encrypted Read Replica. The source DB instance must be encrypted.
To create an encrypted Read Replica in another AWS Region, you must provide the following values:
To learn how to generate a Signature Version 4 signed request, see Authenticating Requests: Using Query Parameters (AWS Signature Version 4) and Signature Version 4 Signing Process .
See also: AWS API Documentation
Examples
This example creates a DB instance read replica.
Expected Output:
:example: response = client.create_db_instance_read_replica(
DBInstanceIdentifier='string',
SourceDBInstanceIdentifier='string',
DBInstanceClass='string',
AvailabilityZone='string',
Port=123,
AutoMinorVersionUpgrade=True|False,
Iops=123,
OptionGroupName='string',
PubliclyAccessible=True|False,
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
DBSubnetGroupName='string',
StorageType='string',
CopyTagsToSnapshot=True|False,
MonitoringInterval=123,
MonitoringRoleArn='string',
KmsKeyId='string',
EnableIAMDatabaseAuthentication=True|False,
SourceRegion='string'
)
:type DBInstanceIdentifier: string
:param DBInstanceIdentifier: [REQUIRED]
The DB instance identifier of the Read Replica. This identifier is the unique key that identifies a DB instance. This parameter is stored as a lowercase string.
:type SourceDBInstanceIdentifier: string
:param SourceDBInstanceIdentifier: [REQUIRED]
The identifier of the DB instance that will act as the source for the Read Replica. Each DB instance can have up to five Read Replicas.
Constraints:
Must be the identifier of an existing MySQL, MariaDB, or PostgreSQL DB instance.
Can specify a DB instance that is a MySQL Read Replica only if the source is running MySQL 5.6.
Can specify a DB instance that is a PostgreSQL DB instance only if the source is running PostgreSQL 9.3.5 or later.
The specified DB instance must have automatic backups enabled, its backup retention period must be greater than 0.
If the source DB instance is in the same region as the Read Replica, specify a valid DB instance identifier.
If the source DB instance is in a different region than the Read Replica, specify a valid DB instance ARN. For more information, go to Constructing a Amazon RDS Amazon Resource Name (ARN) .
:type DBInstanceClass: string
:param DBInstanceClass: The compute and memory capacity of the Read Replica. Note that not all instance classes are available in all regions for all DB engines.
Valid Values: db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.xlarge |db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large | db.m3.xlarge | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium | db.t2.large
Default: Inherits from the source DB instance.
:type AvailabilityZone: string
:param AvailabilityZone: The Amazon EC2 Availability Zone that the Read Replica will be created in.
Default: A random, system-chosen Availability Zone in the endpoint's region.
Example: us-east-1d
:type Port: integer
:param Port: The port number that the DB instance uses for connections.
Default: Inherits from the source DB instance
Valid Values: 1150-65535
:type AutoMinorVersionUpgrade: boolean
:param AutoMinorVersionUpgrade: Indicates that minor engine upgrades will be applied automatically to the Read Replica during the maintenance window.
Default: Inherits from the source DB instance
:type Iops: integer
:param Iops: The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance.
:type OptionGroupName: string
:param OptionGroupName: The option group the DB instance will be associated with. If omitted, the default option group for the engine specified will be used.
:type PubliclyAccessible: boolean
:param PubliclyAccessible: Specifies the accessibility options for the DB instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.
Default: The default behavior varies depending on whether a VPC has been requested or not. The following list shows the default behavior in each case.
Default VPC: true
VPC: false
If no DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be private.
:type Tags: list
:param Tags: A list of tags.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type DBSubnetGroupName: string
:param DBSubnetGroupName: Specifies a DB subnet group for the DB instance. The new DB instance will be created in the VPC associated with the DB subnet group. If no DB subnet group is specified, then the new DB instance is not created in a VPC.
Constraints:
Can only be specified if the source DB instance identifier specifies a DB instance in another region.
The specified DB subnet group must be in the same region in which the operation is running.
All Read Replicas in one region that are created from the same source DB instance must either:
Specify DB subnet groups from the same VPC. All these Read Replicas will be created in the same VPC.
Not specify a DB subnet group. All these Read Replicas will be created outside of any VPC.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.
Example: mySubnetgroup
:type StorageType: string
:param StorageType: Specifies the storage type to be associated with the Read Replica.
Valid values: standard | gp2 | io1
If you specify io1 , you must also include a value for the Iops parameter.
Default: io1 if the Iops parameter is specified; otherwise standard
:type CopyTagsToSnapshot: boolean
:param CopyTagsToSnapshot: True to copy all tags from the Read Replica to snapshots of the Read Replica; otherwise false. The default is false.
:type MonitoringInterval: integer
:param MonitoringInterval: The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the Read Replica. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0.
If MonitoringRoleArn is specified, then you must also set MonitoringInterval to a value other than 0.
Valid Values: 0, 1, 5, 10, 15, 30, 60
:type MonitoringRoleArn: string
:param MonitoringRoleArn: The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess . For information on creating a monitoring role, go to To create an IAM role for Amazon RDS Enhanced Monitoring .
If MonitoringInterval is set to a value other than 0, then you must supply a MonitoringRoleArn value.
:type KmsKeyId: string
:param KmsKeyId: The AWS KMS key ID for an encrypted Read Replica. The KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS encryption key.
If you create an unencrypted Read Replica and specify a value for the KmsKeyId parameter, Amazon RDS encrypts the target Read Replica using the specified KMS encryption key.
If you create an encrypted Read Replica from your AWS account, you can specify a value for KmsKeyId to encrypt the Read Replica with a new KMS encryption key. If you don't specify a value for KmsKeyId , then the Read Replica is encrypted with the same KMS key as the source DB instance.
If you create an encrypted Read Replica in a different AWS region, then you must specify a KMS key for the destination AWS region. KMS encryption keys are specific to the region that they are created in, and you cannot use encryption keys from one region in another region.
:type PreSignedUrl: string
:param PreSignedUrl: The URL that contains a Signature Version 4 signed request for the CreateDBInstanceReadReplica API action in the AWS region that contains the source DB instance. The PreSignedUrl parameter must be used when encrypting a Read Replica from another AWS region.
The presigned URL must be a valid request for the CreateDBInstanceReadReplica API action that can be executed in the source region that contains the encrypted DB instance. The presigned URL request must contain the following parameter values:
DestinationRegion - The AWS Region that the Read Replica is created in. This region is the same one where the CreateDBInstanceReadReplica action is called that contains this presigned URL. For example, if you create an encrypted Read Replica in the us-east-1 region, and the source DB instance is in the west-2 region, then you call the CreateDBInstanceReadReplica action in the us-east-1 region and provide a presigned URL that contains a call to the CreateDBInstanceReadReplica action in the us-west-2 region. For this example, the DestinationRegion in the presigned URL must be set to the us-east-1 region.
KmsKeyId - The KMS key identifier for the key to use to encrypt the Read Replica in the destination region. This is the same identifier for both the CreateDBInstanceReadReplica action that is called in the destination region, and the action contained in the presigned URL.
SourceDBInstanceIdentifier - The DB instance identifier for the encrypted Read Replica to be created. This identifier must be in the Amazon Resource Name (ARN) format for the source region. For example, if you create an encrypted Read Replica from a DB instance in the us-west-2 region, then your SourceDBInstanceIdentifier would look like this example: arn:aws:rds:us-west-2:123456789012:instance:mysql-instance1-instance-20161115 .
To learn how to generate a Signature Version 4 signed request, see Authenticating Requests: Using Query Parameters (AWS Signature Version 4) and Signature Version 4 Signing Process .
Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts; otherwise false.
You can enable IAM database authentication for the following database engines
For MySQL 5.6, minor version 5.6.34 or higher
For MySQL 5.7, minor version 5.7.16 or higher
Aurora 5.6 or higher.
Default: false
:type SourceRegion: string
:param SourceRegion: The ID of the region that contains the source for the read replica.
:rtype: dict
:return: {
'DBInstance': {
'DBInstanceIdentifier': 'string',
'DBInstanceClass': 'string',
'Engine': 'string',
'DBInstanceStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123,
'HostedZoneId': 'string'
},
'AllocatedStorage': 123,
'InstanceCreateTime': datetime(2015, 1, 1),
'PreferredBackupWindow': 'string',
'BackupRetentionPeriod': 123,
'DBSecurityGroups': [
{
'DBSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'ParameterApplyStatus': 'string'
},
],
'AvailabilityZone': 'string',
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'DBInstanceClass': 'string',
'AllocatedStorage': 123,
'MasterUserPassword': 'string',
'Port': 123,
'BackupRetentionPeriod': 123,
'MultiAZ': True|False,
'EngineVersion': 'string',
'LicenseModel': 'string',
'Iops': 123,
'DBInstanceIdentifier': 'string',
'StorageType': 'string',
'CACertificateIdentifier': 'string',
'DBSubnetGroupName': 'string'
},
'LatestRestorableTime': datetime(2015, 1, 1),
'MultiAZ': True|False,
'EngineVersion': 'string',
'AutoMinorVersionUpgrade': True|False,
'ReadReplicaSourceDBInstanceIdentifier': 'string',
'ReadReplicaDBInstanceIdentifiers': [
'string',
],
'ReadReplicaDBClusterIdentifiers': [
'string',
],
'LicenseModel': 'string',
'Iops': 123,
'OptionGroupMemberships': [
{
'OptionGroupName': 'string',
'Status': 'string'
},
],
'CharacterSetName': 'string',
'SecondaryAvailabilityZone': 'string',
'PubliclyAccessible': True|False,
'StatusInfos': [
{
'StatusType': 'string',
'Normal': True|False,
'Status': 'string',
'Message': 'string'
},
],
'StorageType': 'string',
'TdeCredentialArn': 'string',
'DbInstancePort': 123,
'DBClusterIdentifier': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbiResourceId': 'string',
'CACertificateIdentifier': 'string',
'DomainMemberships': [
{
'Domain': 'string',
'Status': 'string',
'FQDN': 'string',
'IAMRoleName': 'string'
},
],
'CopyTagsToSnapshot': True|False,
'MonitoringInterval': 123,
'EnhancedMonitoringResourceArn': 'string',
'MonitoringRoleArn': 'string',
'PromotionTier': 123,
'DBInstanceArn': 'string',
'Timezone': 'string',
'IAMDatabaseAuthenticationEnabled': True|False
}
}
:returns:
DBInstanceIdentifier - The identifier for the encrypted Read Replica in the destination region.
SourceDBInstanceIdentifier - The DB instance identifier for the encrypted Read Replica. This identifier must be in the ARN format for the source region and is the same value as the SourceDBInstanceIdentifier in the presigned URL.
"""
pass | Creates a DB instance for a DB instance running MySQL, MariaDB, or PostgreSQL that acts as a Read Replica of a source DB instance.
All Read Replica DB instances are created as Single-AZ deployments with backups disabled. All other DB instance attributes (including DB security groups and DB parameter groups) are inherited from the source DB instance, except as specified below.
You can create an encrypted Read Replica in a different AWS Region than the source DB instance. In that case, the region where you call the CreateDBInstanceReadReplica action is the destination region of the encrypted Read Replica. The source DB instance must be encrypted.
To create an encrypted Read Replica in another AWS Region, you must provide the following values:
To learn how to generate a Signature Version 4 signed request, see Authenticating Requests: Using Query Parameters (AWS Signature Version 4) and Signature Version 4 Signing Process .
See also: AWS API Documentation
Examples
This example creates a DB instance read replica.
Expected Output:
:example: response = client.create_db_instance_read_replica(
DBInstanceIdentifier='string',
SourceDBInstanceIdentifier='string',
DBInstanceClass='string',
AvailabilityZone='string',
Port=123,
AutoMinorVersionUpgrade=True|False,
Iops=123,
OptionGroupName='string',
PubliclyAccessible=True|False,
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
DBSubnetGroupName='string',
StorageType='string',
CopyTagsToSnapshot=True|False,
MonitoringInterval=123,
MonitoringRoleArn='string',
KmsKeyId='string',
EnableIAMDatabaseAuthentication=True|False,
SourceRegion='string'
)
:type DBInstanceIdentifier: string
:param DBInstanceIdentifier: [REQUIRED]
The DB instance identifier of the Read Replica. This identifier is the unique key that identifies a DB instance. This parameter is stored as a lowercase string.
:type SourceDBInstanceIdentifier: string
:param SourceDBInstanceIdentifier: [REQUIRED]
The identifier of the DB instance that will act as the source for the Read Replica. Each DB instance can have up to five Read Replicas.
Constraints:
Must be the identifier of an existing MySQL, MariaDB, or PostgreSQL DB instance.
Can specify a DB instance that is a MySQL Read Replica only if the source is running MySQL 5.6.
Can specify a DB instance that is a PostgreSQL DB instance only if the source is running PostgreSQL 9.3.5 or later.
The specified DB instance must have automatic backups enabled, its backup retention period must be greater than 0.
If the source DB instance is in the same region as the Read Replica, specify a valid DB instance identifier.
If the source DB instance is in a different region than the Read Replica, specify a valid DB instance ARN. For more information, go to Constructing a Amazon RDS Amazon Resource Name (ARN) .
:type DBInstanceClass: string
:param DBInstanceClass: The compute and memory capacity of the Read Replica. Note that not all instance classes are available in all regions for all DB engines.
Valid Values: db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.xlarge |db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large | db.m3.xlarge | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium | db.t2.large
Default: Inherits from the source DB instance.
:type AvailabilityZone: string
:param AvailabilityZone: The Amazon EC2 Availability Zone that the Read Replica will be created in.
Default: A random, system-chosen Availability Zone in the endpoint's region.
Example: us-east-1d
:type Port: integer
:param Port: The port number that the DB instance uses for connections.
Default: Inherits from the source DB instance
Valid Values: 1150-65535
:type AutoMinorVersionUpgrade: boolean
:param AutoMinorVersionUpgrade: Indicates that minor engine upgrades will be applied automatically to the Read Replica during the maintenance window.
Default: Inherits from the source DB instance
:type Iops: integer
:param Iops: The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance.
:type OptionGroupName: string
:param OptionGroupName: The option group the DB instance will be associated with. If omitted, the default option group for the engine specified will be used.
:type PubliclyAccessible: boolean
:param PubliclyAccessible: Specifies the accessibility options for the DB instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.
Default: The default behavior varies depending on whether a VPC has been requested or not. The following list shows the default behavior in each case.
Default VPC: true
VPC: false
If no DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be private.
:type Tags: list
:param Tags: A list of tags.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type DBSubnetGroupName: string
:param DBSubnetGroupName: Specifies a DB subnet group for the DB instance. The new DB instance will be created in the VPC associated with the DB subnet group. If no DB subnet group is specified, then the new DB instance is not created in a VPC.
Constraints:
Can only be specified if the source DB instance identifier specifies a DB instance in another region.
The specified DB subnet group must be in the same region in which the operation is running.
All Read Replicas in one region that are created from the same source DB instance must either:
Specify DB subnet groups from the same VPC. All these Read Replicas will be created in the same VPC.
Not specify a DB subnet group. All these Read Replicas will be created outside of any VPC.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.
Example: mySubnetgroup
:type StorageType: string
:param StorageType: Specifies the storage type to be associated with the Read Replica.
Valid values: standard | gp2 | io1
If you specify io1 , you must also include a value for the Iops parameter.
Default: io1 if the Iops parameter is specified; otherwise standard
:type CopyTagsToSnapshot: boolean
:param CopyTagsToSnapshot: True to copy all tags from the Read Replica to snapshots of the Read Replica; otherwise false. The default is false.
:type MonitoringInterval: integer
:param MonitoringInterval: The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the Read Replica. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0.
If MonitoringRoleArn is specified, then you must also set MonitoringInterval to a value other than 0.
Valid Values: 0, 1, 5, 10, 15, 30, 60
:type MonitoringRoleArn: string
:param MonitoringRoleArn: The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess . For information on creating a monitoring role, go to To create an IAM role for Amazon RDS Enhanced Monitoring .
If MonitoringInterval is set to a value other than 0, then you must supply a MonitoringRoleArn value.
:type KmsKeyId: string
:param KmsKeyId: The AWS KMS key ID for an encrypted Read Replica. The KMS key ID is the Amazon Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS encryption key.
If you create an unencrypted Read Replica and specify a value for the KmsKeyId parameter, Amazon RDS encrypts the target Read Replica using the specified KMS encryption key.
If you create an encrypted Read Replica from your AWS account, you can specify a value for KmsKeyId to encrypt the Read Replica with a new KMS encryption key. If you don't specify a value for KmsKeyId , then the Read Replica is encrypted with the same KMS key as the source DB instance.
If you create an encrypted Read Replica in a different AWS region, then you must specify a KMS key for the destination AWS region. KMS encryption keys are specific to the region that they are created in, and you cannot use encryption keys from one region in another region.
:type PreSignedUrl: string
:param PreSignedUrl: The URL that contains a Signature Version 4 signed request for the CreateDBInstanceReadReplica API action in the AWS region that contains the source DB instance. The PreSignedUrl parameter must be used when encrypting a Read Replica from another AWS region.
The presigned URL must be a valid request for the CreateDBInstanceReadReplica API action that can be executed in the source region that contains the encrypted DB instance. The presigned URL request must contain the following parameter values:
DestinationRegion - The AWS Region that the Read Replica is created in. This region is the same one where the CreateDBInstanceReadReplica action is called that contains this presigned URL. For example, if you create an encrypted Read Replica in the us-east-1 region, and the source DB instance is in the west-2 region, then you call the CreateDBInstanceReadReplica action in the us-east-1 region and provide a presigned URL that contains a call to the CreateDBInstanceReadReplica action in the us-west-2 region. For this example, the DestinationRegion in the presigned URL must be set to the us-east-1 region.
KmsKeyId - The KMS key identifier for the key to use to encrypt the Read Replica in the destination region. This is the same identifier for both the CreateDBInstanceReadReplica action that is called in the destination region, and the action contained in the presigned URL.
SourceDBInstanceIdentifier - The DB instance identifier for the encrypted Read Replica to be created. This identifier must be in the Amazon Resource Name (ARN) format for the source region. For example, if you create an encrypted Read Replica from a DB instance in the us-west-2 region, then your SourceDBInstanceIdentifier would look like this example: arn:aws:rds:us-west-2:123456789012:instance:mysql-instance1-instance-20161115 .
To learn how to generate a Signature Version 4 signed request, see Authenticating Requests: Using Query Parameters (AWS Signature Version 4) and Signature Version 4 Signing Process .
Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts; otherwise false.
You can enable IAM database authentication for the following database engines
For MySQL 5.6, minor version 5.6.34 or higher
For MySQL 5.7, minor version 5.7.16 or higher
Aurora 5.6 or higher.
Default: false
:type SourceRegion: string
:param SourceRegion: The ID of the region that contains the source for the read replica.
:rtype: dict
:return: {
'DBInstance': {
'DBInstanceIdentifier': 'string',
'DBInstanceClass': 'string',
'Engine': 'string',
'DBInstanceStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123,
'HostedZoneId': 'string'
},
'AllocatedStorage': 123,
'InstanceCreateTime': datetime(2015, 1, 1),
'PreferredBackupWindow': 'string',
'BackupRetentionPeriod': 123,
'DBSecurityGroups': [
{
'DBSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'ParameterApplyStatus': 'string'
},
],
'AvailabilityZone': 'string',
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'DBInstanceClass': 'string',
'AllocatedStorage': 123,
'MasterUserPassword': 'string',
'Port': 123,
'BackupRetentionPeriod': 123,
'MultiAZ': True|False,
'EngineVersion': 'string',
'LicenseModel': 'string',
'Iops': 123,
'DBInstanceIdentifier': 'string',
'StorageType': 'string',
'CACertificateIdentifier': 'string',
'DBSubnetGroupName': 'string'
},
'LatestRestorableTime': datetime(2015, 1, 1),
'MultiAZ': True|False,
'EngineVersion': 'string',
'AutoMinorVersionUpgrade': True|False,
'ReadReplicaSourceDBInstanceIdentifier': 'string',
'ReadReplicaDBInstanceIdentifiers': [
'string',
],
'ReadReplicaDBClusterIdentifiers': [
'string',
],
'LicenseModel': 'string',
'Iops': 123,
'OptionGroupMemberships': [
{
'OptionGroupName': 'string',
'Status': 'string'
},
],
'CharacterSetName': 'string',
'SecondaryAvailabilityZone': 'string',
'PubliclyAccessible': True|False,
'StatusInfos': [
{
'StatusType': 'string',
'Normal': True|False,
'Status': 'string',
'Message': 'string'
},
],
'StorageType': 'string',
'TdeCredentialArn': 'string',
'DbInstancePort': 123,
'DBClusterIdentifier': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbiResourceId': 'string',
'CACertificateIdentifier': 'string',
'DomainMemberships': [
{
'Domain': 'string',
'Status': 'string',
'FQDN': 'string',
'IAMRoleName': 'string'
},
],
'CopyTagsToSnapshot': True|False,
'MonitoringInterval': 123,
'EnhancedMonitoringResourceArn': 'string',
'MonitoringRoleArn': 'string',
'PromotionTier': 123,
'DBInstanceArn': 'string',
'Timezone': 'string',
'IAMDatabaseAuthenticationEnabled': True|False
}
}
:returns:
DBInstanceIdentifier - The identifier for the encrypted Read Replica in the destination region.
SourceDBInstanceIdentifier - The DB instance identifier for the encrypted Read Replica. This identifier must be in the ARN format for the source region and is the same value as the SourceDBInstanceIdentifier in the presigned URL. | entailment |
def describe_db_engine_versions(Engine=None, EngineVersion=None, DBParameterGroupFamily=None, Filters=None, MaxRecords=None, Marker=None, DefaultOnly=None, ListSupportedCharacterSets=None, ListSupportedTimezones=None):
"""
Returns a list of the available DB engines.
See also: AWS API Documentation
Examples
This example lists settings for the specified DB engine version.
Expected Output:
:example: response = client.describe_db_engine_versions(
Engine='string',
EngineVersion='string',
DBParameterGroupFamily='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string',
DefaultOnly=True|False,
ListSupportedCharacterSets=True|False,
ListSupportedTimezones=True|False
)
:type Engine: string
:param Engine: The database engine to return.
:type EngineVersion: string
:param EngineVersion: The database engine version to return.
Example: 5.1.49
:type DBParameterGroupFamily: string
:param DBParameterGroupFamily: The name of a specific DB parameter group family to return details for.
Constraints:
Must be 1 to 255 alphanumeric characters
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type Filters: list
:param Filters: Not currently supported.
(dict) --This type is not currently supported.
Name (string) -- [REQUIRED]This parameter is not currently supported.
Values (list) -- [REQUIRED]This parameter is not currently supported.
(string) --
:type MaxRecords: integer
:param MaxRecords: The maximum number of records to include in the response. If more than the MaxRecords value is available, a pagination token called a marker is included in the response so that the following results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker: An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords .
:type DefaultOnly: boolean
:param DefaultOnly: Indicates that only the default version of the specified engine or engine and major version combination is returned.
:type ListSupportedCharacterSets: boolean
:param ListSupportedCharacterSets: If this parameter is specified and the requested engine supports the CharacterSetName parameter for CreateDBInstance , the response includes a list of supported character sets for each engine version.
:type ListSupportedTimezones: boolean
:param ListSupportedTimezones: If this parameter is specified and the requested engine supports the TimeZone parameter for CreateDBInstance , the response includes a list of supported time zones for each engine version.
:rtype: dict
:return: {
'Marker': 'string',
'DBEngineVersions': [
{
'Engine': 'string',
'EngineVersion': 'string',
'DBParameterGroupFamily': 'string',
'DBEngineDescription': 'string',
'DBEngineVersionDescription': 'string',
'DefaultCharacterSet': {
'CharacterSetName': 'string',
'CharacterSetDescription': 'string'
},
'SupportedCharacterSets': [
{
'CharacterSetName': 'string',
'CharacterSetDescription': 'string'
},
],
'ValidUpgradeTarget': [
{
'Engine': 'string',
'EngineVersion': 'string',
'Description': 'string',
'AutoUpgrade': True|False,
'IsMajorVersionUpgrade': True|False
},
],
'SupportedTimezones': [
{
'TimezoneName': 'string'
},
]
},
]
}
"""
pass | Returns a list of the available DB engines.
See also: AWS API Documentation
Examples
This example lists settings for the specified DB engine version.
Expected Output:
:example: response = client.describe_db_engine_versions(
Engine='string',
EngineVersion='string',
DBParameterGroupFamily='string',
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string',
DefaultOnly=True|False,
ListSupportedCharacterSets=True|False,
ListSupportedTimezones=True|False
)
:type Engine: string
:param Engine: The database engine to return.
:type EngineVersion: string
:param EngineVersion: The database engine version to return.
Example: 5.1.49
:type DBParameterGroupFamily: string
:param DBParameterGroupFamily: The name of a specific DB parameter group family to return details for.
Constraints:
Must be 1 to 255 alphanumeric characters
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type Filters: list
:param Filters: Not currently supported.
(dict) --This type is not currently supported.
Name (string) -- [REQUIRED]This parameter is not currently supported.
Values (list) -- [REQUIRED]This parameter is not currently supported.
(string) --
:type MaxRecords: integer
:param MaxRecords: The maximum number of records to include in the response. If more than the MaxRecords value is available, a pagination token called a marker is included in the response so that the following results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker: An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords .
:type DefaultOnly: boolean
:param DefaultOnly: Indicates that only the default version of the specified engine or engine and major version combination is returned.
:type ListSupportedCharacterSets: boolean
:param ListSupportedCharacterSets: If this parameter is specified and the requested engine supports the CharacterSetName parameter for CreateDBInstance , the response includes a list of supported character sets for each engine version.
:type ListSupportedTimezones: boolean
:param ListSupportedTimezones: If this parameter is specified and the requested engine supports the TimeZone parameter for CreateDBInstance , the response includes a list of supported time zones for each engine version.
:rtype: dict
:return: {
'Marker': 'string',
'DBEngineVersions': [
{
'Engine': 'string',
'EngineVersion': 'string',
'DBParameterGroupFamily': 'string',
'DBEngineDescription': 'string',
'DBEngineVersionDescription': 'string',
'DefaultCharacterSet': {
'CharacterSetName': 'string',
'CharacterSetDescription': 'string'
},
'SupportedCharacterSets': [
{
'CharacterSetName': 'string',
'CharacterSetDescription': 'string'
},
],
'ValidUpgradeTarget': [
{
'Engine': 'string',
'EngineVersion': 'string',
'Description': 'string',
'AutoUpgrade': True|False,
'IsMajorVersionUpgrade': True|False
},
],
'SupportedTimezones': [
{
'TimezoneName': 'string'
},
]
},
]
} | entailment |
def describe_reserved_db_instances(ReservedDBInstanceId=None, ReservedDBInstancesOfferingId=None, DBInstanceClass=None, Duration=None, ProductDescription=None, OfferingType=None, MultiAZ=None, Filters=None, MaxRecords=None, Marker=None):
"""
Returns information about reserved DB instances for this account, or about a specified reserved DB instance.
See also: AWS API Documentation
Examples
This example lists information for all reserved DB instances for the specified DB instance class, duration, product, offering type, and availability zone settings.
Expected Output:
:example: response = client.describe_reserved_db_instances(
ReservedDBInstanceId='string',
ReservedDBInstancesOfferingId='string',
DBInstanceClass='string',
Duration='string',
ProductDescription='string',
OfferingType='string',
MultiAZ=True|False,
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
:type ReservedDBInstanceId: string
:param ReservedDBInstanceId: The reserved DB instance identifier filter value. Specify this parameter to show only the reservation that matches the specified reservation ID.
:type ReservedDBInstancesOfferingId: string
:param ReservedDBInstancesOfferingId: The offering identifier filter value. Specify this parameter to show only purchased reservations matching the specified offering identifier.
:type DBInstanceClass: string
:param DBInstanceClass: The DB instance class filter value. Specify this parameter to show only those reservations matching the specified DB instances class.
:type Duration: string
:param Duration: The duration filter value, specified in years or seconds. Specify this parameter to show only reservations for this duration.
Valid Values: 1 | 3 | 31536000 | 94608000
:type ProductDescription: string
:param ProductDescription: The product description filter value. Specify this parameter to show only those reservations matching the specified product description.
:type OfferingType: string
:param OfferingType: The offering type filter value. Specify this parameter to show only the available offerings matching the specified offering type.
Valid Values: 'Partial Upfront' | 'All Upfront' | 'No Upfront'
:type MultiAZ: boolean
:param MultiAZ: The Multi-AZ filter value. Specify this parameter to show only those reservations matching the specified Multi-AZ parameter.
:type Filters: list
:param Filters: This parameter is not currently supported.
(dict) --This type is not currently supported.
Name (string) -- [REQUIRED]This parameter is not currently supported.
Values (list) -- [REQUIRED]This parameter is not currently supported.
(string) --
:type MaxRecords: integer
:param MaxRecords: The maximum number of records to include in the response. If more than the MaxRecords value is available, a pagination token called a marker is included in the response so that the following results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker: An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords .
:rtype: dict
:return: {
'Marker': 'string',
'ReservedDBInstances': [
{
'ReservedDBInstanceId': 'string',
'ReservedDBInstancesOfferingId': 'string',
'DBInstanceClass': 'string',
'StartTime': datetime(2015, 1, 1),
'Duration': 123,
'FixedPrice': 123.0,
'UsagePrice': 123.0,
'CurrencyCode': 'string',
'DBInstanceCount': 123,
'ProductDescription': 'string',
'OfferingType': 'string',
'MultiAZ': True|False,
'State': 'string',
'RecurringCharges': [
{
'RecurringChargeAmount': 123.0,
'RecurringChargeFrequency': 'string'
},
],
'ReservedDBInstanceArn': 'string'
},
]
}
"""
pass | Returns information about reserved DB instances for this account, or about a specified reserved DB instance.
See also: AWS API Documentation
Examples
This example lists information for all reserved DB instances for the specified DB instance class, duration, product, offering type, and availability zone settings.
Expected Output:
:example: response = client.describe_reserved_db_instances(
ReservedDBInstanceId='string',
ReservedDBInstancesOfferingId='string',
DBInstanceClass='string',
Duration='string',
ProductDescription='string',
OfferingType='string',
MultiAZ=True|False,
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
:type ReservedDBInstanceId: string
:param ReservedDBInstanceId: The reserved DB instance identifier filter value. Specify this parameter to show only the reservation that matches the specified reservation ID.
:type ReservedDBInstancesOfferingId: string
:param ReservedDBInstancesOfferingId: The offering identifier filter value. Specify this parameter to show only purchased reservations matching the specified offering identifier.
:type DBInstanceClass: string
:param DBInstanceClass: The DB instance class filter value. Specify this parameter to show only those reservations matching the specified DB instances class.
:type Duration: string
:param Duration: The duration filter value, specified in years or seconds. Specify this parameter to show only reservations for this duration.
Valid Values: 1 | 3 | 31536000 | 94608000
:type ProductDescription: string
:param ProductDescription: The product description filter value. Specify this parameter to show only those reservations matching the specified product description.
:type OfferingType: string
:param OfferingType: The offering type filter value. Specify this parameter to show only the available offerings matching the specified offering type.
Valid Values: 'Partial Upfront' | 'All Upfront' | 'No Upfront'
:type MultiAZ: boolean
:param MultiAZ: The Multi-AZ filter value. Specify this parameter to show only those reservations matching the specified Multi-AZ parameter.
:type Filters: list
:param Filters: This parameter is not currently supported.
(dict) --This type is not currently supported.
Name (string) -- [REQUIRED]This parameter is not currently supported.
Values (list) -- [REQUIRED]This parameter is not currently supported.
(string) --
:type MaxRecords: integer
:param MaxRecords: The maximum number of records to include in the response. If more than the MaxRecords value is available, a pagination token called a marker is included in the response so that the following results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker: An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords .
:rtype: dict
:return: {
'Marker': 'string',
'ReservedDBInstances': [
{
'ReservedDBInstanceId': 'string',
'ReservedDBInstancesOfferingId': 'string',
'DBInstanceClass': 'string',
'StartTime': datetime(2015, 1, 1),
'Duration': 123,
'FixedPrice': 123.0,
'UsagePrice': 123.0,
'CurrencyCode': 'string',
'DBInstanceCount': 123,
'ProductDescription': 'string',
'OfferingType': 'string',
'MultiAZ': True|False,
'State': 'string',
'RecurringCharges': [
{
'RecurringChargeAmount': 123.0,
'RecurringChargeFrequency': 'string'
},
],
'ReservedDBInstanceArn': 'string'
},
]
} | entailment |
def describe_reserved_db_instances_offerings(ReservedDBInstancesOfferingId=None, DBInstanceClass=None, Duration=None, ProductDescription=None, OfferingType=None, MultiAZ=None, Filters=None, MaxRecords=None, Marker=None):
"""
Lists available reserved DB instance offerings.
See also: AWS API Documentation
Examples
This example lists information for all reserved DB instance offerings for the specified DB instance class, duration, product, offering type, and availability zone settings.
Expected Output:
:example: response = client.describe_reserved_db_instances_offerings(
ReservedDBInstancesOfferingId='string',
DBInstanceClass='string',
Duration='string',
ProductDescription='string',
OfferingType='string',
MultiAZ=True|False,
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
:type ReservedDBInstancesOfferingId: string
:param ReservedDBInstancesOfferingId: The offering identifier filter value. Specify this parameter to show only the available offering that matches the specified reservation identifier.
Example: 438012d3-4052-4cc7-b2e3-8d3372e0e706
:type DBInstanceClass: string
:param DBInstanceClass: The DB instance class filter value. Specify this parameter to show only the available offerings matching the specified DB instance class.
:type Duration: string
:param Duration: Duration filter value, specified in years or seconds. Specify this parameter to show only reservations for this duration.
Valid Values: 1 | 3 | 31536000 | 94608000
:type ProductDescription: string
:param ProductDescription: Product description filter value. Specify this parameter to show only the available offerings matching the specified product description.
:type OfferingType: string
:param OfferingType: The offering type filter value. Specify this parameter to show only the available offerings matching the specified offering type.
Valid Values: 'Partial Upfront' | 'All Upfront' | 'No Upfront'
:type MultiAZ: boolean
:param MultiAZ: The Multi-AZ filter value. Specify this parameter to show only the available offerings matching the specified Multi-AZ parameter.
:type Filters: list
:param Filters: This parameter is not currently supported.
(dict) --This type is not currently supported.
Name (string) -- [REQUIRED]This parameter is not currently supported.
Values (list) -- [REQUIRED]This parameter is not currently supported.
(string) --
:type MaxRecords: integer
:param MaxRecords: The maximum number of records to include in the response. If more than the MaxRecords value is available, a pagination token called a marker is included in the response so that the following results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker: An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords .
:rtype: dict
:return: {
'Marker': 'string',
'ReservedDBInstancesOfferings': [
{
'ReservedDBInstancesOfferingId': 'string',
'DBInstanceClass': 'string',
'Duration': 123,
'FixedPrice': 123.0,
'UsagePrice': 123.0,
'CurrencyCode': 'string',
'ProductDescription': 'string',
'OfferingType': 'string',
'MultiAZ': True|False,
'RecurringCharges': [
{
'RecurringChargeAmount': 123.0,
'RecurringChargeFrequency': 'string'
},
]
},
]
}
"""
pass | Lists available reserved DB instance offerings.
See also: AWS API Documentation
Examples
This example lists information for all reserved DB instance offerings for the specified DB instance class, duration, product, offering type, and availability zone settings.
Expected Output:
:example: response = client.describe_reserved_db_instances_offerings(
ReservedDBInstancesOfferingId='string',
DBInstanceClass='string',
Duration='string',
ProductDescription='string',
OfferingType='string',
MultiAZ=True|False,
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxRecords=123,
Marker='string'
)
:type ReservedDBInstancesOfferingId: string
:param ReservedDBInstancesOfferingId: The offering identifier filter value. Specify this parameter to show only the available offering that matches the specified reservation identifier.
Example: 438012d3-4052-4cc7-b2e3-8d3372e0e706
:type DBInstanceClass: string
:param DBInstanceClass: The DB instance class filter value. Specify this parameter to show only the available offerings matching the specified DB instance class.
:type Duration: string
:param Duration: Duration filter value, specified in years or seconds. Specify this parameter to show only reservations for this duration.
Valid Values: 1 | 3 | 31536000 | 94608000
:type ProductDescription: string
:param ProductDescription: Product description filter value. Specify this parameter to show only the available offerings matching the specified product description.
:type OfferingType: string
:param OfferingType: The offering type filter value. Specify this parameter to show only the available offerings matching the specified offering type.
Valid Values: 'Partial Upfront' | 'All Upfront' | 'No Upfront'
:type MultiAZ: boolean
:param MultiAZ: The Multi-AZ filter value. Specify this parameter to show only the available offerings matching the specified Multi-AZ parameter.
:type Filters: list
:param Filters: This parameter is not currently supported.
(dict) --This type is not currently supported.
Name (string) -- [REQUIRED]This parameter is not currently supported.
Values (list) -- [REQUIRED]This parameter is not currently supported.
(string) --
:type MaxRecords: integer
:param MaxRecords: The maximum number of records to include in the response. If more than the MaxRecords value is available, a pagination token called a marker is included in the response so that the following results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
:type Marker: string
:param Marker: An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords .
:rtype: dict
:return: {
'Marker': 'string',
'ReservedDBInstancesOfferings': [
{
'ReservedDBInstancesOfferingId': 'string',
'DBInstanceClass': 'string',
'Duration': 123,
'FixedPrice': 123.0,
'UsagePrice': 123.0,
'CurrencyCode': 'string',
'ProductDescription': 'string',
'OfferingType': 'string',
'MultiAZ': True|False,
'RecurringCharges': [
{
'RecurringChargeAmount': 123.0,
'RecurringChargeFrequency': 'string'
},
]
},
]
} | entailment |
def modify_db_cluster(DBClusterIdentifier=None, NewDBClusterIdentifier=None, ApplyImmediately=None, BackupRetentionPeriod=None, DBClusterParameterGroupName=None, VpcSecurityGroupIds=None, Port=None, MasterUserPassword=None, OptionGroupName=None, PreferredBackupWindow=None, PreferredMaintenanceWindow=None, EnableIAMDatabaseAuthentication=None):
"""
Modify a setting for an Amazon Aurora DB cluster. You can change one or more database configuration parameters by specifying these parameters and the new values in the request. For more information on Amazon Aurora, see Aurora on Amazon RDS in the Amazon RDS User Guide.
See also: AWS API Documentation
Examples
This example changes the specified settings for the specified DB cluster.
Expected Output:
:example: response = client.modify_db_cluster(
DBClusterIdentifier='string',
NewDBClusterIdentifier='string',
ApplyImmediately=True|False,
BackupRetentionPeriod=123,
DBClusterParameterGroupName='string',
VpcSecurityGroupIds=[
'string',
],
Port=123,
MasterUserPassword='string',
OptionGroupName='string',
PreferredBackupWindow='string',
PreferredMaintenanceWindow='string',
EnableIAMDatabaseAuthentication=True|False
)
:type DBClusterIdentifier: string
:param DBClusterIdentifier: [REQUIRED]
The DB cluster identifier for the cluster being modified. This parameter is not case-sensitive.
Constraints:
Must be the identifier for an existing DB cluster.
Must contain from 1 to 63 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
:type NewDBClusterIdentifier: string
:param NewDBClusterIdentifier: The new DB cluster identifier for the DB cluster when renaming a DB cluster. This value is stored as a lowercase string.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
Example: my-cluster2
:type ApplyImmediately: boolean
:param ApplyImmediately: A value that specifies whether the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the PreferredMaintenanceWindow setting for the DB cluster. If this parameter is set to false , changes to the DB cluster are applied during the next maintenance window.
The ApplyImmediately parameter only affects the NewDBClusterIdentifier and MasterUserPassword values. If you set the ApplyImmediately parameter value to false, then changes to the NewDBClusterIdentifier and MasterUserPassword values are applied during the next maintenance window. All other changes are applied immediately, regardless of the value of the ApplyImmediately parameter.
Default: false
:type BackupRetentionPeriod: integer
:param BackupRetentionPeriod: The number of days for which automated backups are retained. You must specify a minimum value of 1.
Default: 1
Constraints:
Must be a value from 1 to 35
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName: The name of the DB cluster parameter group to use for the DB cluster.
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of VPC security groups that the DB cluster will belong to.
(string) --
:type Port: integer
:param Port: The port number on which the DB cluster accepts connections.
Constraints: Value must be 1150-65535
Default: The same port as the original DB cluster.
:type MasterUserPassword: string
:param MasterUserPassword: The new password for the master database user. This password can contain any printable ASCII character except '/', ''', or '@'.
Constraints: Must contain from 8 to 41 characters.
:type OptionGroupName: string
:param OptionGroupName: A value that indicates that the DB cluster should be associated with the specified option group. Changing this parameter does not result in an outage except in the following case, and the change is applied during the next maintenance window unless the ApplyImmediately parameter is set to true for this request. If the parameter change results in an option group that enables OEM, this change can cause a brief (sub-second) period during which new connections are rejected but existing connections are not interrupted.
Permanent options cannot be removed from an option group. The option group cannot be removed from a DB cluster once it is associated with a DB cluster.
:type PreferredBackupWindow: string
:param PreferredBackupWindow: The daily time range during which automated backups are created if automated backups are enabled, using the BackupRetentionPeriod parameter.
Default: A 30-minute window selected at random from an 8-hour block of time per region. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Constraints:
Must be in the format hh24:mi-hh24:mi .
Times should be in Universal Coordinated Time (UTC).
Must not conflict with the preferred maintenance window.
Must be at least 30 minutes.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
Format: ddd:hh24:mi-ddd:hh24:mi
Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: A Boolean value that is true to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.
Default: false
:rtype: dict
:return: {
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
:returns:
CreateDBCluster
DeleteDBCluster
FailoverDBCluster
ModifyDBCluster
RestoreDBClusterFromSnapshot
RestoreDBClusterToPointInTime
"""
pass | Modify a setting for an Amazon Aurora DB cluster. You can change one or more database configuration parameters by specifying these parameters and the new values in the request. For more information on Amazon Aurora, see Aurora on Amazon RDS in the Amazon RDS User Guide.
See also: AWS API Documentation
Examples
This example changes the specified settings for the specified DB cluster.
Expected Output:
:example: response = client.modify_db_cluster(
DBClusterIdentifier='string',
NewDBClusterIdentifier='string',
ApplyImmediately=True|False,
BackupRetentionPeriod=123,
DBClusterParameterGroupName='string',
VpcSecurityGroupIds=[
'string',
],
Port=123,
MasterUserPassword='string',
OptionGroupName='string',
PreferredBackupWindow='string',
PreferredMaintenanceWindow='string',
EnableIAMDatabaseAuthentication=True|False
)
:type DBClusterIdentifier: string
:param DBClusterIdentifier: [REQUIRED]
The DB cluster identifier for the cluster being modified. This parameter is not case-sensitive.
Constraints:
Must be the identifier for an existing DB cluster.
Must contain from 1 to 63 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
:type NewDBClusterIdentifier: string
:param NewDBClusterIdentifier: The new DB cluster identifier for the DB cluster when renaming a DB cluster. This value is stored as a lowercase string.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
Example: my-cluster2
:type ApplyImmediately: boolean
:param ApplyImmediately: A value that specifies whether the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the PreferredMaintenanceWindow setting for the DB cluster. If this parameter is set to false , changes to the DB cluster are applied during the next maintenance window.
The ApplyImmediately parameter only affects the NewDBClusterIdentifier and MasterUserPassword values. If you set the ApplyImmediately parameter value to false, then changes to the NewDBClusterIdentifier and MasterUserPassword values are applied during the next maintenance window. All other changes are applied immediately, regardless of the value of the ApplyImmediately parameter.
Default: false
:type BackupRetentionPeriod: integer
:param BackupRetentionPeriod: The number of days for which automated backups are retained. You must specify a minimum value of 1.
Default: 1
Constraints:
Must be a value from 1 to 35
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName: The name of the DB cluster parameter group to use for the DB cluster.
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of VPC security groups that the DB cluster will belong to.
(string) --
:type Port: integer
:param Port: The port number on which the DB cluster accepts connections.
Constraints: Value must be 1150-65535
Default: The same port as the original DB cluster.
:type MasterUserPassword: string
:param MasterUserPassword: The new password for the master database user. This password can contain any printable ASCII character except '/', ''', or '@'.
Constraints: Must contain from 8 to 41 characters.
:type OptionGroupName: string
:param OptionGroupName: A value that indicates that the DB cluster should be associated with the specified option group. Changing this parameter does not result in an outage except in the following case, and the change is applied during the next maintenance window unless the ApplyImmediately parameter is set to true for this request. If the parameter change results in an option group that enables OEM, this change can cause a brief (sub-second) period during which new connections are rejected but existing connections are not interrupted.
Permanent options cannot be removed from an option group. The option group cannot be removed from a DB cluster once it is associated with a DB cluster.
:type PreferredBackupWindow: string
:param PreferredBackupWindow: The daily time range during which automated backups are created if automated backups are enabled, using the BackupRetentionPeriod parameter.
Default: A 30-minute window selected at random from an 8-hour block of time per region. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Constraints:
Must be in the format hh24:mi-hh24:mi .
Times should be in Universal Coordinated Time (UTC).
Must not conflict with the preferred maintenance window.
Must be at least 30 minutes.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
Format: ddd:hh24:mi-ddd:hh24:mi
Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: A Boolean value that is true to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.
Default: false
:rtype: dict
:return: {
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
:returns:
CreateDBCluster
DeleteDBCluster
FailoverDBCluster
ModifyDBCluster
RestoreDBClusterFromSnapshot
RestoreDBClusterToPointInTime | entailment |
def modify_db_instance(DBInstanceIdentifier=None, AllocatedStorage=None, DBInstanceClass=None, DBSubnetGroupName=None, DBSecurityGroups=None, VpcSecurityGroupIds=None, ApplyImmediately=None, MasterUserPassword=None, DBParameterGroupName=None, BackupRetentionPeriod=None, PreferredBackupWindow=None, PreferredMaintenanceWindow=None, MultiAZ=None, EngineVersion=None, AllowMajorVersionUpgrade=None, AutoMinorVersionUpgrade=None, LicenseModel=None, Iops=None, OptionGroupName=None, NewDBInstanceIdentifier=None, StorageType=None, TdeCredentialArn=None, TdeCredentialPassword=None, CACertificateIdentifier=None, Domain=None, CopyTagsToSnapshot=None, MonitoringInterval=None, DBPortNumber=None, PubliclyAccessible=None, MonitoringRoleArn=None, DomainIAMRoleName=None, PromotionTier=None, EnableIAMDatabaseAuthentication=None):
"""
Modifies settings for a DB instance. You can change one or more database configuration parameters by specifying these parameters and the new values in the request.
See also: AWS API Documentation
Examples
This example immediately changes the specified settings for the specified DB instance.
Expected Output:
:example: response = client.modify_db_instance(
DBInstanceIdentifier='string',
AllocatedStorage=123,
DBInstanceClass='string',
DBSubnetGroupName='string',
DBSecurityGroups=[
'string',
],
VpcSecurityGroupIds=[
'string',
],
ApplyImmediately=True|False,
MasterUserPassword='string',
DBParameterGroupName='string',
BackupRetentionPeriod=123,
PreferredBackupWindow='string',
PreferredMaintenanceWindow='string',
MultiAZ=True|False,
EngineVersion='string',
AllowMajorVersionUpgrade=True|False,
AutoMinorVersionUpgrade=True|False,
LicenseModel='string',
Iops=123,
OptionGroupName='string',
NewDBInstanceIdentifier='string',
StorageType='string',
TdeCredentialArn='string',
TdeCredentialPassword='string',
CACertificateIdentifier='string',
Domain='string',
CopyTagsToSnapshot=True|False,
MonitoringInterval=123,
DBPortNumber=123,
PubliclyAccessible=True|False,
MonitoringRoleArn='string',
DomainIAMRoleName='string',
PromotionTier=123,
EnableIAMDatabaseAuthentication=True|False
)
:type DBInstanceIdentifier: string
:param DBInstanceIdentifier: [REQUIRED]
The DB instance identifier. This value is stored as a lowercase string.
Constraints:
Must be the identifier for an existing DB instance
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type AllocatedStorage: integer
:param AllocatedStorage: The new storage capacity of the RDS instance. Changing this setting does not result in an outage and the change is applied during the next maintenance window unless ApplyImmediately is set to true for this request.
MySQL
Default: Uses existing setting
Valid Values: 5-6144
Constraints: Value supplied must be at least 10% greater than the current value. Values that are not at least 10% greater than the existing value are rounded up so that they are 10% greater than the current value.
Type: Integer
MariaDB
Default: Uses existing setting
Valid Values: 5-6144
Constraints: Value supplied must be at least 10% greater than the current value. Values that are not at least 10% greater than the existing value are rounded up so that they are 10% greater than the current value.
Type: Integer
PostgreSQL
Default: Uses existing setting
Valid Values: 5-6144
Constraints: Value supplied must be at least 10% greater than the current value. Values that are not at least 10% greater than the existing value are rounded up so that they are 10% greater than the current value.
Type: Integer
Oracle
Default: Uses existing setting
Valid Values: 10-6144
Constraints: Value supplied must be at least 10% greater than the current value. Values that are not at least 10% greater than the existing value are rounded up so that they are 10% greater than the current value.
SQL Server
Cannot be modified.
If you choose to migrate your DB instance from using standard storage to using Provisioned IOPS, or from using Provisioned IOPS to using standard storage, the process can take time. The duration of the migration depends on several factors such as database load, storage size, storage type (standard or Provisioned IOPS), amount of IOPS provisioned (if any), and the number of prior scale storage operations. Typical migration times are under 24 hours, but the process can take up to several days in some cases. During the migration, the DB instance will be available for use, but might experience performance degradation. While the migration takes place, nightly backups for the instance will be suspended. No other Amazon RDS operations can take place for the instance, including modifying the instance, rebooting the instance, deleting the instance, creating a Read Replica for the instance, and creating a DB snapshot of the instance.
:type DBInstanceClass: string
:param DBInstanceClass: The new compute and memory capacity of the DB instance. To determine the instance classes that are available for a particular DB engine, use the DescribeOrderableDBInstanceOptions action. Note that not all instance classes are available in all regions for all DB engines.
Passing a value for this setting causes an outage during the change and is applied during the next maintenance window, unless ApplyImmediately is specified as true for this request.
Default: Uses existing setting
Valid Values: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.xlarge | db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large | db.m3.xlarge | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium | db.t2.large
:type DBSubnetGroupName: string
:param DBSubnetGroupName: The new DB subnet group for the DB instance. You can use this parameter to move your DB instance to a different VPC. If your DB instance is not in a VPC, you can also use this parameter to move your DB instance into a VPC. For more information, see Updating the VPC for a DB Instance .
Changing the subnet group causes an outage during the change. The change is applied during the next maintenance window, unless you specify true for the ApplyImmediately parameter.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens.
Example: mySubnetGroup
:type DBSecurityGroups: list
:param DBSecurityGroups: A list of DB security groups to authorize on this DB instance. Changing this setting does not result in an outage and the change is asynchronously applied as soon as possible.
Constraints:
Must be 1 to 255 alphanumeric characters
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
(string) --
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of EC2 VPC security groups to authorize on this DB instance. This change is asynchronously applied as soon as possible.
Constraints:
Must be 1 to 255 alphanumeric characters
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
(string) --
:type ApplyImmediately: boolean
:param ApplyImmediately: Specifies whether the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the PreferredMaintenanceWindow setting for the DB instance.
If this parameter is set to false , changes to the DB instance are applied during the next maintenance window. Some parameter changes can cause an outage and will be applied on the next call to RebootDBInstance , or the next failure reboot. Review the table of parameters in Modifying a DB Instance and Using the Apply Immediately Parameter to see the impact that setting ApplyImmediately to true or false has for each modified parameter and to determine when the changes will be applied.
Default: false
:type MasterUserPassword: string
:param MasterUserPassword: The new password for the DB instance master user. Can be any printable ASCII character except '/', ''', or '@'.
Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible. Between the time of the request and the completion of the request, the MasterUserPassword element exists in the PendingModifiedValues element of the operation response.
Default: Uses existing setting
Constraints: Must be 8 to 41 alphanumeric characters (MySQL, MariaDB, and Amazon Aurora), 8 to 30 alphanumeric characters (Oracle), or 8 to 128 alphanumeric characters (SQL Server).
Note
Amazon RDS API actions never return the password, so this action provides a way to regain access to a primary instance user if the password is lost. This includes restoring privileges that might have been accidentally revoked.
:type DBParameterGroupName: string
:param DBParameterGroupName: The name of the DB parameter group to apply to the DB instance. Changing this setting does not result in an outage. The parameter group name itself is changed immediately, but the actual parameter changes are not applied until you reboot the instance without failover. The db instance will NOT be rebooted automatically and the parameter changes will NOT be applied during the next maintenance window.
Default: Uses existing setting
Constraints: The DB parameter group must be in the same DB parameter group family as this DB instance.
:type BackupRetentionPeriod: integer
:param BackupRetentionPeriod: The number of days to retain automated backups. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups.
Changing this parameter can result in an outage if you change from 0 to a non-zero value or from a non-zero value to 0. These changes are applied during the next maintenance window unless the ApplyImmediately parameter is set to true for this request. If you change the parameter from one non-zero value to another non-zero value, the change is asynchronously applied as soon as possible.
Default: Uses existing setting
Constraints:
Must be a value from 0 to 35
Can be specified for a MySQL Read Replica only if the source is running MySQL 5.6
Can be specified for a PostgreSQL Read Replica only if the source is running PostgreSQL 9.3.5
Cannot be set to 0 if the DB instance is a source to Read Replicas
:type PreferredBackupWindow: string
:param PreferredBackupWindow: The daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod parameter. Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible.
Constraints:
Must be in the format hh24:mi-hh24:mi
Times should be in Universal Time Coordinated (UTC)
Must not conflict with the preferred maintenance window
Must be at least 30 minutes
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage. Changing this parameter does not result in an outage, except in the following situation, and the change is asynchronously applied as soon as possible. If there are pending actions that cause a reboot, and the maintenance window is changed to include the current time, then changing this parameter will cause a reboot of the DB instance. If moving this window to the current time, there must be at least 30 minutes between the current time and end of the window to ensure pending changes are applied.
Default: Uses existing setting
Format: ddd:hh24:mi-ddd:hh24:mi
Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
Constraints: Must be at least 30 minutes
:type MultiAZ: boolean
:param MultiAZ: Specifies if the DB instance is a Multi-AZ deployment. Changing this parameter does not result in an outage and the change is applied during the next maintenance window unless the ApplyImmediately parameter is set to true for this request.
Constraints: Cannot be specified if the DB instance is a Read Replica.
:type EngineVersion: string
:param EngineVersion: The version number of the database engine to upgrade to. Changing this parameter results in an outage and the change is applied during the next maintenance window unless the ApplyImmediately parameter is set to true for this request.
For major version upgrades, if a non-default DB parameter group is currently in use, a new DB parameter group in the DB parameter group family for the new engine version must be specified. The new DB parameter group can be the default for that DB parameter group family.
For a list of valid engine versions, see CreateDBInstance .
:type AllowMajorVersionUpgrade: boolean
:param AllowMajorVersionUpgrade: Indicates that major version upgrades are allowed. Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible.
Constraints: This parameter must be set to true when specifying a value for the EngineVersion parameter that is a different major version than the DB instance's current version.
:type AutoMinorVersionUpgrade: boolean
:param AutoMinorVersionUpgrade: Indicates that minor version upgrades will be applied automatically to the DB instance during the maintenance window. Changing this parameter does not result in an outage except in the following case and the change is asynchronously applied as soon as possible. An outage will result if this parameter is set to true during the maintenance window, and a newer minor version is available, and RDS has enabled auto patching for that engine version.
:type LicenseModel: string
:param LicenseModel: The license model for the DB instance.
Valid values: license-included | bring-your-own-license | general-public-license
:type Iops: integer
:param Iops: The new Provisioned IOPS (I/O operations per second) value for the RDS instance. Changing this setting does not result in an outage and the change is applied during the next maintenance window unless the ApplyImmediately parameter is set to true for this request.
Default: Uses existing setting
Constraints: Value supplied must be at least 10% greater than the current value. Values that are not at least 10% greater than the existing value are rounded up so that they are 10% greater than the current value. If you are migrating from Provisioned IOPS to standard storage, set this value to 0. The DB instance will require a reboot for the change in storage type to take effect.
SQL Server
Setting the IOPS value for the SQL Server database engine is not supported.
Type: Integer
If you choose to migrate your DB instance from using standard storage to using Provisioned IOPS, or from using Provisioned IOPS to using standard storage, the process can take time. The duration of the migration depends on several factors such as database load, storage size, storage type (standard or Provisioned IOPS), amount of IOPS provisioned (if any), and the number of prior scale storage operations. Typical migration times are under 24 hours, but the process can take up to several days in some cases. During the migration, the DB instance will be available for use, but might experience performance degradation. While the migration takes place, nightly backups for the instance will be suspended. No other Amazon RDS operations can take place for the instance, including modifying the instance, rebooting the instance, deleting the instance, creating a Read Replica for the instance, and creating a DB snapshot of the instance.
:type OptionGroupName: string
:param OptionGroupName: Indicates that the DB instance should be associated with the specified option group. Changing this parameter does not result in an outage except in the following case and the change is applied during the next maintenance window unless the ApplyImmediately parameter is set to true for this request. If the parameter change results in an option group that enables OEM, this change can cause a brief (sub-second) period during which new connections are rejected but existing connections are not interrupted.
Permanent options, such as the TDE option for Oracle Advanced Security TDE, cannot be removed from an option group, and that option group cannot be removed from a DB instance once it is associated with a DB instance
:type NewDBInstanceIdentifier: string
:param NewDBInstanceIdentifier: The new DB instance identifier for the DB instance when renaming a DB instance. When you change the DB instance identifier, an instance reboot will occur immediately if you set Apply Immediately to true, or will occur during the next maintenance window if Apply Immediately to false. This value is stored as a lowercase string.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type StorageType: string
:param StorageType: Specifies the storage type to be associated with the DB instance.
Valid values: standard | gp2 | io1
If you specify io1 , you must also include a value for the Iops parameter.
Default: io1 if the Iops parameter is specified; otherwise standard
:type TdeCredentialArn: string
:param TdeCredentialArn: The ARN from the Key Store with which to associate the instance for TDE encryption.
:type TdeCredentialPassword: string
:param TdeCredentialPassword: The password for the given ARN from the Key Store in order to access the device.
:type CACertificateIdentifier: string
:param CACertificateIdentifier: Indicates the certificate that needs to be associated with the instance.
:type Domain: string
:param Domain: The Active Directory Domain to move the instance to. Specify none to remove the instance from its current domain. The domain must be created prior to this operation. Currently only a Microsoft SQL Server instance can be created in a Active Directory Domain.
:type CopyTagsToSnapshot: boolean
:param CopyTagsToSnapshot: True to copy all tags from the DB instance to snapshots of the DB instance; otherwise false. The default is false.
:type MonitoringInterval: integer
:param MonitoringInterval: The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0.
If MonitoringRoleArn is specified, then you must also set MonitoringInterval to a value other than 0.
Valid Values: 0, 1, 5, 10, 15, 30, 60
:type DBPortNumber: integer
:param DBPortNumber: The port number on which the database accepts connections.
The value of the DBPortNumber parameter must not match any of the port values specified for options in the option group for the DB instance.
Your database will restart when you change the DBPortNumber value regardless of the value of the ApplyImmediately parameter.
MySQL
Default: 3306
Valid Values: 1150-65535
MariaDB
Default: 3306
Valid Values: 1150-65535
PostgreSQL
Default: 5432
Valid Values: 1150-65535
Type: Integer
Oracle
Default: 1521
Valid Values: 1150-65535
SQL Server
Default: 1433
Valid Values: 1150-65535 except for 1434 , 3389 , 47001 , 49152 , and 49152 through 49156 .
Amazon Aurora
Default: 3306
Valid Values: 1150-65535
:type PubliclyAccessible: boolean
:param PubliclyAccessible: Boolean value that indicates if the DB instance has a publicly resolvable DNS name. Set to True to make the DB instance Internet-facing with a publicly resolvable DNS name, which resolves to a public IP address. Set to False to make the DB instance internal with a DNS name that resolves to a private IP address.
PubliclyAccessible only applies to DB instances in a VPC. The DB instance must be part of a public subnet and PubliclyAccessible must be true in order for it to be publicly accessible.
Changes to the PubliclyAccessible parameter are applied immediately regardless of the value of the ApplyImmediately parameter.
Default: false
:type MonitoringRoleArn: string
:param MonitoringRoleArn: The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess . For information on creating a monitoring role, go to To create an IAM role for Amazon RDS Enhanced Monitoring .
If MonitoringInterval is set to a value other than 0, then you must supply a MonitoringRoleArn value.
:type DomainIAMRoleName: string
:param DomainIAMRoleName: The name of the IAM role to use when making API calls to the Directory Service.
:type PromotionTier: integer
:param PromotionTier: A value that specifies the order in which an Aurora Replica is promoted to the primary instance after a failure of the existing primary instance. For more information, see Fault Tolerance for an Aurora DB Cluster .
Default: 1
Valid Values: 0 - 15
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts; otherwise false.
You can enable IAM database authentication for the following database engines
For MySQL 5.6, minor version 5.6.34 or higher
For MySQL 5.7, minor version 5.7.16 or higher
Default: false
:rtype: dict
:return: {
'DBInstance': {
'DBInstanceIdentifier': 'string',
'DBInstanceClass': 'string',
'Engine': 'string',
'DBInstanceStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123,
'HostedZoneId': 'string'
},
'AllocatedStorage': 123,
'InstanceCreateTime': datetime(2015, 1, 1),
'PreferredBackupWindow': 'string',
'BackupRetentionPeriod': 123,
'DBSecurityGroups': [
{
'DBSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'ParameterApplyStatus': 'string'
},
],
'AvailabilityZone': 'string',
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'DBInstanceClass': 'string',
'AllocatedStorage': 123,
'MasterUserPassword': 'string',
'Port': 123,
'BackupRetentionPeriod': 123,
'MultiAZ': True|False,
'EngineVersion': 'string',
'LicenseModel': 'string',
'Iops': 123,
'DBInstanceIdentifier': 'string',
'StorageType': 'string',
'CACertificateIdentifier': 'string',
'DBSubnetGroupName': 'string'
},
'LatestRestorableTime': datetime(2015, 1, 1),
'MultiAZ': True|False,
'EngineVersion': 'string',
'AutoMinorVersionUpgrade': True|False,
'ReadReplicaSourceDBInstanceIdentifier': 'string',
'ReadReplicaDBInstanceIdentifiers': [
'string',
],
'ReadReplicaDBClusterIdentifiers': [
'string',
],
'LicenseModel': 'string',
'Iops': 123,
'OptionGroupMemberships': [
{
'OptionGroupName': 'string',
'Status': 'string'
},
],
'CharacterSetName': 'string',
'SecondaryAvailabilityZone': 'string',
'PubliclyAccessible': True|False,
'StatusInfos': [
{
'StatusType': 'string',
'Normal': True|False,
'Status': 'string',
'Message': 'string'
},
],
'StorageType': 'string',
'TdeCredentialArn': 'string',
'DbInstancePort': 123,
'DBClusterIdentifier': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbiResourceId': 'string',
'CACertificateIdentifier': 'string',
'DomainMemberships': [
{
'Domain': 'string',
'Status': 'string',
'FQDN': 'string',
'IAMRoleName': 'string'
},
],
'CopyTagsToSnapshot': True|False,
'MonitoringInterval': 123,
'EnhancedMonitoringResourceArn': 'string',
'MonitoringRoleArn': 'string',
'PromotionTier': 123,
'DBInstanceArn': 'string',
'Timezone': 'string',
'IAMDatabaseAuthenticationEnabled': True|False
}
}
:returns:
CreateDBInstance
DeleteDBInstance
ModifyDBInstance
"""
pass | Modifies settings for a DB instance. You can change one or more database configuration parameters by specifying these parameters and the new values in the request.
See also: AWS API Documentation
Examples
This example immediately changes the specified settings for the specified DB instance.
Expected Output:
:example: response = client.modify_db_instance(
DBInstanceIdentifier='string',
AllocatedStorage=123,
DBInstanceClass='string',
DBSubnetGroupName='string',
DBSecurityGroups=[
'string',
],
VpcSecurityGroupIds=[
'string',
],
ApplyImmediately=True|False,
MasterUserPassword='string',
DBParameterGroupName='string',
BackupRetentionPeriod=123,
PreferredBackupWindow='string',
PreferredMaintenanceWindow='string',
MultiAZ=True|False,
EngineVersion='string',
AllowMajorVersionUpgrade=True|False,
AutoMinorVersionUpgrade=True|False,
LicenseModel='string',
Iops=123,
OptionGroupName='string',
NewDBInstanceIdentifier='string',
StorageType='string',
TdeCredentialArn='string',
TdeCredentialPassword='string',
CACertificateIdentifier='string',
Domain='string',
CopyTagsToSnapshot=True|False,
MonitoringInterval=123,
DBPortNumber=123,
PubliclyAccessible=True|False,
MonitoringRoleArn='string',
DomainIAMRoleName='string',
PromotionTier=123,
EnableIAMDatabaseAuthentication=True|False
)
:type DBInstanceIdentifier: string
:param DBInstanceIdentifier: [REQUIRED]
The DB instance identifier. This value is stored as a lowercase string.
Constraints:
Must be the identifier for an existing DB instance
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type AllocatedStorage: integer
:param AllocatedStorage: The new storage capacity of the RDS instance. Changing this setting does not result in an outage and the change is applied during the next maintenance window unless ApplyImmediately is set to true for this request.
MySQL
Default: Uses existing setting
Valid Values: 5-6144
Constraints: Value supplied must be at least 10% greater than the current value. Values that are not at least 10% greater than the existing value are rounded up so that they are 10% greater than the current value.
Type: Integer
MariaDB
Default: Uses existing setting
Valid Values: 5-6144
Constraints: Value supplied must be at least 10% greater than the current value. Values that are not at least 10% greater than the existing value are rounded up so that they are 10% greater than the current value.
Type: Integer
PostgreSQL
Default: Uses existing setting
Valid Values: 5-6144
Constraints: Value supplied must be at least 10% greater than the current value. Values that are not at least 10% greater than the existing value are rounded up so that they are 10% greater than the current value.
Type: Integer
Oracle
Default: Uses existing setting
Valid Values: 10-6144
Constraints: Value supplied must be at least 10% greater than the current value. Values that are not at least 10% greater than the existing value are rounded up so that they are 10% greater than the current value.
SQL Server
Cannot be modified.
If you choose to migrate your DB instance from using standard storage to using Provisioned IOPS, or from using Provisioned IOPS to using standard storage, the process can take time. The duration of the migration depends on several factors such as database load, storage size, storage type (standard or Provisioned IOPS), amount of IOPS provisioned (if any), and the number of prior scale storage operations. Typical migration times are under 24 hours, but the process can take up to several days in some cases. During the migration, the DB instance will be available for use, but might experience performance degradation. While the migration takes place, nightly backups for the instance will be suspended. No other Amazon RDS operations can take place for the instance, including modifying the instance, rebooting the instance, deleting the instance, creating a Read Replica for the instance, and creating a DB snapshot of the instance.
:type DBInstanceClass: string
:param DBInstanceClass: The new compute and memory capacity of the DB instance. To determine the instance classes that are available for a particular DB engine, use the DescribeOrderableDBInstanceOptions action. Note that not all instance classes are available in all regions for all DB engines.
Passing a value for this setting causes an outage during the change and is applied during the next maintenance window, unless ApplyImmediately is specified as true for this request.
Default: Uses existing setting
Valid Values: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.xlarge | db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large | db.m3.xlarge | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium | db.t2.large
:type DBSubnetGroupName: string
:param DBSubnetGroupName: The new DB subnet group for the DB instance. You can use this parameter to move your DB instance to a different VPC. If your DB instance is not in a VPC, you can also use this parameter to move your DB instance into a VPC. For more information, see Updating the VPC for a DB Instance .
Changing the subnet group causes an outage during the change. The change is applied during the next maintenance window, unless you specify true for the ApplyImmediately parameter.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens.
Example: mySubnetGroup
:type DBSecurityGroups: list
:param DBSecurityGroups: A list of DB security groups to authorize on this DB instance. Changing this setting does not result in an outage and the change is asynchronously applied as soon as possible.
Constraints:
Must be 1 to 255 alphanumeric characters
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
(string) --
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of EC2 VPC security groups to authorize on this DB instance. This change is asynchronously applied as soon as possible.
Constraints:
Must be 1 to 255 alphanumeric characters
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
(string) --
:type ApplyImmediately: boolean
:param ApplyImmediately: Specifies whether the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the PreferredMaintenanceWindow setting for the DB instance.
If this parameter is set to false , changes to the DB instance are applied during the next maintenance window. Some parameter changes can cause an outage and will be applied on the next call to RebootDBInstance , or the next failure reboot. Review the table of parameters in Modifying a DB Instance and Using the Apply Immediately Parameter to see the impact that setting ApplyImmediately to true or false has for each modified parameter and to determine when the changes will be applied.
Default: false
:type MasterUserPassword: string
:param MasterUserPassword: The new password for the DB instance master user. Can be any printable ASCII character except '/', ''', or '@'.
Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible. Between the time of the request and the completion of the request, the MasterUserPassword element exists in the PendingModifiedValues element of the operation response.
Default: Uses existing setting
Constraints: Must be 8 to 41 alphanumeric characters (MySQL, MariaDB, and Amazon Aurora), 8 to 30 alphanumeric characters (Oracle), or 8 to 128 alphanumeric characters (SQL Server).
Note
Amazon RDS API actions never return the password, so this action provides a way to regain access to a primary instance user if the password is lost. This includes restoring privileges that might have been accidentally revoked.
:type DBParameterGroupName: string
:param DBParameterGroupName: The name of the DB parameter group to apply to the DB instance. Changing this setting does not result in an outage. The parameter group name itself is changed immediately, but the actual parameter changes are not applied until you reboot the instance without failover. The db instance will NOT be rebooted automatically and the parameter changes will NOT be applied during the next maintenance window.
Default: Uses existing setting
Constraints: The DB parameter group must be in the same DB parameter group family as this DB instance.
:type BackupRetentionPeriod: integer
:param BackupRetentionPeriod: The number of days to retain automated backups. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups.
Changing this parameter can result in an outage if you change from 0 to a non-zero value or from a non-zero value to 0. These changes are applied during the next maintenance window unless the ApplyImmediately parameter is set to true for this request. If you change the parameter from one non-zero value to another non-zero value, the change is asynchronously applied as soon as possible.
Default: Uses existing setting
Constraints:
Must be a value from 0 to 35
Can be specified for a MySQL Read Replica only if the source is running MySQL 5.6
Can be specified for a PostgreSQL Read Replica only if the source is running PostgreSQL 9.3.5
Cannot be set to 0 if the DB instance is a source to Read Replicas
:type PreferredBackupWindow: string
:param PreferredBackupWindow: The daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod parameter. Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible.
Constraints:
Must be in the format hh24:mi-hh24:mi
Times should be in Universal Time Coordinated (UTC)
Must not conflict with the preferred maintenance window
Must be at least 30 minutes
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage. Changing this parameter does not result in an outage, except in the following situation, and the change is asynchronously applied as soon as possible. If there are pending actions that cause a reboot, and the maintenance window is changed to include the current time, then changing this parameter will cause a reboot of the DB instance. If moving this window to the current time, there must be at least 30 minutes between the current time and end of the window to ensure pending changes are applied.
Default: Uses existing setting
Format: ddd:hh24:mi-ddd:hh24:mi
Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun
Constraints: Must be at least 30 minutes
:type MultiAZ: boolean
:param MultiAZ: Specifies if the DB instance is a Multi-AZ deployment. Changing this parameter does not result in an outage and the change is applied during the next maintenance window unless the ApplyImmediately parameter is set to true for this request.
Constraints: Cannot be specified if the DB instance is a Read Replica.
:type EngineVersion: string
:param EngineVersion: The version number of the database engine to upgrade to. Changing this parameter results in an outage and the change is applied during the next maintenance window unless the ApplyImmediately parameter is set to true for this request.
For major version upgrades, if a non-default DB parameter group is currently in use, a new DB parameter group in the DB parameter group family for the new engine version must be specified. The new DB parameter group can be the default for that DB parameter group family.
For a list of valid engine versions, see CreateDBInstance .
:type AllowMajorVersionUpgrade: boolean
:param AllowMajorVersionUpgrade: Indicates that major version upgrades are allowed. Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible.
Constraints: This parameter must be set to true when specifying a value for the EngineVersion parameter that is a different major version than the DB instance's current version.
:type AutoMinorVersionUpgrade: boolean
:param AutoMinorVersionUpgrade: Indicates that minor version upgrades will be applied automatically to the DB instance during the maintenance window. Changing this parameter does not result in an outage except in the following case and the change is asynchronously applied as soon as possible. An outage will result if this parameter is set to true during the maintenance window, and a newer minor version is available, and RDS has enabled auto patching for that engine version.
:type LicenseModel: string
:param LicenseModel: The license model for the DB instance.
Valid values: license-included | bring-your-own-license | general-public-license
:type Iops: integer
:param Iops: The new Provisioned IOPS (I/O operations per second) value for the RDS instance. Changing this setting does not result in an outage and the change is applied during the next maintenance window unless the ApplyImmediately parameter is set to true for this request.
Default: Uses existing setting
Constraints: Value supplied must be at least 10% greater than the current value. Values that are not at least 10% greater than the existing value are rounded up so that they are 10% greater than the current value. If you are migrating from Provisioned IOPS to standard storage, set this value to 0. The DB instance will require a reboot for the change in storage type to take effect.
SQL Server
Setting the IOPS value for the SQL Server database engine is not supported.
Type: Integer
If you choose to migrate your DB instance from using standard storage to using Provisioned IOPS, or from using Provisioned IOPS to using standard storage, the process can take time. The duration of the migration depends on several factors such as database load, storage size, storage type (standard or Provisioned IOPS), amount of IOPS provisioned (if any), and the number of prior scale storage operations. Typical migration times are under 24 hours, but the process can take up to several days in some cases. During the migration, the DB instance will be available for use, but might experience performance degradation. While the migration takes place, nightly backups for the instance will be suspended. No other Amazon RDS operations can take place for the instance, including modifying the instance, rebooting the instance, deleting the instance, creating a Read Replica for the instance, and creating a DB snapshot of the instance.
:type OptionGroupName: string
:param OptionGroupName: Indicates that the DB instance should be associated with the specified option group. Changing this parameter does not result in an outage except in the following case and the change is applied during the next maintenance window unless the ApplyImmediately parameter is set to true for this request. If the parameter change results in an option group that enables OEM, this change can cause a brief (sub-second) period during which new connections are rejected but existing connections are not interrupted.
Permanent options, such as the TDE option for Oracle Advanced Security TDE, cannot be removed from an option group, and that option group cannot be removed from a DB instance once it is associated with a DB instance
:type NewDBInstanceIdentifier: string
:param NewDBInstanceIdentifier: The new DB instance identifier for the DB instance when renaming a DB instance. When you change the DB instance identifier, an instance reboot will occur immediately if you set Apply Immediately to true, or will occur during the next maintenance window if Apply Immediately to false. This value is stored as a lowercase string.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type StorageType: string
:param StorageType: Specifies the storage type to be associated with the DB instance.
Valid values: standard | gp2 | io1
If you specify io1 , you must also include a value for the Iops parameter.
Default: io1 if the Iops parameter is specified; otherwise standard
:type TdeCredentialArn: string
:param TdeCredentialArn: The ARN from the Key Store with which to associate the instance for TDE encryption.
:type TdeCredentialPassword: string
:param TdeCredentialPassword: The password for the given ARN from the Key Store in order to access the device.
:type CACertificateIdentifier: string
:param CACertificateIdentifier: Indicates the certificate that needs to be associated with the instance.
:type Domain: string
:param Domain: The Active Directory Domain to move the instance to. Specify none to remove the instance from its current domain. The domain must be created prior to this operation. Currently only a Microsoft SQL Server instance can be created in a Active Directory Domain.
:type CopyTagsToSnapshot: boolean
:param CopyTagsToSnapshot: True to copy all tags from the DB instance to snapshots of the DB instance; otherwise false. The default is false.
:type MonitoringInterval: integer
:param MonitoringInterval: The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0.
If MonitoringRoleArn is specified, then you must also set MonitoringInterval to a value other than 0.
Valid Values: 0, 1, 5, 10, 15, 30, 60
:type DBPortNumber: integer
:param DBPortNumber: The port number on which the database accepts connections.
The value of the DBPortNumber parameter must not match any of the port values specified for options in the option group for the DB instance.
Your database will restart when you change the DBPortNumber value regardless of the value of the ApplyImmediately parameter.
MySQL
Default: 3306
Valid Values: 1150-65535
MariaDB
Default: 3306
Valid Values: 1150-65535
PostgreSQL
Default: 5432
Valid Values: 1150-65535
Type: Integer
Oracle
Default: 1521
Valid Values: 1150-65535
SQL Server
Default: 1433
Valid Values: 1150-65535 except for 1434 , 3389 , 47001 , 49152 , and 49152 through 49156 .
Amazon Aurora
Default: 3306
Valid Values: 1150-65535
:type PubliclyAccessible: boolean
:param PubliclyAccessible: Boolean value that indicates if the DB instance has a publicly resolvable DNS name. Set to True to make the DB instance Internet-facing with a publicly resolvable DNS name, which resolves to a public IP address. Set to False to make the DB instance internal with a DNS name that resolves to a private IP address.
PubliclyAccessible only applies to DB instances in a VPC. The DB instance must be part of a public subnet and PubliclyAccessible must be true in order for it to be publicly accessible.
Changes to the PubliclyAccessible parameter are applied immediately regardless of the value of the ApplyImmediately parameter.
Default: false
:type MonitoringRoleArn: string
:param MonitoringRoleArn: The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess . For information on creating a monitoring role, go to To create an IAM role for Amazon RDS Enhanced Monitoring .
If MonitoringInterval is set to a value other than 0, then you must supply a MonitoringRoleArn value.
:type DomainIAMRoleName: string
:param DomainIAMRoleName: The name of the IAM role to use when making API calls to the Directory Service.
:type PromotionTier: integer
:param PromotionTier: A value that specifies the order in which an Aurora Replica is promoted to the primary instance after a failure of the existing primary instance. For more information, see Fault Tolerance for an Aurora DB Cluster .
Default: 1
Valid Values: 0 - 15
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts; otherwise false.
You can enable IAM database authentication for the following database engines
For MySQL 5.6, minor version 5.6.34 or higher
For MySQL 5.7, minor version 5.7.16 or higher
Default: false
:rtype: dict
:return: {
'DBInstance': {
'DBInstanceIdentifier': 'string',
'DBInstanceClass': 'string',
'Engine': 'string',
'DBInstanceStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123,
'HostedZoneId': 'string'
},
'AllocatedStorage': 123,
'InstanceCreateTime': datetime(2015, 1, 1),
'PreferredBackupWindow': 'string',
'BackupRetentionPeriod': 123,
'DBSecurityGroups': [
{
'DBSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'ParameterApplyStatus': 'string'
},
],
'AvailabilityZone': 'string',
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'DBInstanceClass': 'string',
'AllocatedStorage': 123,
'MasterUserPassword': 'string',
'Port': 123,
'BackupRetentionPeriod': 123,
'MultiAZ': True|False,
'EngineVersion': 'string',
'LicenseModel': 'string',
'Iops': 123,
'DBInstanceIdentifier': 'string',
'StorageType': 'string',
'CACertificateIdentifier': 'string',
'DBSubnetGroupName': 'string'
},
'LatestRestorableTime': datetime(2015, 1, 1),
'MultiAZ': True|False,
'EngineVersion': 'string',
'AutoMinorVersionUpgrade': True|False,
'ReadReplicaSourceDBInstanceIdentifier': 'string',
'ReadReplicaDBInstanceIdentifiers': [
'string',
],
'ReadReplicaDBClusterIdentifiers': [
'string',
],
'LicenseModel': 'string',
'Iops': 123,
'OptionGroupMemberships': [
{
'OptionGroupName': 'string',
'Status': 'string'
},
],
'CharacterSetName': 'string',
'SecondaryAvailabilityZone': 'string',
'PubliclyAccessible': True|False,
'StatusInfos': [
{
'StatusType': 'string',
'Normal': True|False,
'Status': 'string',
'Message': 'string'
},
],
'StorageType': 'string',
'TdeCredentialArn': 'string',
'DbInstancePort': 123,
'DBClusterIdentifier': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbiResourceId': 'string',
'CACertificateIdentifier': 'string',
'DomainMemberships': [
{
'Domain': 'string',
'Status': 'string',
'FQDN': 'string',
'IAMRoleName': 'string'
},
],
'CopyTagsToSnapshot': True|False,
'MonitoringInterval': 123,
'EnhancedMonitoringResourceArn': 'string',
'MonitoringRoleArn': 'string',
'PromotionTier': 123,
'DBInstanceArn': 'string',
'Timezone': 'string',
'IAMDatabaseAuthenticationEnabled': True|False
}
}
:returns:
CreateDBInstance
DeleteDBInstance
ModifyDBInstance | entailment |
def restore_db_cluster_from_s3(AvailabilityZones=None, BackupRetentionPeriod=None, CharacterSetName=None, DatabaseName=None, DBClusterIdentifier=None, DBClusterParameterGroupName=None, VpcSecurityGroupIds=None, DBSubnetGroupName=None, Engine=None, EngineVersion=None, Port=None, MasterUsername=None, MasterUserPassword=None, OptionGroupName=None, PreferredBackupWindow=None, PreferredMaintenanceWindow=None, Tags=None, StorageEncrypted=None, KmsKeyId=None, EnableIAMDatabaseAuthentication=None, SourceEngine=None, SourceEngineVersion=None, S3BucketName=None, S3Prefix=None, S3IngestionRoleArn=None):
"""
Creates an Amazon Aurora DB cluster from data stored in an Amazon S3 bucket. Amazon RDS must be authorized to access the Amazon S3 bucket and the data must be created using the Percona XtraBackup utility as described in Migrating Data from MySQL by Using an Amazon S3 Bucket .
See also: AWS API Documentation
:example: response = client.restore_db_cluster_from_s3(
AvailabilityZones=[
'string',
],
BackupRetentionPeriod=123,
CharacterSetName='string',
DatabaseName='string',
DBClusterIdentifier='string',
DBClusterParameterGroupName='string',
VpcSecurityGroupIds=[
'string',
],
DBSubnetGroupName='string',
Engine='string',
EngineVersion='string',
Port=123,
MasterUsername='string',
MasterUserPassword='string',
OptionGroupName='string',
PreferredBackupWindow='string',
PreferredMaintenanceWindow='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
StorageEncrypted=True|False,
KmsKeyId='string',
EnableIAMDatabaseAuthentication=True|False,
SourceEngine='string',
SourceEngineVersion='string',
S3BucketName='string',
S3Prefix='string',
S3IngestionRoleArn='string'
)
:type AvailabilityZones: list
:param AvailabilityZones: A list of EC2 Availability Zones that instances in the restored DB cluster can be created in.
(string) --
:type BackupRetentionPeriod: integer
:param BackupRetentionPeriod: The number of days for which automated backups of the restored DB cluster are retained. You must specify a minimum value of 1.
Default: 1
Constraints:
Must be a value from 1 to 35
:type CharacterSetName: string
:param CharacterSetName: A value that indicates that the restored DB cluster should be associated with the specified CharacterSet.
:type DatabaseName: string
:param DatabaseName: The database name for the restored DB cluster.
:type DBClusterIdentifier: string
:param DBClusterIdentifier: [REQUIRED]
The name of the DB cluster to create from the source data in the S3 bucket. This parameter is isn't case-sensitive.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Example: my-cluster1
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName: The name of the DB cluster parameter group to associate with the restored DB cluster. If this argument is omitted, default.aurora5.6 will be used.
Constraints:
Must be 1 to 255 alphanumeric characters
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of EC2 VPC security groups to associate with the restored DB cluster.
(string) --
:type DBSubnetGroupName: string
:param DBSubnetGroupName: A DB subnet group to associate with the restored DB cluster.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.
Example: mySubnetgroup
:type Engine: string
:param Engine: [REQUIRED]
The name of the database engine to be used for the restored DB cluster.
Valid Values: aurora
:type EngineVersion: string
:param EngineVersion: The version number of the database engine to use.
Aurora
Example: 5.6.10a
:type Port: integer
:param Port: The port number on which the instances in the restored DB cluster accept connections.
Default: 3306
:type MasterUsername: string
:param MasterUsername: [REQUIRED]
The name of the master user for the restored DB cluster.
Constraints:
Must be 1 to 16 alphanumeric characters.
First character must be a letter.
Cannot be a reserved word for the chosen database engine.
:type MasterUserPassword: string
:param MasterUserPassword: [REQUIRED]
The password for the master database user. This password can contain any printable ASCII character except '/', ''', or '@'.
Constraints: Must contain from 8 to 41 characters.
:type OptionGroupName: string
:param OptionGroupName: A value that indicates that the restored DB cluster should be associated with the specified option group.
Permanent options cannot be removed from an option group. An option group cannot be removed from a DB cluster once it is associated with a DB cluster.
:type PreferredBackupWindow: string
:param PreferredBackupWindow: The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.
Default: A 30-minute window selected at random from an 8-hour block of time per region. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Constraints:
Must be in the format hh24:mi-hh24:mi .
Times should be in Universal Coordinated Time (UTC).
Must not conflict with the preferred maintenance window.
Must be at least 30 minutes.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
Format: ddd:hh24:mi-ddd:hh24:mi
Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
:type Tags: list
:param Tags: A list of tags.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type StorageEncrypted: boolean
:param StorageEncrypted: Specifies whether the restored DB cluster is encrypted.
:type KmsKeyId: string
:param KmsKeyId: The KMS key identifier for an encrypted DB cluster.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KM encryption key.
If the StorageEncrypted parameter is true, and you do not specify a value for the KmsKeyId parameter, then Amazon RDS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: A Boolean value that is true to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.
Default: false
:type SourceEngine: string
:param SourceEngine: [REQUIRED]
The identifier for the database engine that was backed up to create the files stored in the Amazon S3 bucket.
Valid values: mysql
:type SourceEngineVersion: string
:param SourceEngineVersion: [REQUIRED]
The version of the database that the backup files were created from.
MySQL version 5.5 and 5.6 are supported.
Example: 5.6.22
:type S3BucketName: string
:param S3BucketName: [REQUIRED]
The name of the Amazon S3 bucket that contains the data used to create the Amazon Aurora DB cluster.
:type S3Prefix: string
:param S3Prefix: The prefix for all of the file names that contain the data used to create the Amazon Aurora DB cluster. If you do not specify a SourceS3Prefix value, then the Amazon Aurora DB cluster is created by using all of the files in the Amazon S3 bucket.
:type S3IngestionRoleArn: string
:param S3IngestionRoleArn: [REQUIRED]
The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon RDS to access the Amazon S3 bucket on your behalf.
:rtype: dict
:return: {
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
:returns:
CreateDBCluster
DeleteDBCluster
FailoverDBCluster
ModifyDBCluster
RestoreDBClusterFromSnapshot
RestoreDBClusterToPointInTime
"""
pass | Creates an Amazon Aurora DB cluster from data stored in an Amazon S3 bucket. Amazon RDS must be authorized to access the Amazon S3 bucket and the data must be created using the Percona XtraBackup utility as described in Migrating Data from MySQL by Using an Amazon S3 Bucket .
See also: AWS API Documentation
:example: response = client.restore_db_cluster_from_s3(
AvailabilityZones=[
'string',
],
BackupRetentionPeriod=123,
CharacterSetName='string',
DatabaseName='string',
DBClusterIdentifier='string',
DBClusterParameterGroupName='string',
VpcSecurityGroupIds=[
'string',
],
DBSubnetGroupName='string',
Engine='string',
EngineVersion='string',
Port=123,
MasterUsername='string',
MasterUserPassword='string',
OptionGroupName='string',
PreferredBackupWindow='string',
PreferredMaintenanceWindow='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
StorageEncrypted=True|False,
KmsKeyId='string',
EnableIAMDatabaseAuthentication=True|False,
SourceEngine='string',
SourceEngineVersion='string',
S3BucketName='string',
S3Prefix='string',
S3IngestionRoleArn='string'
)
:type AvailabilityZones: list
:param AvailabilityZones: A list of EC2 Availability Zones that instances in the restored DB cluster can be created in.
(string) --
:type BackupRetentionPeriod: integer
:param BackupRetentionPeriod: The number of days for which automated backups of the restored DB cluster are retained. You must specify a minimum value of 1.
Default: 1
Constraints:
Must be a value from 1 to 35
:type CharacterSetName: string
:param CharacterSetName: A value that indicates that the restored DB cluster should be associated with the specified CharacterSet.
:type DatabaseName: string
:param DatabaseName: The database name for the restored DB cluster.
:type DBClusterIdentifier: string
:param DBClusterIdentifier: [REQUIRED]
The name of the DB cluster to create from the source data in the S3 bucket. This parameter is isn't case-sensitive.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Example: my-cluster1
:type DBClusterParameterGroupName: string
:param DBClusterParameterGroupName: The name of the DB cluster parameter group to associate with the restored DB cluster. If this argument is omitted, default.aurora5.6 will be used.
Constraints:
Must be 1 to 255 alphanumeric characters
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of EC2 VPC security groups to associate with the restored DB cluster.
(string) --
:type DBSubnetGroupName: string
:param DBSubnetGroupName: A DB subnet group to associate with the restored DB cluster.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.
Example: mySubnetgroup
:type Engine: string
:param Engine: [REQUIRED]
The name of the database engine to be used for the restored DB cluster.
Valid Values: aurora
:type EngineVersion: string
:param EngineVersion: The version number of the database engine to use.
Aurora
Example: 5.6.10a
:type Port: integer
:param Port: The port number on which the instances in the restored DB cluster accept connections.
Default: 3306
:type MasterUsername: string
:param MasterUsername: [REQUIRED]
The name of the master user for the restored DB cluster.
Constraints:
Must be 1 to 16 alphanumeric characters.
First character must be a letter.
Cannot be a reserved word for the chosen database engine.
:type MasterUserPassword: string
:param MasterUserPassword: [REQUIRED]
The password for the master database user. This password can contain any printable ASCII character except '/', ''', or '@'.
Constraints: Must contain from 8 to 41 characters.
:type OptionGroupName: string
:param OptionGroupName: A value that indicates that the restored DB cluster should be associated with the specified option group.
Permanent options cannot be removed from an option group. An option group cannot be removed from a DB cluster once it is associated with a DB cluster.
:type PreferredBackupWindow: string
:param PreferredBackupWindow: The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.
Default: A 30-minute window selected at random from an 8-hour block of time per region. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Constraints:
Must be in the format hh24:mi-hh24:mi .
Times should be in Universal Coordinated Time (UTC).
Must not conflict with the preferred maintenance window.
Must be at least 30 minutes.
:type PreferredMaintenanceWindow: string
:param PreferredMaintenanceWindow: The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
Format: ddd:hh24:mi-ddd:hh24:mi
Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
:type Tags: list
:param Tags: A list of tags.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type StorageEncrypted: boolean
:param StorageEncrypted: Specifies whether the restored DB cluster is encrypted.
:type KmsKeyId: string
:param KmsKeyId: The KMS key identifier for an encrypted DB cluster.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KM encryption key.
If the StorageEncrypted parameter is true, and you do not specify a value for the KmsKeyId parameter, then Amazon RDS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: A Boolean value that is true to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.
Default: false
:type SourceEngine: string
:param SourceEngine: [REQUIRED]
The identifier for the database engine that was backed up to create the files stored in the Amazon S3 bucket.
Valid values: mysql
:type SourceEngineVersion: string
:param SourceEngineVersion: [REQUIRED]
The version of the database that the backup files were created from.
MySQL version 5.5 and 5.6 are supported.
Example: 5.6.22
:type S3BucketName: string
:param S3BucketName: [REQUIRED]
The name of the Amazon S3 bucket that contains the data used to create the Amazon Aurora DB cluster.
:type S3Prefix: string
:param S3Prefix: The prefix for all of the file names that contain the data used to create the Amazon Aurora DB cluster. If you do not specify a SourceS3Prefix value, then the Amazon Aurora DB cluster is created by using all of the files in the Amazon S3 bucket.
:type S3IngestionRoleArn: string
:param S3IngestionRoleArn: [REQUIRED]
The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon RDS to access the Amazon S3 bucket on your behalf.
:rtype: dict
:return: {
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
:returns:
CreateDBCluster
DeleteDBCluster
FailoverDBCluster
ModifyDBCluster
RestoreDBClusterFromSnapshot
RestoreDBClusterToPointInTime | entailment |
def restore_db_cluster_from_snapshot(AvailabilityZones=None, DBClusterIdentifier=None, SnapshotIdentifier=None, Engine=None, EngineVersion=None, Port=None, DBSubnetGroupName=None, DatabaseName=None, OptionGroupName=None, VpcSecurityGroupIds=None, Tags=None, KmsKeyId=None, EnableIAMDatabaseAuthentication=None):
"""
Creates a new DB cluster from a DB cluster snapshot. The target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
For more information on Amazon Aurora, see Aurora on Amazon RDS in the Amazon RDS User Guide.
See also: AWS API Documentation
Examples
The following example restores an Amazon Aurora DB cluster from a DB cluster snapshot.
Expected Output:
:example: response = client.restore_db_cluster_from_snapshot(
AvailabilityZones=[
'string',
],
DBClusterIdentifier='string',
SnapshotIdentifier='string',
Engine='string',
EngineVersion='string',
Port=123,
DBSubnetGroupName='string',
DatabaseName='string',
OptionGroupName='string',
VpcSecurityGroupIds=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
KmsKeyId='string',
EnableIAMDatabaseAuthentication=True|False
)
:type AvailabilityZones: list
:param AvailabilityZones: Provides the list of EC2 Availability Zones that instances in the restored DB cluster can be created in.
(string) --
:type DBClusterIdentifier: string
:param DBClusterIdentifier: [REQUIRED]
The name of the DB cluster to create from the DB cluster snapshot. This parameter isn't case-sensitive.
Constraints:
Must contain from 1 to 255 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
Example: my-snapshot-id
:type SnapshotIdentifier: string
:param SnapshotIdentifier: [REQUIRED]
The identifier for the DB cluster snapshot to restore from.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type Engine: string
:param Engine: [REQUIRED]
The database engine to use for the new DB cluster.
Default: The same as source
Constraint: Must be compatible with the engine of the source
:type EngineVersion: string
:param EngineVersion: The version of the database engine to use for the new DB cluster.
:type Port: integer
:param Port: The port number on which the new DB cluster accepts connections.
Constraints: Value must be 1150-65535
Default: The same port as the original DB cluster.
:type DBSubnetGroupName: string
:param DBSubnetGroupName: The name of the DB subnet group to use for the new DB cluster.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.
Example: mySubnetgroup
:type DatabaseName: string
:param DatabaseName: The database name for the restored DB cluster.
:type OptionGroupName: string
:param OptionGroupName: The name of the option group to use for the restored DB cluster.
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of VPC security groups that the new DB cluster will belong to.
(string) --
:type Tags: list
:param Tags: The tags to be assigned to the restored DB cluster.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type KmsKeyId: string
:param KmsKeyId: The KMS key identifier to use when restoring an encrypted DB cluster from a DB cluster snapshot.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are restoring a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key.
If you do not specify a value for the KmsKeyId parameter, then the following will occur:
If the DB cluster snapshot is encrypted, then the restored DB cluster is encrypted using the KMS key that was used to encrypt the DB cluster snapshot.
If the DB cluster snapshot is not encrypted, then the restored DB cluster is encrypted using the specified encryption key.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: A Boolean value that is true to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.
Default: false
:rtype: dict
:return: {
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
:returns:
CreateDBCluster
DeleteDBCluster
FailoverDBCluster
ModifyDBCluster
RestoreDBClusterFromSnapshot
RestoreDBClusterToPointInTime
"""
pass | Creates a new DB cluster from a DB cluster snapshot. The target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
For more information on Amazon Aurora, see Aurora on Amazon RDS in the Amazon RDS User Guide.
See also: AWS API Documentation
Examples
The following example restores an Amazon Aurora DB cluster from a DB cluster snapshot.
Expected Output:
:example: response = client.restore_db_cluster_from_snapshot(
AvailabilityZones=[
'string',
],
DBClusterIdentifier='string',
SnapshotIdentifier='string',
Engine='string',
EngineVersion='string',
Port=123,
DBSubnetGroupName='string',
DatabaseName='string',
OptionGroupName='string',
VpcSecurityGroupIds=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
KmsKeyId='string',
EnableIAMDatabaseAuthentication=True|False
)
:type AvailabilityZones: list
:param AvailabilityZones: Provides the list of EC2 Availability Zones that instances in the restored DB cluster can be created in.
(string) --
:type DBClusterIdentifier: string
:param DBClusterIdentifier: [REQUIRED]
The name of the DB cluster to create from the DB cluster snapshot. This parameter isn't case-sensitive.
Constraints:
Must contain from 1 to 255 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
Example: my-snapshot-id
:type SnapshotIdentifier: string
:param SnapshotIdentifier: [REQUIRED]
The identifier for the DB cluster snapshot to restore from.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type Engine: string
:param Engine: [REQUIRED]
The database engine to use for the new DB cluster.
Default: The same as source
Constraint: Must be compatible with the engine of the source
:type EngineVersion: string
:param EngineVersion: The version of the database engine to use for the new DB cluster.
:type Port: integer
:param Port: The port number on which the new DB cluster accepts connections.
Constraints: Value must be 1150-65535
Default: The same port as the original DB cluster.
:type DBSubnetGroupName: string
:param DBSubnetGroupName: The name of the DB subnet group to use for the new DB cluster.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.
Example: mySubnetgroup
:type DatabaseName: string
:param DatabaseName: The database name for the restored DB cluster.
:type OptionGroupName: string
:param OptionGroupName: The name of the option group to use for the restored DB cluster.
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A list of VPC security groups that the new DB cluster will belong to.
(string) --
:type Tags: list
:param Tags: The tags to be assigned to the restored DB cluster.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type KmsKeyId: string
:param KmsKeyId: The KMS key identifier to use when restoring an encrypted DB cluster from a DB cluster snapshot.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are restoring a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key.
If you do not specify a value for the KmsKeyId parameter, then the following will occur:
If the DB cluster snapshot is encrypted, then the restored DB cluster is encrypted using the KMS key that was used to encrypt the DB cluster snapshot.
If the DB cluster snapshot is not encrypted, then the restored DB cluster is encrypted using the specified encryption key.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: A Boolean value that is true to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.
Default: false
:rtype: dict
:return: {
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
:returns:
CreateDBCluster
DeleteDBCluster
FailoverDBCluster
ModifyDBCluster
RestoreDBClusterFromSnapshot
RestoreDBClusterToPointInTime | entailment |
def restore_db_cluster_to_point_in_time(DBClusterIdentifier=None, SourceDBClusterIdentifier=None, RestoreToTime=None, UseLatestRestorableTime=None, Port=None, DBSubnetGroupName=None, OptionGroupName=None, VpcSecurityGroupIds=None, Tags=None, KmsKeyId=None, EnableIAMDatabaseAuthentication=None):
"""
Restores a DB cluster to an arbitrary point in time. Users can restore to any point in time before LatestRestorableTime for up to BackupRetentionPeriod days. The target DB cluster is created from the source DB cluster with the same configuration as the original DB cluster, except that the new DB cluster is created with the default DB security group.
For more information on Amazon Aurora, see Aurora on Amazon RDS in the Amazon RDS User Guide.
See also: AWS API Documentation
Examples
The following example restores a DB cluster to a new DB cluster at a point in time from the source DB cluster.
Expected Output:
:example: response = client.restore_db_cluster_to_point_in_time(
DBClusterIdentifier='string',
SourceDBClusterIdentifier='string',
RestoreToTime=datetime(2015, 1, 1),
UseLatestRestorableTime=True|False,
Port=123,
DBSubnetGroupName='string',
OptionGroupName='string',
VpcSecurityGroupIds=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
KmsKeyId='string',
EnableIAMDatabaseAuthentication=True|False
)
:type DBClusterIdentifier: string
:param DBClusterIdentifier: [REQUIRED]
The name of the new DB cluster to be created.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type SourceDBClusterIdentifier: string
:param SourceDBClusterIdentifier: [REQUIRED]
The identifier of the source DB cluster from which to restore.
Constraints:
Must be the identifier of an existing database instance
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type RestoreToTime: datetime
:param RestoreToTime: The date and time to restore the DB cluster to.
Valid Values: Value must be a time in Universal Coordinated Time (UTC) format
Constraints:
Must be before the latest restorable time for the DB instance
Cannot be specified if UseLatestRestorableTime parameter is true
Example: 2015-03-07T23:45:00Z
:type UseLatestRestorableTime: boolean
:param UseLatestRestorableTime: A value that is set to true to restore the DB cluster to the latest restorable backup time, and false otherwise.
Default: false
Constraints: Cannot be specified if RestoreToTime parameter is provided.
:type Port: integer
:param Port: The port number on which the new DB cluster accepts connections.
Constraints: Value must be 1150-65535
Default: The same port as the original DB cluster.
:type DBSubnetGroupName: string
:param DBSubnetGroupName: The DB subnet group name to use for the new DB cluster.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.
Example: mySubnetgroup
:type OptionGroupName: string
:param OptionGroupName: The name of the option group for the new DB cluster.
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A lst of VPC security groups that the new DB cluster belongs to.
(string) --
:type Tags: list
:param Tags: A list of tags.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type KmsKeyId: string
:param KmsKeyId: The KMS key identifier to use when restoring an encrypted DB cluster from an encrypted DB cluster.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are restoring a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key.
You can restore to a new DB cluster and encrypt the new DB cluster with a KMS key that is different than the KMS key used to encrypt the source DB cluster. The new DB cluster will be encrypted with the KMS key identified by the KmsKeyId parameter.
If you do not specify a value for the KmsKeyId parameter, then the following will occur:
If the DB cluster is encrypted, then the restored DB cluster is encrypted using the KMS key that was used to encrypt the source DB cluster.
If the DB cluster is not encrypted, then the restored DB cluster is not encrypted.
If DBClusterIdentifier refers to a DB cluster that is note encrypted, then the restore request is rejected.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: A Boolean value that is true to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.
Default: false
:rtype: dict
:return: {
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
:returns:
CreateDBCluster
DeleteDBCluster
FailoverDBCluster
ModifyDBCluster
RestoreDBClusterFromSnapshot
RestoreDBClusterToPointInTime
"""
pass | Restores a DB cluster to an arbitrary point in time. Users can restore to any point in time before LatestRestorableTime for up to BackupRetentionPeriod days. The target DB cluster is created from the source DB cluster with the same configuration as the original DB cluster, except that the new DB cluster is created with the default DB security group.
For more information on Amazon Aurora, see Aurora on Amazon RDS in the Amazon RDS User Guide.
See also: AWS API Documentation
Examples
The following example restores a DB cluster to a new DB cluster at a point in time from the source DB cluster.
Expected Output:
:example: response = client.restore_db_cluster_to_point_in_time(
DBClusterIdentifier='string',
SourceDBClusterIdentifier='string',
RestoreToTime=datetime(2015, 1, 1),
UseLatestRestorableTime=True|False,
Port=123,
DBSubnetGroupName='string',
OptionGroupName='string',
VpcSecurityGroupIds=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
KmsKeyId='string',
EnableIAMDatabaseAuthentication=True|False
)
:type DBClusterIdentifier: string
:param DBClusterIdentifier: [REQUIRED]
The name of the new DB cluster to be created.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type SourceDBClusterIdentifier: string
:param SourceDBClusterIdentifier: [REQUIRED]
The identifier of the source DB cluster from which to restore.
Constraints:
Must be the identifier of an existing database instance
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type RestoreToTime: datetime
:param RestoreToTime: The date and time to restore the DB cluster to.
Valid Values: Value must be a time in Universal Coordinated Time (UTC) format
Constraints:
Must be before the latest restorable time for the DB instance
Cannot be specified if UseLatestRestorableTime parameter is true
Example: 2015-03-07T23:45:00Z
:type UseLatestRestorableTime: boolean
:param UseLatestRestorableTime: A value that is set to true to restore the DB cluster to the latest restorable backup time, and false otherwise.
Default: false
Constraints: Cannot be specified if RestoreToTime parameter is provided.
:type Port: integer
:param Port: The port number on which the new DB cluster accepts connections.
Constraints: Value must be 1150-65535
Default: The same port as the original DB cluster.
:type DBSubnetGroupName: string
:param DBSubnetGroupName: The DB subnet group name to use for the new DB cluster.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.
Example: mySubnetgroup
:type OptionGroupName: string
:param OptionGroupName: The name of the option group for the new DB cluster.
:type VpcSecurityGroupIds: list
:param VpcSecurityGroupIds: A lst of VPC security groups that the new DB cluster belongs to.
(string) --
:type Tags: list
:param Tags: A list of tags.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type KmsKeyId: string
:param KmsKeyId: The KMS key identifier to use when restoring an encrypted DB cluster from an encrypted DB cluster.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are restoring a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key.
You can restore to a new DB cluster and encrypt the new DB cluster with a KMS key that is different than the KMS key used to encrypt the source DB cluster. The new DB cluster will be encrypted with the KMS key identified by the KmsKeyId parameter.
If you do not specify a value for the KmsKeyId parameter, then the following will occur:
If the DB cluster is encrypted, then the restored DB cluster is encrypted using the KMS key that was used to encrypt the source DB cluster.
If the DB cluster is not encrypted, then the restored DB cluster is not encrypted.
If DBClusterIdentifier refers to a DB cluster that is note encrypted, then the restore request is rejected.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: A Boolean value that is true to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.
Default: false
:rtype: dict
:return: {
'DBCluster': {
'AllocatedStorage': 123,
'AvailabilityZones': [
'string',
],
'BackupRetentionPeriod': 123,
'CharacterSetName': 'string',
'DatabaseName': 'string',
'DBClusterIdentifier': 'string',
'DBClusterParameterGroup': 'string',
'DBSubnetGroup': 'string',
'Status': 'string',
'PercentProgress': 'string',
'EarliestRestorableTime': datetime(2015, 1, 1),
'Endpoint': 'string',
'ReaderEndpoint': 'string',
'MultiAZ': True|False,
'Engine': 'string',
'EngineVersion': 'string',
'LatestRestorableTime': datetime(2015, 1, 1),
'Port': 123,
'MasterUsername': 'string',
'DBClusterOptionGroupMemberships': [
{
'DBClusterOptionGroupName': 'string',
'Status': 'string'
},
],
'PreferredBackupWindow': 'string',
'PreferredMaintenanceWindow': 'string',
'ReplicationSourceIdentifier': 'string',
'ReadReplicaIdentifiers': [
'string',
],
'DBClusterMembers': [
{
'DBInstanceIdentifier': 'string',
'IsClusterWriter': True|False,
'DBClusterParameterGroupStatus': 'string',
'PromotionTier': 123
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'HostedZoneId': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbClusterResourceId': 'string',
'DBClusterArn': 'string',
'AssociatedRoles': [
{
'RoleArn': 'string',
'Status': 'string'
},
],
'IAMDatabaseAuthenticationEnabled': True|False,
'ClusterCreateTime': datetime(2015, 1, 1)
}
}
:returns:
CreateDBCluster
DeleteDBCluster
FailoverDBCluster
ModifyDBCluster
RestoreDBClusterFromSnapshot
RestoreDBClusterToPointInTime | entailment |
def restore_db_instance_from_db_snapshot(DBInstanceIdentifier=None, DBSnapshotIdentifier=None, DBInstanceClass=None, Port=None, AvailabilityZone=None, DBSubnetGroupName=None, MultiAZ=None, PubliclyAccessible=None, AutoMinorVersionUpgrade=None, LicenseModel=None, DBName=None, Engine=None, Iops=None, OptionGroupName=None, Tags=None, StorageType=None, TdeCredentialArn=None, TdeCredentialPassword=None, Domain=None, CopyTagsToSnapshot=None, DomainIAMRoleName=None, EnableIAMDatabaseAuthentication=None):
"""
Creates a new DB instance from a DB snapshot. The target database is created from the source database restore point with the most of original configuration with the default security group and the default DB parameter group. By default, the new DB instance is created as a single-AZ deployment except when the instance is a SQL Server instance that has an option group that is associated with mirroring; in this case, the instance becomes a mirrored AZ deployment and not a single-AZ deployment.
If your intent is to replace your original DB instance with the new, restored DB instance, then rename your original DB instance before you call the RestoreDBInstanceFromDBSnapshot action. RDS does not allow two DB instances with the same name. Once you have renamed your original DB instance with a different identifier, then you can pass the original name of the DB instance as the DBInstanceIdentifier in the call to the RestoreDBInstanceFromDBSnapshot action. The result is that you will replace the original DB instance with the DB instance created from the snapshot.
If you are restoring from a shared manual DB snapshot, the DBSnapshotIdentifier must be the ARN of the shared DB snapshot.
See also: AWS API Documentation
:example: response = client.restore_db_instance_from_db_snapshot(
DBInstanceIdentifier='string',
DBSnapshotIdentifier='string',
DBInstanceClass='string',
Port=123,
AvailabilityZone='string',
DBSubnetGroupName='string',
MultiAZ=True|False,
PubliclyAccessible=True|False,
AutoMinorVersionUpgrade=True|False,
LicenseModel='string',
DBName='string',
Engine='string',
Iops=123,
OptionGroupName='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
StorageType='string',
TdeCredentialArn='string',
TdeCredentialPassword='string',
Domain='string',
CopyTagsToSnapshot=True|False,
DomainIAMRoleName='string',
EnableIAMDatabaseAuthentication=True|False
)
:type DBInstanceIdentifier: string
:param DBInstanceIdentifier: [REQUIRED]
Name of the DB instance to create from the DB snapshot. This parameter isn't case-sensitive.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens (1 to 15 for SQL Server)
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
Example: my-snapshot-id
:type DBSnapshotIdentifier: string
:param DBSnapshotIdentifier: [REQUIRED]
The identifier for the DB snapshot to restore from.
Constraints:
Must contain from 1 to 255 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
If you are restoring from a shared manual DB snapshot, the DBSnapshotIdentifier must be the ARN of the shared DB snapshot.
:type DBInstanceClass: string
:param DBInstanceClass: The compute and memory capacity of the Amazon RDS DB instance.
Valid Values: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large | db.m3.xlarge | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium | db.t2.large
:type Port: integer
:param Port: The port number on which the database accepts connections.
Default: The same port as the original DB instance
Constraints: Value must be 1150-65535
:type AvailabilityZone: string
:param AvailabilityZone: The EC2 Availability Zone that the database instance will be created in.
Default: A random, system-chosen Availability Zone.
Constraint: You cannot specify the AvailabilityZone parameter if the MultiAZ parameter is set to true .
Example: us-east-1a
:type DBSubnetGroupName: string
:param DBSubnetGroupName: The DB subnet group name to use for the new instance.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.
Example: mySubnetgroup
:type MultiAZ: boolean
:param MultiAZ: Specifies if the DB instance is a Multi-AZ deployment.
Constraint: You cannot specify the AvailabilityZone parameter if the MultiAZ parameter is set to true .
:type PubliclyAccessible: boolean
:param PubliclyAccessible: Specifies the accessibility options for the DB instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.
Default: The default behavior varies depending on whether a VPC has been requested or not. The following list shows the default behavior in each case.
Default VPC: true
VPC: false
If no DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be private.
:type AutoMinorVersionUpgrade: boolean
:param AutoMinorVersionUpgrade: Indicates that minor version upgrades will be applied automatically to the DB instance during the maintenance window.
:type LicenseModel: string
:param LicenseModel: License model information for the restored DB instance.
Default: Same as source.
Valid values: license-included | bring-your-own-license | general-public-license
:type DBName: string
:param DBName: The database name for the restored DB instance.
Note
This parameter doesn't apply to the MySQL, PostgreSQL, or MariaDB engines.
:type Engine: string
:param Engine: The database engine to use for the new instance.
Default: The same as source
Constraint: Must be compatible with the engine of the source. You can restore a MariaDB 10.1 DB instance from a MySQL 5.6 snapshot.
Valid Values: MySQL | mariadb | oracle-se1 | oracle-se | oracle-ee | sqlserver-ee | sqlserver-se | sqlserver-ex | sqlserver-web | postgres | aurora
:type Iops: integer
:param Iops: Specifies the amount of provisioned IOPS for the DB instance, expressed in I/O operations per second. If this parameter is not specified, the IOPS value will be taken from the backup. If this parameter is set to 0, the new instance will be converted to a non-PIOPS instance, which will take additional time, though your DB instance will be available for connections before the conversion starts.
Constraints: Must be an integer greater than 1000.
SQL Server
Setting the IOPS value for the SQL Server database engine is not supported.
:type OptionGroupName: string
:param OptionGroupName: The name of the option group to be used for the restored DB instance.
Permanent options, such as the TDE option for Oracle Advanced Security TDE, cannot be removed from an option group, and that option group cannot be removed from a DB instance once it is associated with a DB instance
:type Tags: list
:param Tags: A list of tags.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type StorageType: string
:param StorageType: Specifies the storage type to be associated with the DB instance.
Valid values: standard | gp2 | io1
If you specify io1 , you must also include a value for the Iops parameter.
Default: io1 if the Iops parameter is specified; otherwise standard
:type TdeCredentialArn: string
:param TdeCredentialArn: The ARN from the Key Store with which to associate the instance for TDE encryption.
:type TdeCredentialPassword: string
:param TdeCredentialPassword: The password for the given ARN from the Key Store in order to access the device.
:type Domain: string
:param Domain: Specify the Active Directory Domain to restore the instance in.
:type CopyTagsToSnapshot: boolean
:param CopyTagsToSnapshot: True to copy all tags from the restored DB instance to snapshots of the DB instance; otherwise false. The default is false.
:type DomainIAMRoleName: string
:param DomainIAMRoleName: Specify the name of the IAM role to be used when making API calls to the Directory Service.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts; otherwise false.
You can enable IAM database authentication for the following database engines
For MySQL 5.6, minor version 5.6.34 or higher
For MySQL 5.7, minor version 5.7.16 or higher
Aurora 5.6 or higher.
Default: false
:rtype: dict
:return: {
'DBInstance': {
'DBInstanceIdentifier': 'string',
'DBInstanceClass': 'string',
'Engine': 'string',
'DBInstanceStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123,
'HostedZoneId': 'string'
},
'AllocatedStorage': 123,
'InstanceCreateTime': datetime(2015, 1, 1),
'PreferredBackupWindow': 'string',
'BackupRetentionPeriod': 123,
'DBSecurityGroups': [
{
'DBSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'ParameterApplyStatus': 'string'
},
],
'AvailabilityZone': 'string',
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'DBInstanceClass': 'string',
'AllocatedStorage': 123,
'MasterUserPassword': 'string',
'Port': 123,
'BackupRetentionPeriod': 123,
'MultiAZ': True|False,
'EngineVersion': 'string',
'LicenseModel': 'string',
'Iops': 123,
'DBInstanceIdentifier': 'string',
'StorageType': 'string',
'CACertificateIdentifier': 'string',
'DBSubnetGroupName': 'string'
},
'LatestRestorableTime': datetime(2015, 1, 1),
'MultiAZ': True|False,
'EngineVersion': 'string',
'AutoMinorVersionUpgrade': True|False,
'ReadReplicaSourceDBInstanceIdentifier': 'string',
'ReadReplicaDBInstanceIdentifiers': [
'string',
],
'ReadReplicaDBClusterIdentifiers': [
'string',
],
'LicenseModel': 'string',
'Iops': 123,
'OptionGroupMemberships': [
{
'OptionGroupName': 'string',
'Status': 'string'
},
],
'CharacterSetName': 'string',
'SecondaryAvailabilityZone': 'string',
'PubliclyAccessible': True|False,
'StatusInfos': [
{
'StatusType': 'string',
'Normal': True|False,
'Status': 'string',
'Message': 'string'
},
],
'StorageType': 'string',
'TdeCredentialArn': 'string',
'DbInstancePort': 123,
'DBClusterIdentifier': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbiResourceId': 'string',
'CACertificateIdentifier': 'string',
'DomainMemberships': [
{
'Domain': 'string',
'Status': 'string',
'FQDN': 'string',
'IAMRoleName': 'string'
},
],
'CopyTagsToSnapshot': True|False,
'MonitoringInterval': 123,
'EnhancedMonitoringResourceArn': 'string',
'MonitoringRoleArn': 'string',
'PromotionTier': 123,
'DBInstanceArn': 'string',
'Timezone': 'string',
'IAMDatabaseAuthenticationEnabled': True|False
}
}
:returns:
CreateDBInstance
DeleteDBInstance
ModifyDBInstance
"""
pass | Creates a new DB instance from a DB snapshot. The target database is created from the source database restore point with the most of original configuration with the default security group and the default DB parameter group. By default, the new DB instance is created as a single-AZ deployment except when the instance is a SQL Server instance that has an option group that is associated with mirroring; in this case, the instance becomes a mirrored AZ deployment and not a single-AZ deployment.
If your intent is to replace your original DB instance with the new, restored DB instance, then rename your original DB instance before you call the RestoreDBInstanceFromDBSnapshot action. RDS does not allow two DB instances with the same name. Once you have renamed your original DB instance with a different identifier, then you can pass the original name of the DB instance as the DBInstanceIdentifier in the call to the RestoreDBInstanceFromDBSnapshot action. The result is that you will replace the original DB instance with the DB instance created from the snapshot.
If you are restoring from a shared manual DB snapshot, the DBSnapshotIdentifier must be the ARN of the shared DB snapshot.
See also: AWS API Documentation
:example: response = client.restore_db_instance_from_db_snapshot(
DBInstanceIdentifier='string',
DBSnapshotIdentifier='string',
DBInstanceClass='string',
Port=123,
AvailabilityZone='string',
DBSubnetGroupName='string',
MultiAZ=True|False,
PubliclyAccessible=True|False,
AutoMinorVersionUpgrade=True|False,
LicenseModel='string',
DBName='string',
Engine='string',
Iops=123,
OptionGroupName='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
StorageType='string',
TdeCredentialArn='string',
TdeCredentialPassword='string',
Domain='string',
CopyTagsToSnapshot=True|False,
DomainIAMRoleName='string',
EnableIAMDatabaseAuthentication=True|False
)
:type DBInstanceIdentifier: string
:param DBInstanceIdentifier: [REQUIRED]
Name of the DB instance to create from the DB snapshot. This parameter isn't case-sensitive.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens (1 to 15 for SQL Server)
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
Example: my-snapshot-id
:type DBSnapshotIdentifier: string
:param DBSnapshotIdentifier: [REQUIRED]
The identifier for the DB snapshot to restore from.
Constraints:
Must contain from 1 to 255 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
If you are restoring from a shared manual DB snapshot, the DBSnapshotIdentifier must be the ARN of the shared DB snapshot.
:type DBInstanceClass: string
:param DBInstanceClass: The compute and memory capacity of the Amazon RDS DB instance.
Valid Values: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large | db.m3.xlarge | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium | db.t2.large
:type Port: integer
:param Port: The port number on which the database accepts connections.
Default: The same port as the original DB instance
Constraints: Value must be 1150-65535
:type AvailabilityZone: string
:param AvailabilityZone: The EC2 Availability Zone that the database instance will be created in.
Default: A random, system-chosen Availability Zone.
Constraint: You cannot specify the AvailabilityZone parameter if the MultiAZ parameter is set to true .
Example: us-east-1a
:type DBSubnetGroupName: string
:param DBSubnetGroupName: The DB subnet group name to use for the new instance.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.
Example: mySubnetgroup
:type MultiAZ: boolean
:param MultiAZ: Specifies if the DB instance is a Multi-AZ deployment.
Constraint: You cannot specify the AvailabilityZone parameter if the MultiAZ parameter is set to true .
:type PubliclyAccessible: boolean
:param PubliclyAccessible: Specifies the accessibility options for the DB instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.
Default: The default behavior varies depending on whether a VPC has been requested or not. The following list shows the default behavior in each case.
Default VPC: true
VPC: false
If no DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be private.
:type AutoMinorVersionUpgrade: boolean
:param AutoMinorVersionUpgrade: Indicates that minor version upgrades will be applied automatically to the DB instance during the maintenance window.
:type LicenseModel: string
:param LicenseModel: License model information for the restored DB instance.
Default: Same as source.
Valid values: license-included | bring-your-own-license | general-public-license
:type DBName: string
:param DBName: The database name for the restored DB instance.
Note
This parameter doesn't apply to the MySQL, PostgreSQL, or MariaDB engines.
:type Engine: string
:param Engine: The database engine to use for the new instance.
Default: The same as source
Constraint: Must be compatible with the engine of the source. You can restore a MariaDB 10.1 DB instance from a MySQL 5.6 snapshot.
Valid Values: MySQL | mariadb | oracle-se1 | oracle-se | oracle-ee | sqlserver-ee | sqlserver-se | sqlserver-ex | sqlserver-web | postgres | aurora
:type Iops: integer
:param Iops: Specifies the amount of provisioned IOPS for the DB instance, expressed in I/O operations per second. If this parameter is not specified, the IOPS value will be taken from the backup. If this parameter is set to 0, the new instance will be converted to a non-PIOPS instance, which will take additional time, though your DB instance will be available for connections before the conversion starts.
Constraints: Must be an integer greater than 1000.
SQL Server
Setting the IOPS value for the SQL Server database engine is not supported.
:type OptionGroupName: string
:param OptionGroupName: The name of the option group to be used for the restored DB instance.
Permanent options, such as the TDE option for Oracle Advanced Security TDE, cannot be removed from an option group, and that option group cannot be removed from a DB instance once it is associated with a DB instance
:type Tags: list
:param Tags: A list of tags.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type StorageType: string
:param StorageType: Specifies the storage type to be associated with the DB instance.
Valid values: standard | gp2 | io1
If you specify io1 , you must also include a value for the Iops parameter.
Default: io1 if the Iops parameter is specified; otherwise standard
:type TdeCredentialArn: string
:param TdeCredentialArn: The ARN from the Key Store with which to associate the instance for TDE encryption.
:type TdeCredentialPassword: string
:param TdeCredentialPassword: The password for the given ARN from the Key Store in order to access the device.
:type Domain: string
:param Domain: Specify the Active Directory Domain to restore the instance in.
:type CopyTagsToSnapshot: boolean
:param CopyTagsToSnapshot: True to copy all tags from the restored DB instance to snapshots of the DB instance; otherwise false. The default is false.
:type DomainIAMRoleName: string
:param DomainIAMRoleName: Specify the name of the IAM role to be used when making API calls to the Directory Service.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts; otherwise false.
You can enable IAM database authentication for the following database engines
For MySQL 5.6, minor version 5.6.34 or higher
For MySQL 5.7, minor version 5.7.16 or higher
Aurora 5.6 or higher.
Default: false
:rtype: dict
:return: {
'DBInstance': {
'DBInstanceIdentifier': 'string',
'DBInstanceClass': 'string',
'Engine': 'string',
'DBInstanceStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123,
'HostedZoneId': 'string'
},
'AllocatedStorage': 123,
'InstanceCreateTime': datetime(2015, 1, 1),
'PreferredBackupWindow': 'string',
'BackupRetentionPeriod': 123,
'DBSecurityGroups': [
{
'DBSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'ParameterApplyStatus': 'string'
},
],
'AvailabilityZone': 'string',
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'DBInstanceClass': 'string',
'AllocatedStorage': 123,
'MasterUserPassword': 'string',
'Port': 123,
'BackupRetentionPeriod': 123,
'MultiAZ': True|False,
'EngineVersion': 'string',
'LicenseModel': 'string',
'Iops': 123,
'DBInstanceIdentifier': 'string',
'StorageType': 'string',
'CACertificateIdentifier': 'string',
'DBSubnetGroupName': 'string'
},
'LatestRestorableTime': datetime(2015, 1, 1),
'MultiAZ': True|False,
'EngineVersion': 'string',
'AutoMinorVersionUpgrade': True|False,
'ReadReplicaSourceDBInstanceIdentifier': 'string',
'ReadReplicaDBInstanceIdentifiers': [
'string',
],
'ReadReplicaDBClusterIdentifiers': [
'string',
],
'LicenseModel': 'string',
'Iops': 123,
'OptionGroupMemberships': [
{
'OptionGroupName': 'string',
'Status': 'string'
},
],
'CharacterSetName': 'string',
'SecondaryAvailabilityZone': 'string',
'PubliclyAccessible': True|False,
'StatusInfos': [
{
'StatusType': 'string',
'Normal': True|False,
'Status': 'string',
'Message': 'string'
},
],
'StorageType': 'string',
'TdeCredentialArn': 'string',
'DbInstancePort': 123,
'DBClusterIdentifier': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbiResourceId': 'string',
'CACertificateIdentifier': 'string',
'DomainMemberships': [
{
'Domain': 'string',
'Status': 'string',
'FQDN': 'string',
'IAMRoleName': 'string'
},
],
'CopyTagsToSnapshot': True|False,
'MonitoringInterval': 123,
'EnhancedMonitoringResourceArn': 'string',
'MonitoringRoleArn': 'string',
'PromotionTier': 123,
'DBInstanceArn': 'string',
'Timezone': 'string',
'IAMDatabaseAuthenticationEnabled': True|False
}
}
:returns:
CreateDBInstance
DeleteDBInstance
ModifyDBInstance | entailment |
def restore_db_instance_to_point_in_time(SourceDBInstanceIdentifier=None, TargetDBInstanceIdentifier=None, RestoreTime=None, UseLatestRestorableTime=None, DBInstanceClass=None, Port=None, AvailabilityZone=None, DBSubnetGroupName=None, MultiAZ=None, PubliclyAccessible=None, AutoMinorVersionUpgrade=None, LicenseModel=None, DBName=None, Engine=None, Iops=None, OptionGroupName=None, CopyTagsToSnapshot=None, Tags=None, StorageType=None, TdeCredentialArn=None, TdeCredentialPassword=None, Domain=None, DomainIAMRoleName=None, EnableIAMDatabaseAuthentication=None):
"""
Restores a DB instance to an arbitrary point in time. You can restore to any point in time before the time identified by the LatestRestorableTime property. You can restore to a point up to the number of days specified by the BackupRetentionPeriod property.
The target database is created with most of the original configuration, but in a system-selected availability zone, with the default security group, the default subnet group, and the default DB parameter group. By default, the new DB instance is created as a single-AZ deployment except when the instance is a SQL Server instance that has an option group that is associated with mirroring; in this case, the instance becomes a mirrored deployment and not a single-AZ deployment.
See also: AWS API Documentation
:example: response = client.restore_db_instance_to_point_in_time(
SourceDBInstanceIdentifier='string',
TargetDBInstanceIdentifier='string',
RestoreTime=datetime(2015, 1, 1),
UseLatestRestorableTime=True|False,
DBInstanceClass='string',
Port=123,
AvailabilityZone='string',
DBSubnetGroupName='string',
MultiAZ=True|False,
PubliclyAccessible=True|False,
AutoMinorVersionUpgrade=True|False,
LicenseModel='string',
DBName='string',
Engine='string',
Iops=123,
OptionGroupName='string',
CopyTagsToSnapshot=True|False,
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
StorageType='string',
TdeCredentialArn='string',
TdeCredentialPassword='string',
Domain='string',
DomainIAMRoleName='string',
EnableIAMDatabaseAuthentication=True|False
)
:type SourceDBInstanceIdentifier: string
:param SourceDBInstanceIdentifier: [REQUIRED]
The identifier of the source DB instance from which to restore.
Constraints:
Must be the identifier of an existing database instance
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type TargetDBInstanceIdentifier: string
:param TargetDBInstanceIdentifier: [REQUIRED]
The name of the new database instance to be created.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type RestoreTime: datetime
:param RestoreTime: The date and time to restore from.
Valid Values: Value must be a time in Universal Coordinated Time (UTC) format
Constraints:
Must be before the latest restorable time for the DB instance
Cannot be specified if UseLatestRestorableTime parameter is true
Example: 2009-09-07T23:45:00Z
:type UseLatestRestorableTime: boolean
:param UseLatestRestorableTime: Specifies whether (true ) or not (false ) the DB instance is restored from the latest backup time.
Default: false
Constraints: Cannot be specified if RestoreTime parameter is provided.
:type DBInstanceClass: string
:param DBInstanceClass: The compute and memory capacity of the Amazon RDS DB instance.
Valid Values: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large | db.m3.xlarge | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium | db.t2.large
Default: The same DBInstanceClass as the original DB instance.
:type Port: integer
:param Port: The port number on which the database accepts connections.
Constraints: Value must be 1150-65535
Default: The same port as the original DB instance.
:type AvailabilityZone: string
:param AvailabilityZone: The EC2 Availability Zone that the database instance will be created in.
Default: A random, system-chosen Availability Zone.
Constraint: You cannot specify the AvailabilityZone parameter if the MultiAZ parameter is set to true.
Example: us-east-1a
:type DBSubnetGroupName: string
:param DBSubnetGroupName: The DB subnet group name to use for the new instance.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.
Example: mySubnetgroup
:type MultiAZ: boolean
:param MultiAZ: Specifies if the DB instance is a Multi-AZ deployment.
Constraint: You cannot specify the AvailabilityZone parameter if the MultiAZ parameter is set to true .
:type PubliclyAccessible: boolean
:param PubliclyAccessible: Specifies the accessibility options for the DB instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.
Default: The default behavior varies depending on whether a VPC has been requested or not. The following list shows the default behavior in each case.
Default VPC: true
VPC: false
If no DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be private.
:type AutoMinorVersionUpgrade: boolean
:param AutoMinorVersionUpgrade: Indicates that minor version upgrades will be applied automatically to the DB instance during the maintenance window.
:type LicenseModel: string
:param LicenseModel: License model information for the restored DB instance.
Default: Same as source.
Valid values: license-included | bring-your-own-license | general-public-license
:type DBName: string
:param DBName: The database name for the restored DB instance.
Note
This parameter is not used for the MySQL or MariaDB engines.
:type Engine: string
:param Engine: The database engine to use for the new instance.
Default: The same as source
Constraint: Must be compatible with the engine of the source
Valid Values: MySQL | mariadb | oracle-se1 | oracle-se | oracle-ee | sqlserver-ee | sqlserver-se | sqlserver-ex | sqlserver-web | postgres | aurora
:type Iops: integer
:param Iops: The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance.
Constraints: Must be an integer greater than 1000.
SQL Server
Setting the IOPS value for the SQL Server database engine is not supported.
:type OptionGroupName: string
:param OptionGroupName: The name of the option group to be used for the restored DB instance.
Permanent options, such as the TDE option for Oracle Advanced Security TDE, cannot be removed from an option group, and that option group cannot be removed from a DB instance once it is associated with a DB instance
:type CopyTagsToSnapshot: boolean
:param CopyTagsToSnapshot: True to copy all tags from the restored DB instance to snapshots of the DB instance; otherwise false. The default is false.
:type Tags: list
:param Tags: A list of tags.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type StorageType: string
:param StorageType: Specifies the storage type to be associated with the DB instance.
Valid values: standard | gp2 | io1
If you specify io1 , you must also include a value for the Iops parameter.
Default: io1 if the Iops parameter is specified; otherwise standard
:type TdeCredentialArn: string
:param TdeCredentialArn: The ARN from the Key Store with which to associate the instance for TDE encryption.
:type TdeCredentialPassword: string
:param TdeCredentialPassword: The password for the given ARN from the Key Store in order to access the device.
:type Domain: string
:param Domain: Specify the Active Directory Domain to restore the instance in.
:type DomainIAMRoleName: string
:param DomainIAMRoleName: Specify the name of the IAM role to be used when making API calls to the Directory Service.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts; otherwise false.
You can enable IAM database authentication for the following database engines
For MySQL 5.6, minor version 5.6.34 or higher
For MySQL 5.7, minor version 5.7.16 or higher
Aurora 5.6 or higher.
Default: false
:rtype: dict
:return: {
'DBInstance': {
'DBInstanceIdentifier': 'string',
'DBInstanceClass': 'string',
'Engine': 'string',
'DBInstanceStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123,
'HostedZoneId': 'string'
},
'AllocatedStorage': 123,
'InstanceCreateTime': datetime(2015, 1, 1),
'PreferredBackupWindow': 'string',
'BackupRetentionPeriod': 123,
'DBSecurityGroups': [
{
'DBSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'ParameterApplyStatus': 'string'
},
],
'AvailabilityZone': 'string',
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'DBInstanceClass': 'string',
'AllocatedStorage': 123,
'MasterUserPassword': 'string',
'Port': 123,
'BackupRetentionPeriod': 123,
'MultiAZ': True|False,
'EngineVersion': 'string',
'LicenseModel': 'string',
'Iops': 123,
'DBInstanceIdentifier': 'string',
'StorageType': 'string',
'CACertificateIdentifier': 'string',
'DBSubnetGroupName': 'string'
},
'LatestRestorableTime': datetime(2015, 1, 1),
'MultiAZ': True|False,
'EngineVersion': 'string',
'AutoMinorVersionUpgrade': True|False,
'ReadReplicaSourceDBInstanceIdentifier': 'string',
'ReadReplicaDBInstanceIdentifiers': [
'string',
],
'ReadReplicaDBClusterIdentifiers': [
'string',
],
'LicenseModel': 'string',
'Iops': 123,
'OptionGroupMemberships': [
{
'OptionGroupName': 'string',
'Status': 'string'
},
],
'CharacterSetName': 'string',
'SecondaryAvailabilityZone': 'string',
'PubliclyAccessible': True|False,
'StatusInfos': [
{
'StatusType': 'string',
'Normal': True|False,
'Status': 'string',
'Message': 'string'
},
],
'StorageType': 'string',
'TdeCredentialArn': 'string',
'DbInstancePort': 123,
'DBClusterIdentifier': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbiResourceId': 'string',
'CACertificateIdentifier': 'string',
'DomainMemberships': [
{
'Domain': 'string',
'Status': 'string',
'FQDN': 'string',
'IAMRoleName': 'string'
},
],
'CopyTagsToSnapshot': True|False,
'MonitoringInterval': 123,
'EnhancedMonitoringResourceArn': 'string',
'MonitoringRoleArn': 'string',
'PromotionTier': 123,
'DBInstanceArn': 'string',
'Timezone': 'string',
'IAMDatabaseAuthenticationEnabled': True|False
}
}
:returns:
CreateDBInstance
DeleteDBInstance
ModifyDBInstance
"""
pass | Restores a DB instance to an arbitrary point in time. You can restore to any point in time before the time identified by the LatestRestorableTime property. You can restore to a point up to the number of days specified by the BackupRetentionPeriod property.
The target database is created with most of the original configuration, but in a system-selected availability zone, with the default security group, the default subnet group, and the default DB parameter group. By default, the new DB instance is created as a single-AZ deployment except when the instance is a SQL Server instance that has an option group that is associated with mirroring; in this case, the instance becomes a mirrored deployment and not a single-AZ deployment.
See also: AWS API Documentation
:example: response = client.restore_db_instance_to_point_in_time(
SourceDBInstanceIdentifier='string',
TargetDBInstanceIdentifier='string',
RestoreTime=datetime(2015, 1, 1),
UseLatestRestorableTime=True|False,
DBInstanceClass='string',
Port=123,
AvailabilityZone='string',
DBSubnetGroupName='string',
MultiAZ=True|False,
PubliclyAccessible=True|False,
AutoMinorVersionUpgrade=True|False,
LicenseModel='string',
DBName='string',
Engine='string',
Iops=123,
OptionGroupName='string',
CopyTagsToSnapshot=True|False,
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
StorageType='string',
TdeCredentialArn='string',
TdeCredentialPassword='string',
Domain='string',
DomainIAMRoleName='string',
EnableIAMDatabaseAuthentication=True|False
)
:type SourceDBInstanceIdentifier: string
:param SourceDBInstanceIdentifier: [REQUIRED]
The identifier of the source DB instance from which to restore.
Constraints:
Must be the identifier of an existing database instance
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type TargetDBInstanceIdentifier: string
:param TargetDBInstanceIdentifier: [REQUIRED]
The name of the new database instance to be created.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
:type RestoreTime: datetime
:param RestoreTime: The date and time to restore from.
Valid Values: Value must be a time in Universal Coordinated Time (UTC) format
Constraints:
Must be before the latest restorable time for the DB instance
Cannot be specified if UseLatestRestorableTime parameter is true
Example: 2009-09-07T23:45:00Z
:type UseLatestRestorableTime: boolean
:param UseLatestRestorableTime: Specifies whether (true ) or not (false ) the DB instance is restored from the latest backup time.
Default: false
Constraints: Cannot be specified if RestoreTime parameter is provided.
:type DBInstanceClass: string
:param DBInstanceClass: The compute and memory capacity of the Amazon RDS DB instance.
Valid Values: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.2xlarge | db.m2.4xlarge | db.m3.medium | db.m3.large | db.m3.xlarge | db.m3.2xlarge | db.m4.large | db.m4.xlarge | db.m4.2xlarge | db.m4.4xlarge | db.m4.10xlarge | db.r3.large | db.r3.xlarge | db.r3.2xlarge | db.r3.4xlarge | db.r3.8xlarge | db.t2.micro | db.t2.small | db.t2.medium | db.t2.large
Default: The same DBInstanceClass as the original DB instance.
:type Port: integer
:param Port: The port number on which the database accepts connections.
Constraints: Value must be 1150-65535
Default: The same port as the original DB instance.
:type AvailabilityZone: string
:param AvailabilityZone: The EC2 Availability Zone that the database instance will be created in.
Default: A random, system-chosen Availability Zone.
Constraint: You cannot specify the AvailabilityZone parameter if the MultiAZ parameter is set to true.
Example: us-east-1a
:type DBSubnetGroupName: string
:param DBSubnetGroupName: The DB subnet group name to use for the new instance.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.
Example: mySubnetgroup
:type MultiAZ: boolean
:param MultiAZ: Specifies if the DB instance is a Multi-AZ deployment.
Constraint: You cannot specify the AvailabilityZone parameter if the MultiAZ parameter is set to true .
:type PubliclyAccessible: boolean
:param PubliclyAccessible: Specifies the accessibility options for the DB instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.
Default: The default behavior varies depending on whether a VPC has been requested or not. The following list shows the default behavior in each case.
Default VPC: true
VPC: false
If no DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be private.
:type AutoMinorVersionUpgrade: boolean
:param AutoMinorVersionUpgrade: Indicates that minor version upgrades will be applied automatically to the DB instance during the maintenance window.
:type LicenseModel: string
:param LicenseModel: License model information for the restored DB instance.
Default: Same as source.
Valid values: license-included | bring-your-own-license | general-public-license
:type DBName: string
:param DBName: The database name for the restored DB instance.
Note
This parameter is not used for the MySQL or MariaDB engines.
:type Engine: string
:param Engine: The database engine to use for the new instance.
Default: The same as source
Constraint: Must be compatible with the engine of the source
Valid Values: MySQL | mariadb | oracle-se1 | oracle-se | oracle-ee | sqlserver-ee | sqlserver-se | sqlserver-ex | sqlserver-web | postgres | aurora
:type Iops: integer
:param Iops: The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB instance.
Constraints: Must be an integer greater than 1000.
SQL Server
Setting the IOPS value for the SQL Server database engine is not supported.
:type OptionGroupName: string
:param OptionGroupName: The name of the option group to be used for the restored DB instance.
Permanent options, such as the TDE option for Oracle Advanced Security TDE, cannot be removed from an option group, and that option group cannot be removed from a DB instance once it is associated with a DB instance
:type CopyTagsToSnapshot: boolean
:param CopyTagsToSnapshot: True to copy all tags from the restored DB instance to snapshots of the DB instance; otherwise false. The default is false.
:type Tags: list
:param Tags: A list of tags.
(dict) --Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
Value (string) --A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with 'aws:' or 'rds:'. The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: '^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$').
:type StorageType: string
:param StorageType: Specifies the storage type to be associated with the DB instance.
Valid values: standard | gp2 | io1
If you specify io1 , you must also include a value for the Iops parameter.
Default: io1 if the Iops parameter is specified; otherwise standard
:type TdeCredentialArn: string
:param TdeCredentialArn: The ARN from the Key Store with which to associate the instance for TDE encryption.
:type TdeCredentialPassword: string
:param TdeCredentialPassword: The password for the given ARN from the Key Store in order to access the device.
:type Domain: string
:param Domain: Specify the Active Directory Domain to restore the instance in.
:type DomainIAMRoleName: string
:param DomainIAMRoleName: Specify the name of the IAM role to be used when making API calls to the Directory Service.
:type EnableIAMDatabaseAuthentication: boolean
:param EnableIAMDatabaseAuthentication: True to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts; otherwise false.
You can enable IAM database authentication for the following database engines
For MySQL 5.6, minor version 5.6.34 or higher
For MySQL 5.7, minor version 5.7.16 or higher
Aurora 5.6 or higher.
Default: false
:rtype: dict
:return: {
'DBInstance': {
'DBInstanceIdentifier': 'string',
'DBInstanceClass': 'string',
'Engine': 'string',
'DBInstanceStatus': 'string',
'MasterUsername': 'string',
'DBName': 'string',
'Endpoint': {
'Address': 'string',
'Port': 123,
'HostedZoneId': 'string'
},
'AllocatedStorage': 123,
'InstanceCreateTime': datetime(2015, 1, 1),
'PreferredBackupWindow': 'string',
'BackupRetentionPeriod': 123,
'DBSecurityGroups': [
{
'DBSecurityGroupName': 'string',
'Status': 'string'
},
],
'VpcSecurityGroups': [
{
'VpcSecurityGroupId': 'string',
'Status': 'string'
},
],
'DBParameterGroups': [
{
'DBParameterGroupName': 'string',
'ParameterApplyStatus': 'string'
},
],
'AvailabilityZone': 'string',
'DBSubnetGroup': {
'DBSubnetGroupName': 'string',
'DBSubnetGroupDescription': 'string',
'VpcId': 'string',
'SubnetGroupStatus': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetStatus': 'string'
},
],
'DBSubnetGroupArn': 'string'
},
'PreferredMaintenanceWindow': 'string',
'PendingModifiedValues': {
'DBInstanceClass': 'string',
'AllocatedStorage': 123,
'MasterUserPassword': 'string',
'Port': 123,
'BackupRetentionPeriod': 123,
'MultiAZ': True|False,
'EngineVersion': 'string',
'LicenseModel': 'string',
'Iops': 123,
'DBInstanceIdentifier': 'string',
'StorageType': 'string',
'CACertificateIdentifier': 'string',
'DBSubnetGroupName': 'string'
},
'LatestRestorableTime': datetime(2015, 1, 1),
'MultiAZ': True|False,
'EngineVersion': 'string',
'AutoMinorVersionUpgrade': True|False,
'ReadReplicaSourceDBInstanceIdentifier': 'string',
'ReadReplicaDBInstanceIdentifiers': [
'string',
],
'ReadReplicaDBClusterIdentifiers': [
'string',
],
'LicenseModel': 'string',
'Iops': 123,
'OptionGroupMemberships': [
{
'OptionGroupName': 'string',
'Status': 'string'
},
],
'CharacterSetName': 'string',
'SecondaryAvailabilityZone': 'string',
'PubliclyAccessible': True|False,
'StatusInfos': [
{
'StatusType': 'string',
'Normal': True|False,
'Status': 'string',
'Message': 'string'
},
],
'StorageType': 'string',
'TdeCredentialArn': 'string',
'DbInstancePort': 123,
'DBClusterIdentifier': 'string',
'StorageEncrypted': True|False,
'KmsKeyId': 'string',
'DbiResourceId': 'string',
'CACertificateIdentifier': 'string',
'DomainMemberships': [
{
'Domain': 'string',
'Status': 'string',
'FQDN': 'string',
'IAMRoleName': 'string'
},
],
'CopyTagsToSnapshot': True|False,
'MonitoringInterval': 123,
'EnhancedMonitoringResourceArn': 'string',
'MonitoringRoleArn': 'string',
'PromotionTier': 123,
'DBInstanceArn': 'string',
'Timezone': 'string',
'IAMDatabaseAuthenticationEnabled': True|False
}
}
:returns:
CreateDBInstance
DeleteDBInstance
ModifyDBInstance | entailment |
def update_health_check(HealthCheckId=None, HealthCheckVersion=None, IPAddress=None, Port=None, ResourcePath=None, FullyQualifiedDomainName=None, SearchString=None, FailureThreshold=None, Inverted=None, HealthThreshold=None, ChildHealthChecks=None, EnableSNI=None, Regions=None, AlarmIdentifier=None, InsufficientDataHealthStatus=None):
"""
Updates an existing health check. Note that some values can't be updated.
For more information about updating health checks, see Creating, Updating, and Deleting Health Checks in the Amazon Route 53 Developer Guide .
See also: AWS API Documentation
:example: response = client.update_health_check(
HealthCheckId='string',
HealthCheckVersion=123,
IPAddress='string',
Port=123,
ResourcePath='string',
FullyQualifiedDomainName='string',
SearchString='string',
FailureThreshold=123,
Inverted=True|False,
HealthThreshold=123,
ChildHealthChecks=[
'string',
],
EnableSNI=True|False,
Regions=[
'us-east-1'|'us-west-1'|'us-west-2'|'eu-west-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'sa-east-1',
],
AlarmIdentifier={
'Region': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'ca-central-1'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'sa-east-1',
'Name': 'string'
},
InsufficientDataHealthStatus='Healthy'|'Unhealthy'|'LastKnownStatus'
)
:type HealthCheckId: string
:param HealthCheckId: [REQUIRED]
The ID for the health check for which you want detailed information. When you created the health check, CreateHealthCheck returned the ID in the response, in the HealthCheckId element.
:type HealthCheckVersion: integer
:param HealthCheckVersion: A sequential counter that Amazon Route 53 sets to 1 when you create a health check and increments by 1 each time you update settings for the health check.
We recommend that you use GetHealthCheck or ListHealthChecks to get the current value of HealthCheckVersion for the health check that you want to update, and that you include that value in your UpdateHealthCheck request. This prevents Amazon Route 53 from overwriting an intervening update:
If the value in the UpdateHealthCheck request matches the value of HealthCheckVersion in the health check, Amazon Route 53 updates the health check with the new settings.
If the value of HealthCheckVersion in the health check is greater, the health check was changed after you got the version number. Amazon Route 53 does not update the health check, and it returns a HealthCheckVersionMismatch error.
:type IPAddress: string
:param IPAddress: The IPv4 or IPv6 IP address for the endpoint that you want Amazon Route 53 to perform health checks on. If you don't specify a value for IPAddress , Amazon Route 53 sends a DNS request to resolve the domain name that you specify in FullyQualifiedDomainName at the interval that you specify in RequestInterval . Using an IP address that is returned by DNS, Amazon Route 53 then checks the health of the endpoint.
Use one of the following formats for the value of IPAddress :
IPv4 address : four values between 0 and 255, separated by periods (.), for example, 192.0.2.44 .
IPv6 address : eight groups of four hexadecimal values, separated by colons (:), for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345 . You can also shorten IPv6 addresses as described in RFC 5952, for example, 2001:db8:85a3::abcd:1:2345 .
If the endpoint is an EC2 instance, we recommend that you create an Elastic IP address, associate it with your EC2 instance, and specify the Elastic IP address for IPAddress . This ensures that the IP address of your instance never changes. For more information, see the applicable documentation:
Linux: Elastic IP Addresses (EIP) in the Amazon EC2 User Guide for Linux Instances
Windows: Elastic IP Addresses (EIP) in the Amazon EC2 User Guide for Windows Instances
Note
If a health check already has a value for IPAddress , you can change the value. However, you can't update an existing health check to add or remove the value of IPAddress .
For more information, see UpdateHealthCheckRequest$FullyQualifiedDomainName .
Constraints: Amazon Route 53 can't check the health of endpoints for which the IP address is in local, private, non-routable, or multicast ranges. For more information about IP addresses for which you can't create health checks, see the following documents:
RFC 5735, Special Use IPv4 Addresses
RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space
RFC 5156, Special-Use IPv6 Addresses
:type Port: integer
:param Port: The port on the endpoint on which you want Amazon Route 53 to perform health checks.
:type ResourcePath: string
:param ResourcePath: The path that you want Amazon Route 53 to request when performing health checks. The path can be any value for which your endpoint will return an HTTP status code of 2xx or 3xx when the endpoint is healthy, for example the file /docs/route53-health-check.html.
Specify this value only if you want to change it.
:type FullyQualifiedDomainName: string
:param FullyQualifiedDomainName: Amazon Route 53 behavior depends on whether you specify a value for IPAddress .
Note
If a health check already has a value for IPAddress , you can change the value. However, you can't update an existing health check to add or remove the value of IPAddress .
If you specify a value for IPAddress :
Amazon Route 53 sends health check requests to the specified IPv4 or IPv6 address and passes the value of FullyQualifiedDomainName in the Host header for all health checks except TCP health checks. This is typically the fully qualified DNS name of the endpoint on which you want Amazon Route 53 to perform health checks.
When Amazon Route 53 checks the health of an endpoint, here is how it constructs the Host header:
If you specify a value of 80 for Port and HTTP or HTTP_STR_MATCH for Type , Amazon Route 53 passes the value of FullyQualifiedDomainName to the endpoint in the Host header.
If you specify a value of 443 for Port and HTTPS or HTTPS_STR_MATCH for Type , Amazon Route 53 passes the value of FullyQualifiedDomainName to the endpoint in the Host header.
If you specify another value for Port and any value except TCP for Type , Amazon Route 53 passes * FullyQualifiedDomainName :Port * to the endpoint in the Host header.
If you don't specify a value for FullyQualifiedDomainName , Amazon Route 53 substitutes the value of IPAddress in the Host header in each of the above cases.
If you don't specify a value for IPAddress :
If you don't specify a value for IPAddress , Amazon Route 53 sends a DNS request to the domain that you specify in FullyQualifiedDomainName at the interval you specify in RequestInterval . Using an IPv4 address that is returned by DNS, Amazon Route 53 then checks the health of the endpoint.
Note
If you don't specify a value for IPAddress , Amazon Route 53 uses only IPv4 to send health checks to the endpoint. If there's no resource record set with a type of A for the name that you specify for FullyQualifiedDomainName , the health check fails with a 'DNS resolution failed' error.
If you want to check the health of weighted, latency, or failover resource record sets and you choose to specify the endpoint only by FullyQualifiedDomainName , we recommend that you create a separate health check for each endpoint. For example, create a health check for each HTTP server that is serving content for www.example.com. For the value of FullyQualifiedDomainName , specify the domain name of the server (such as us-east-2-www.example.com ), not the name of the resource record sets (www.example.com).
Warning
In this configuration, if the value of FullyQualifiedDomainName matches the name of the resource record sets and you then associate the health check with those resource record sets, health check results will be unpredictable.
In addition, if the value of Type is HTTP , HTTPS , HTTP_STR_MATCH , or HTTPS_STR_MATCH , Amazon Route 53 passes the value of FullyQualifiedDomainName in the Host header, as it does when you specify a value for IPAddress . If the value of Type is TCP , Amazon Route 53 doesn't pass a Host header.
:type SearchString: string
:param SearchString: If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH , the string that you want Amazon Route 53 to search for in the response body from the specified resource. If the string appears in the response body, Amazon Route 53 considers the resource healthy. (You can't change the value of Type when you update a health check.)
:type FailureThreshold: integer
:param FailureThreshold: The number of consecutive health checks that an endpoint must pass or fail for Amazon Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa. For more information, see How Amazon Route 53 Determines Whether an Endpoint Is Healthy in the Amazon Route 53 Developer Guide .
If you don't specify a value for FailureThreshold , the default value is three health checks.
:type Inverted: boolean
:param Inverted: Specify whether you want Amazon Route 53 to invert the status of a health check, for example, to consider a health check unhealthy when it otherwise would be considered healthy.
:type HealthThreshold: integer
:param HealthThreshold: The number of child health checks that are associated with a CALCULATED health that Amazon Route 53 must consider healthy for the CALCULATED health check to be considered healthy. To specify the child health checks that you want to associate with a CALCULATED health check, use the ChildHealthChecks and ChildHealthCheck elements.
Note the following:
If you specify a number greater than the number of child health checks, Amazon Route 53 always considers this health check to be unhealthy.
If you specify 0 , Amazon Route 53 always considers this health check to be healthy.
:type ChildHealthChecks: list
:param ChildHealthChecks: A complex type that contains one ChildHealthCheck element for each health check that you want to associate with a CALCULATED health check.
(string) --
:type EnableSNI: boolean
:param EnableSNI: Specify whether you want Amazon Route 53 to send the value of FullyQualifiedDomainName to the endpoint in the client_hello message during TLS negotiation. This allows the endpoint to respond to HTTPS health check requests with the applicable SSL/TLS certificate.
Some endpoints require that HTTPS requests include the host name in the client_hello message. If you don't enable SNI, the status of the health check will be SSL alert handshake_failure . A health check can also have that status for other reasons. If SNI is enabled and you're still getting the error, check the SSL/TLS configuration on your endpoint and confirm that your certificate is valid.
The SSL/TLS certificate on your endpoint includes a domain name in the Common Name field and possibly several more in the Subject Alternative Names field. One of the domain names in the certificate should match the value that you specify for FullyQualifiedDomainName . If the endpoint responds to the client_hello message with a certificate that does not include the domain name that you specified in FullyQualifiedDomainName , a health checker will retry the handshake. In the second attempt, the health checker will omit FullyQualifiedDomainName from the client_hello message.
:type Regions: list
:param Regions: A complex type that contains one Region element for each region that you want Amazon Route 53 health checkers to check the specified endpoint from.
(string) --
:type AlarmIdentifier: dict
:param AlarmIdentifier: A complex type that identifies the CloudWatch alarm that you want Amazon Route 53 health checkers to use to determine whether this health check is healthy.
Region (string) -- [REQUIRED]A complex type that identifies the CloudWatch alarm that you want Amazon Route 53 health checkers to use to determine whether this health check is healthy.
For the current list of CloudWatch regions, see Amazon CloudWatch in the AWS Regions and Endpoints chapter of the Amazon Web Services General Reference .
Name (string) -- [REQUIRED]The name of the CloudWatch alarm that you want Amazon Route 53 health checkers to use to determine whether this health check is healthy.
:type InsufficientDataHealthStatus: string
:param InsufficientDataHealthStatus: When CloudWatch has insufficient data about the metric to determine the alarm state, the status that you want Amazon Route 53 to assign to the health check:
Healthy : Amazon Route 53 considers the health check to be healthy.
Unhealthy : Amazon Route 53 considers the health check to be unhealthy.
LastKnownStatus : Amazon Route 53 uses the status of the health check from the last time CloudWatch had sufficient data to determine the alarm state. For new health checks that have no last known status, the default status for the health check is healthy.
:rtype: dict
:return: {
'HealthCheck': {
'Id': 'string',
'CallerReference': 'string',
'HealthCheckConfig': {
'IPAddress': 'string',
'Port': 123,
'Type': 'HTTP'|'HTTPS'|'HTTP_STR_MATCH'|'HTTPS_STR_MATCH'|'TCP'|'CALCULATED'|'CLOUDWATCH_METRIC',
'ResourcePath': 'string',
'FullyQualifiedDomainName': 'string',
'SearchString': 'string',
'RequestInterval': 123,
'FailureThreshold': 123,
'MeasureLatency': True|False,
'Inverted': True|False,
'HealthThreshold': 123,
'ChildHealthChecks': [
'string',
],
'EnableSNI': True|False,
'Regions': [
'us-east-1'|'us-west-1'|'us-west-2'|'eu-west-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'sa-east-1',
],
'AlarmIdentifier': {
'Region': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'ca-central-1'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'sa-east-1',
'Name': 'string'
},
'InsufficientDataHealthStatus': 'Healthy'|'Unhealthy'|'LastKnownStatus'
},
'HealthCheckVersion': 123,
'CloudWatchAlarmConfiguration': {
'EvaluationPeriods': 123,
'Threshold': 123.0,
'ComparisonOperator': 'GreaterThanOrEqualToThreshold'|'GreaterThanThreshold'|'LessThanThreshold'|'LessThanOrEqualToThreshold',
'Period': 123,
'MetricName': 'string',
'Namespace': 'string',
'Statistic': 'Average'|'Sum'|'SampleCount'|'Maximum'|'Minimum',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
}
}
}
:returns:
IPv4 address : four values between 0 and 255, separated by periods (.), for example, 192.0.2.44 .
IPv6 address : eight groups of four hexadecimal values, separated by colons (:), for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345 . You can also shorten IPv6 addresses as described in RFC 5952, for example, 2001:db8:85a3::abcd:1:2345 .
"""
pass | Updates an existing health check. Note that some values can't be updated.
For more information about updating health checks, see Creating, Updating, and Deleting Health Checks in the Amazon Route 53 Developer Guide .
See also: AWS API Documentation
:example: response = client.update_health_check(
HealthCheckId='string',
HealthCheckVersion=123,
IPAddress='string',
Port=123,
ResourcePath='string',
FullyQualifiedDomainName='string',
SearchString='string',
FailureThreshold=123,
Inverted=True|False,
HealthThreshold=123,
ChildHealthChecks=[
'string',
],
EnableSNI=True|False,
Regions=[
'us-east-1'|'us-west-1'|'us-west-2'|'eu-west-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'sa-east-1',
],
AlarmIdentifier={
'Region': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'ca-central-1'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'sa-east-1',
'Name': 'string'
},
InsufficientDataHealthStatus='Healthy'|'Unhealthy'|'LastKnownStatus'
)
:type HealthCheckId: string
:param HealthCheckId: [REQUIRED]
The ID for the health check for which you want detailed information. When you created the health check, CreateHealthCheck returned the ID in the response, in the HealthCheckId element.
:type HealthCheckVersion: integer
:param HealthCheckVersion: A sequential counter that Amazon Route 53 sets to 1 when you create a health check and increments by 1 each time you update settings for the health check.
We recommend that you use GetHealthCheck or ListHealthChecks to get the current value of HealthCheckVersion for the health check that you want to update, and that you include that value in your UpdateHealthCheck request. This prevents Amazon Route 53 from overwriting an intervening update:
If the value in the UpdateHealthCheck request matches the value of HealthCheckVersion in the health check, Amazon Route 53 updates the health check with the new settings.
If the value of HealthCheckVersion in the health check is greater, the health check was changed after you got the version number. Amazon Route 53 does not update the health check, and it returns a HealthCheckVersionMismatch error.
:type IPAddress: string
:param IPAddress: The IPv4 or IPv6 IP address for the endpoint that you want Amazon Route 53 to perform health checks on. If you don't specify a value for IPAddress , Amazon Route 53 sends a DNS request to resolve the domain name that you specify in FullyQualifiedDomainName at the interval that you specify in RequestInterval . Using an IP address that is returned by DNS, Amazon Route 53 then checks the health of the endpoint.
Use one of the following formats for the value of IPAddress :
IPv4 address : four values between 0 and 255, separated by periods (.), for example, 192.0.2.44 .
IPv6 address : eight groups of four hexadecimal values, separated by colons (:), for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345 . You can also shorten IPv6 addresses as described in RFC 5952, for example, 2001:db8:85a3::abcd:1:2345 .
If the endpoint is an EC2 instance, we recommend that you create an Elastic IP address, associate it with your EC2 instance, and specify the Elastic IP address for IPAddress . This ensures that the IP address of your instance never changes. For more information, see the applicable documentation:
Linux: Elastic IP Addresses (EIP) in the Amazon EC2 User Guide for Linux Instances
Windows: Elastic IP Addresses (EIP) in the Amazon EC2 User Guide for Windows Instances
Note
If a health check already has a value for IPAddress , you can change the value. However, you can't update an existing health check to add or remove the value of IPAddress .
For more information, see UpdateHealthCheckRequest$FullyQualifiedDomainName .
Constraints: Amazon Route 53 can't check the health of endpoints for which the IP address is in local, private, non-routable, or multicast ranges. For more information about IP addresses for which you can't create health checks, see the following documents:
RFC 5735, Special Use IPv4 Addresses
RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space
RFC 5156, Special-Use IPv6 Addresses
:type Port: integer
:param Port: The port on the endpoint on which you want Amazon Route 53 to perform health checks.
:type ResourcePath: string
:param ResourcePath: The path that you want Amazon Route 53 to request when performing health checks. The path can be any value for which your endpoint will return an HTTP status code of 2xx or 3xx when the endpoint is healthy, for example the file /docs/route53-health-check.html.
Specify this value only if you want to change it.
:type FullyQualifiedDomainName: string
:param FullyQualifiedDomainName: Amazon Route 53 behavior depends on whether you specify a value for IPAddress .
Note
If a health check already has a value for IPAddress , you can change the value. However, you can't update an existing health check to add or remove the value of IPAddress .
If you specify a value for IPAddress :
Amazon Route 53 sends health check requests to the specified IPv4 or IPv6 address and passes the value of FullyQualifiedDomainName in the Host header for all health checks except TCP health checks. This is typically the fully qualified DNS name of the endpoint on which you want Amazon Route 53 to perform health checks.
When Amazon Route 53 checks the health of an endpoint, here is how it constructs the Host header:
If you specify a value of 80 for Port and HTTP or HTTP_STR_MATCH for Type , Amazon Route 53 passes the value of FullyQualifiedDomainName to the endpoint in the Host header.
If you specify a value of 443 for Port and HTTPS or HTTPS_STR_MATCH for Type , Amazon Route 53 passes the value of FullyQualifiedDomainName to the endpoint in the Host header.
If you specify another value for Port and any value except TCP for Type , Amazon Route 53 passes * FullyQualifiedDomainName :Port * to the endpoint in the Host header.
If you don't specify a value for FullyQualifiedDomainName , Amazon Route 53 substitutes the value of IPAddress in the Host header in each of the above cases.
If you don't specify a value for IPAddress :
If you don't specify a value for IPAddress , Amazon Route 53 sends a DNS request to the domain that you specify in FullyQualifiedDomainName at the interval you specify in RequestInterval . Using an IPv4 address that is returned by DNS, Amazon Route 53 then checks the health of the endpoint.
Note
If you don't specify a value for IPAddress , Amazon Route 53 uses only IPv4 to send health checks to the endpoint. If there's no resource record set with a type of A for the name that you specify for FullyQualifiedDomainName , the health check fails with a 'DNS resolution failed' error.
If you want to check the health of weighted, latency, or failover resource record sets and you choose to specify the endpoint only by FullyQualifiedDomainName , we recommend that you create a separate health check for each endpoint. For example, create a health check for each HTTP server that is serving content for www.example.com. For the value of FullyQualifiedDomainName , specify the domain name of the server (such as us-east-2-www.example.com ), not the name of the resource record sets (www.example.com).
Warning
In this configuration, if the value of FullyQualifiedDomainName matches the name of the resource record sets and you then associate the health check with those resource record sets, health check results will be unpredictable.
In addition, if the value of Type is HTTP , HTTPS , HTTP_STR_MATCH , or HTTPS_STR_MATCH , Amazon Route 53 passes the value of FullyQualifiedDomainName in the Host header, as it does when you specify a value for IPAddress . If the value of Type is TCP , Amazon Route 53 doesn't pass a Host header.
:type SearchString: string
:param SearchString: If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH , the string that you want Amazon Route 53 to search for in the response body from the specified resource. If the string appears in the response body, Amazon Route 53 considers the resource healthy. (You can't change the value of Type when you update a health check.)
:type FailureThreshold: integer
:param FailureThreshold: The number of consecutive health checks that an endpoint must pass or fail for Amazon Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa. For more information, see How Amazon Route 53 Determines Whether an Endpoint Is Healthy in the Amazon Route 53 Developer Guide .
If you don't specify a value for FailureThreshold , the default value is three health checks.
:type Inverted: boolean
:param Inverted: Specify whether you want Amazon Route 53 to invert the status of a health check, for example, to consider a health check unhealthy when it otherwise would be considered healthy.
:type HealthThreshold: integer
:param HealthThreshold: The number of child health checks that are associated with a CALCULATED health that Amazon Route 53 must consider healthy for the CALCULATED health check to be considered healthy. To specify the child health checks that you want to associate with a CALCULATED health check, use the ChildHealthChecks and ChildHealthCheck elements.
Note the following:
If you specify a number greater than the number of child health checks, Amazon Route 53 always considers this health check to be unhealthy.
If you specify 0 , Amazon Route 53 always considers this health check to be healthy.
:type ChildHealthChecks: list
:param ChildHealthChecks: A complex type that contains one ChildHealthCheck element for each health check that you want to associate with a CALCULATED health check.
(string) --
:type EnableSNI: boolean
:param EnableSNI: Specify whether you want Amazon Route 53 to send the value of FullyQualifiedDomainName to the endpoint in the client_hello message during TLS negotiation. This allows the endpoint to respond to HTTPS health check requests with the applicable SSL/TLS certificate.
Some endpoints require that HTTPS requests include the host name in the client_hello message. If you don't enable SNI, the status of the health check will be SSL alert handshake_failure . A health check can also have that status for other reasons. If SNI is enabled and you're still getting the error, check the SSL/TLS configuration on your endpoint and confirm that your certificate is valid.
The SSL/TLS certificate on your endpoint includes a domain name in the Common Name field and possibly several more in the Subject Alternative Names field. One of the domain names in the certificate should match the value that you specify for FullyQualifiedDomainName . If the endpoint responds to the client_hello message with a certificate that does not include the domain name that you specified in FullyQualifiedDomainName , a health checker will retry the handshake. In the second attempt, the health checker will omit FullyQualifiedDomainName from the client_hello message.
:type Regions: list
:param Regions: A complex type that contains one Region element for each region that you want Amazon Route 53 health checkers to check the specified endpoint from.
(string) --
:type AlarmIdentifier: dict
:param AlarmIdentifier: A complex type that identifies the CloudWatch alarm that you want Amazon Route 53 health checkers to use to determine whether this health check is healthy.
Region (string) -- [REQUIRED]A complex type that identifies the CloudWatch alarm that you want Amazon Route 53 health checkers to use to determine whether this health check is healthy.
For the current list of CloudWatch regions, see Amazon CloudWatch in the AWS Regions and Endpoints chapter of the Amazon Web Services General Reference .
Name (string) -- [REQUIRED]The name of the CloudWatch alarm that you want Amazon Route 53 health checkers to use to determine whether this health check is healthy.
:type InsufficientDataHealthStatus: string
:param InsufficientDataHealthStatus: When CloudWatch has insufficient data about the metric to determine the alarm state, the status that you want Amazon Route 53 to assign to the health check:
Healthy : Amazon Route 53 considers the health check to be healthy.
Unhealthy : Amazon Route 53 considers the health check to be unhealthy.
LastKnownStatus : Amazon Route 53 uses the status of the health check from the last time CloudWatch had sufficient data to determine the alarm state. For new health checks that have no last known status, the default status for the health check is healthy.
:rtype: dict
:return: {
'HealthCheck': {
'Id': 'string',
'CallerReference': 'string',
'HealthCheckConfig': {
'IPAddress': 'string',
'Port': 123,
'Type': 'HTTP'|'HTTPS'|'HTTP_STR_MATCH'|'HTTPS_STR_MATCH'|'TCP'|'CALCULATED'|'CLOUDWATCH_METRIC',
'ResourcePath': 'string',
'FullyQualifiedDomainName': 'string',
'SearchString': 'string',
'RequestInterval': 123,
'FailureThreshold': 123,
'MeasureLatency': True|False,
'Inverted': True|False,
'HealthThreshold': 123,
'ChildHealthChecks': [
'string',
],
'EnableSNI': True|False,
'Regions': [
'us-east-1'|'us-west-1'|'us-west-2'|'eu-west-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'sa-east-1',
],
'AlarmIdentifier': {
'Region': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'ca-central-1'|'eu-central-1'|'eu-west-1'|'eu-west-2'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'sa-east-1',
'Name': 'string'
},
'InsufficientDataHealthStatus': 'Healthy'|'Unhealthy'|'LastKnownStatus'
},
'HealthCheckVersion': 123,
'CloudWatchAlarmConfiguration': {
'EvaluationPeriods': 123,
'Threshold': 123.0,
'ComparisonOperator': 'GreaterThanOrEqualToThreshold'|'GreaterThanThreshold'|'LessThanThreshold'|'LessThanOrEqualToThreshold',
'Period': 123,
'MetricName': 'string',
'Namespace': 'string',
'Statistic': 'Average'|'Sum'|'SampleCount'|'Maximum'|'Minimum',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
}
}
}
:returns:
IPv4 address : four values between 0 and 255, separated by periods (.), for example, 192.0.2.44 .
IPv6 address : eight groups of four hexadecimal values, separated by colons (:), for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345 . You can also shorten IPv6 addresses as described in RFC 5952, for example, 2001:db8:85a3::abcd:1:2345 . | entailment |
def create_hit(MaxAssignments=None, AutoApprovalDelayInSeconds=None, LifetimeInSeconds=None, AssignmentDurationInSeconds=None, Reward=None, Title=None, Keywords=None, Description=None, Question=None, RequesterAnnotation=None, QualificationRequirements=None, UniqueRequestToken=None, AssignmentReviewPolicy=None, HITReviewPolicy=None, HITLayoutId=None, HITLayoutParameters=None):
"""
The CreateHIT operation creates a new Human Intelligence Task (HIT). The new HIT is made available for Workers to find and accept on the Amazon Mechanical Turk website.
This operation allows you to specify a new HIT by passing in values for the properties of the HIT, such as its title, reward amount and number of assignments. When you pass these values to CreateHIT , a new HIT is created for you, with a new HITTypeID . The HITTypeID can be used to create additional HITs in the future without needing to specify common parameters such as the title, description and reward amount each time.
An alternative way to create HITs is to first generate a HITTypeID using the CreateHITType operation and then call the CreateHITWithHITType operation. This is the recommended best practice for Requesters who are creating large numbers of HITs.
CreateHIT also supports several ways to provide question data: by providing a value for the Question parameter that fully specifies the contents of the HIT, or by providing a HitLayoutId and associated HitLayoutParameters .
See also: AWS API Documentation
:example: response = client.create_hit(
MaxAssignments=123,
AutoApprovalDelayInSeconds=123,
LifetimeInSeconds=123,
AssignmentDurationInSeconds=123,
Reward='string',
Title='string',
Keywords='string',
Description='string',
Question='string',
RequesterAnnotation='string',
QualificationRequirements=[
{
'QualificationTypeId': 'string',
'Comparator': 'LessThan'|'LessThanOrEqualTo'|'GreaterThan'|'GreaterThanOrEqualTo'|'EqualTo'|'NotEqualTo'|'Exists'|'DoesNotExist'|'In'|'NotIn',
'IntegerValues': [
123,
],
'LocaleValues': [
{
'Country': 'string',
'Subdivision': 'string'
},
],
'RequiredToPreview': True|False
},
],
UniqueRequestToken='string',
AssignmentReviewPolicy={
'PolicyName': 'string',
'Parameters': [
{
'Key': 'string',
'Values': [
'string',
],
'MapEntries': [
{
'Key': 'string',
'Values': [
'string',
]
},
]
},
]
},
HITReviewPolicy={
'PolicyName': 'string',
'Parameters': [
{
'Key': 'string',
'Values': [
'string',
],
'MapEntries': [
{
'Key': 'string',
'Values': [
'string',
]
},
]
},
]
},
HITLayoutId='string',
HITLayoutParameters=[
{
'Name': 'string',
'Value': 'string'
},
]
)
:type MaxAssignments: integer
:param MaxAssignments: The number of times the HIT can be accepted and completed before the HIT becomes unavailable.
:type AutoApprovalDelayInSeconds: integer
:param AutoApprovalDelayInSeconds: The number of seconds after an assignment for the HIT has been submitted, after which the assignment is considered Approved automatically unless the Requester explicitly rejects it.
:type LifetimeInSeconds: integer
:param LifetimeInSeconds: [REQUIRED]
An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT have been accepted.
:type AssignmentDurationInSeconds: integer
:param AssignmentDurationInSeconds: [REQUIRED]
The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find and accept.
:type Reward: string
:param Reward: [REQUIRED]
The amount of money the Requester will pay a Worker for successfully completing the HIT.
:type Title: string
:param Title: [REQUIRED]
The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned.
:type Keywords: string
:param Keywords: One or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find HITs.
:type Description: string
:param Description: [REQUIRED]
A general description of the HIT. A description includes detailed information about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate the HIT before accepting it.
:type Question: string
:param Question: The data the person completing the HIT uses to produce the results.
Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including whitespace.
Either a Question parameter or a HITLayoutId parameter must be provided.
:type RequesterAnnotation: string
:param RequesterAnnotation: An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to the HIT for tracking purposes. For example, this parameter could be an identifier internal to the Requester's application that corresponds with the HIT.
The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is not shown to the Worker, or any other Requester.
The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your HITs are grouped.
:type QualificationRequirements: list
:param QualificationRequirements: A condition that a Worker's Qualifications must meet before the Worker is allowed to accept and complete the HIT.
(dict) --The QualificationRequirement data structure describes a Qualification that a Worker must have before the Worker is allowed to accept a HIT. A requirement may optionally state that a Worker must have the Qualification in order to preview the HIT.
QualificationTypeId (string) -- [REQUIRED]The ID of the Qualification type for the requirement.
Comparator (string) -- [REQUIRED]The kind of comparison to make against a Qualification's value. You can compare a Qualification's value to an IntegerValue to see if it is LessThan, LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, EqualTo, or NotEqualTo the IntegerValue. You can compare it to a LocaleValue to see if it is EqualTo, or NotEqualTo the LocaleValue. You can check to see if the value is In or NotIn a set of IntegerValue or LocaleValue values. Lastly, a Qualification requirement can also test if a Qualification Exists or DoesNotExist in the user's profile, regardless of its value.
IntegerValues (list) --The integer value to compare against the Qualification's value. IntegerValue must not be present if Comparator is Exists or DoesNotExist. IntegerValue can only be used if the Qualification type has an integer value; it cannot be used with the Worker_Locale QualificationType ID. When performing a set comparison by using the In or the NotIn comparator, you can use up to 15 IntegerValue elements in a QualificationRequirement data structure.
(integer) --
LocaleValues (list) --The locale value to compare against the Qualification's value. The local value must be a valid ISO 3166 country code or supports ISO 3166-2 subdivisions. LocaleValue can only be used with a Worker_Locale QualificationType ID. LocaleValue can only be used with the EqualTo, NotEqualTo, In, and NotIn comparators. You must only use a single LocaleValue element when using the EqualTo or NotEqualTo comparators. When performing a set comparison by using the In or the NotIn comparator, you can use up to 30 LocaleValue elements in a QualificationRequirement data structure.
(dict) --The Locale data structure represents a geographical region or location.
Country (string) -- [REQUIRED]The country of the locale. Must be a valid ISO 3166 country code. For example, the code US refers to the United States of America.
Subdivision (string) --The state or subdivision of the locale. A valid ISO 3166-2 subdivision code. For example, the code WA refers to the state of Washington.
RequiredToPreview (boolean) --If true, the question data for the HIT will not be shown when a Worker whose Qualifications do not meet this requirement tries to preview the HIT. That is, a Worker's Qualifications must meet all of the requirements for which RequiredToPreview is true in order to preview the HIT. If a Worker meets all of the requirements where RequiredToPreview is true (or if there are no such requirements), but does not meet all of the requirements for the HIT, the Worker will be allowed to preview the HIT's question data, but will not be allowed to accept and complete the HIT. The default is false.
:type UniqueRequestToken: string
:param UniqueRequestToken: A unique identifier for this request which allows you to retry the call on error without creating duplicate HITs. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the HIT already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a message containing the HITId.
Note
Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 hours. Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create duplicate HITs.
:type AssignmentReviewPolicy: dict
:param AssignmentReviewPolicy: The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk to take various actions based on the policy.
PolicyName (string) --Name of a Review Policy: SimplePlurality/2011-09-01 or ScoreMyKnownAnswers/2011-09-01
Parameters (list) --Name of the parameter from the Review policy.
(dict) --Name of the parameter from the Review policy.
Key (string) --Name of the parameter from the list of Review Polices.
Values (list) --The list of values of the Parameter
(string) --
MapEntries (list) --List of ParameterMapEntry objects.
(dict) --This data structure is the data type for the AnswerKey parameter of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Key (string) --The QuestionID from the HIT that is used to identify which question requires Mechanical Turk to score as part of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Values (list) --The list of answers to the question specified in the MapEntry Key element. The Worker must match all values in order for the answer to be scored correctly.
(string) --
:type HITReviewPolicy: dict
:param HITReviewPolicy: The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy.
PolicyName (string) --Name of a Review Policy: SimplePlurality/2011-09-01 or ScoreMyKnownAnswers/2011-09-01
Parameters (list) --Name of the parameter from the Review policy.
(dict) --Name of the parameter from the Review policy.
Key (string) --Name of the parameter from the list of Review Polices.
Values (list) --The list of values of the Parameter
(string) --
MapEntries (list) --List of ParameterMapEntry objects.
(dict) --This data structure is the data type for the AnswerKey parameter of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Key (string) --The QuestionID from the HIT that is used to identify which question requires Mechanical Turk to score as part of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Values (list) --The list of answers to the question specified in the MapEntry Key element. The Worker must match all values in order for the answer to be scored correctly.
(string) --
:type HITLayoutId: string
:param HITLayoutId: The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an additional HIT by providing those values as HITLayoutParameters.
Constraints: Either a Question parameter or a HITLayoutId parameter must be provided.
:type HITLayoutParameters: list
:param HITLayoutParameters: If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter structure. For more information, see HITLayout.
(dict) --The HITLayoutParameter data structure defines parameter values used with a HITLayout. A HITLayout is a reusable Amazon Mechanical Turk project template used to provide Human Intelligence Task (HIT) question data for CreateHIT.
Name (string) --The name of the parameter in the HITLayout.
Value (string) --The value substituted for the parameter referenced in the HITLayout.
:rtype: dict
:return: {
'HIT': {
'HITId': 'string',
'HITTypeId': 'string',
'HITGroupId': 'string',
'HITLayoutId': 'string',
'CreationTime': datetime(2015, 1, 1),
'Title': 'string',
'Description': 'string',
'Question': 'string',
'Keywords': 'string',
'HITStatus': 'Assignable'|'Unassignable'|'Reviewable'|'Reviewing'|'Disposed',
'MaxAssignments': 123,
'Reward': 'string',
'AutoApprovalDelayInSeconds': 123,
'Expiration': datetime(2015, 1, 1),
'AssignmentDurationInSeconds': 123,
'RequesterAnnotation': 'string',
'QualificationRequirements': [
{
'QualificationTypeId': 'string',
'Comparator': 'LessThan'|'LessThanOrEqualTo'|'GreaterThan'|'GreaterThanOrEqualTo'|'EqualTo'|'NotEqualTo'|'Exists'|'DoesNotExist'|'In'|'NotIn',
'IntegerValues': [
123,
],
'LocaleValues': [
{
'Country': 'string',
'Subdivision': 'string'
},
],
'RequiredToPreview': True|False
},
],
'HITReviewStatus': 'NotReviewed'|'MarkedForReview'|'ReviewedAppropriate'|'ReviewedInappropriate',
'NumberOfAssignmentsPending': 123,
'NumberOfAssignmentsAvailable': 123,
'NumberOfAssignmentsCompleted': 123
}
}
:returns:
(integer) --
"""
pass | The CreateHIT operation creates a new Human Intelligence Task (HIT). The new HIT is made available for Workers to find and accept on the Amazon Mechanical Turk website.
This operation allows you to specify a new HIT by passing in values for the properties of the HIT, such as its title, reward amount and number of assignments. When you pass these values to CreateHIT , a new HIT is created for you, with a new HITTypeID . The HITTypeID can be used to create additional HITs in the future without needing to specify common parameters such as the title, description and reward amount each time.
An alternative way to create HITs is to first generate a HITTypeID using the CreateHITType operation and then call the CreateHITWithHITType operation. This is the recommended best practice for Requesters who are creating large numbers of HITs.
CreateHIT also supports several ways to provide question data: by providing a value for the Question parameter that fully specifies the contents of the HIT, or by providing a HitLayoutId and associated HitLayoutParameters .
See also: AWS API Documentation
:example: response = client.create_hit(
MaxAssignments=123,
AutoApprovalDelayInSeconds=123,
LifetimeInSeconds=123,
AssignmentDurationInSeconds=123,
Reward='string',
Title='string',
Keywords='string',
Description='string',
Question='string',
RequesterAnnotation='string',
QualificationRequirements=[
{
'QualificationTypeId': 'string',
'Comparator': 'LessThan'|'LessThanOrEqualTo'|'GreaterThan'|'GreaterThanOrEqualTo'|'EqualTo'|'NotEqualTo'|'Exists'|'DoesNotExist'|'In'|'NotIn',
'IntegerValues': [
123,
],
'LocaleValues': [
{
'Country': 'string',
'Subdivision': 'string'
},
],
'RequiredToPreview': True|False
},
],
UniqueRequestToken='string',
AssignmentReviewPolicy={
'PolicyName': 'string',
'Parameters': [
{
'Key': 'string',
'Values': [
'string',
],
'MapEntries': [
{
'Key': 'string',
'Values': [
'string',
]
},
]
},
]
},
HITReviewPolicy={
'PolicyName': 'string',
'Parameters': [
{
'Key': 'string',
'Values': [
'string',
],
'MapEntries': [
{
'Key': 'string',
'Values': [
'string',
]
},
]
},
]
},
HITLayoutId='string',
HITLayoutParameters=[
{
'Name': 'string',
'Value': 'string'
},
]
)
:type MaxAssignments: integer
:param MaxAssignments: The number of times the HIT can be accepted and completed before the HIT becomes unavailable.
:type AutoApprovalDelayInSeconds: integer
:param AutoApprovalDelayInSeconds: The number of seconds after an assignment for the HIT has been submitted, after which the assignment is considered Approved automatically unless the Requester explicitly rejects it.
:type LifetimeInSeconds: integer
:param LifetimeInSeconds: [REQUIRED]
An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT have been accepted.
:type AssignmentDurationInSeconds: integer
:param AssignmentDurationInSeconds: [REQUIRED]
The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find and accept.
:type Reward: string
:param Reward: [REQUIRED]
The amount of money the Requester will pay a Worker for successfully completing the HIT.
:type Title: string
:param Title: [REQUIRED]
The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned.
:type Keywords: string
:param Keywords: One or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find HITs.
:type Description: string
:param Description: [REQUIRED]
A general description of the HIT. A description includes detailed information about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate the HIT before accepting it.
:type Question: string
:param Question: The data the person completing the HIT uses to produce the results.
Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including whitespace.
Either a Question parameter or a HITLayoutId parameter must be provided.
:type RequesterAnnotation: string
:param RequesterAnnotation: An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to the HIT for tracking purposes. For example, this parameter could be an identifier internal to the Requester's application that corresponds with the HIT.
The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is not shown to the Worker, or any other Requester.
The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your HITs are grouped.
:type QualificationRequirements: list
:param QualificationRequirements: A condition that a Worker's Qualifications must meet before the Worker is allowed to accept and complete the HIT.
(dict) --The QualificationRequirement data structure describes a Qualification that a Worker must have before the Worker is allowed to accept a HIT. A requirement may optionally state that a Worker must have the Qualification in order to preview the HIT.
QualificationTypeId (string) -- [REQUIRED]The ID of the Qualification type for the requirement.
Comparator (string) -- [REQUIRED]The kind of comparison to make against a Qualification's value. You can compare a Qualification's value to an IntegerValue to see if it is LessThan, LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, EqualTo, or NotEqualTo the IntegerValue. You can compare it to a LocaleValue to see if it is EqualTo, or NotEqualTo the LocaleValue. You can check to see if the value is In or NotIn a set of IntegerValue or LocaleValue values. Lastly, a Qualification requirement can also test if a Qualification Exists or DoesNotExist in the user's profile, regardless of its value.
IntegerValues (list) --The integer value to compare against the Qualification's value. IntegerValue must not be present if Comparator is Exists or DoesNotExist. IntegerValue can only be used if the Qualification type has an integer value; it cannot be used with the Worker_Locale QualificationType ID. When performing a set comparison by using the In or the NotIn comparator, you can use up to 15 IntegerValue elements in a QualificationRequirement data structure.
(integer) --
LocaleValues (list) --The locale value to compare against the Qualification's value. The local value must be a valid ISO 3166 country code or supports ISO 3166-2 subdivisions. LocaleValue can only be used with a Worker_Locale QualificationType ID. LocaleValue can only be used with the EqualTo, NotEqualTo, In, and NotIn comparators. You must only use a single LocaleValue element when using the EqualTo or NotEqualTo comparators. When performing a set comparison by using the In or the NotIn comparator, you can use up to 30 LocaleValue elements in a QualificationRequirement data structure.
(dict) --The Locale data structure represents a geographical region or location.
Country (string) -- [REQUIRED]The country of the locale. Must be a valid ISO 3166 country code. For example, the code US refers to the United States of America.
Subdivision (string) --The state or subdivision of the locale. A valid ISO 3166-2 subdivision code. For example, the code WA refers to the state of Washington.
RequiredToPreview (boolean) --If true, the question data for the HIT will not be shown when a Worker whose Qualifications do not meet this requirement tries to preview the HIT. That is, a Worker's Qualifications must meet all of the requirements for which RequiredToPreview is true in order to preview the HIT. If a Worker meets all of the requirements where RequiredToPreview is true (or if there are no such requirements), but does not meet all of the requirements for the HIT, the Worker will be allowed to preview the HIT's question data, but will not be allowed to accept and complete the HIT. The default is false.
:type UniqueRequestToken: string
:param UniqueRequestToken: A unique identifier for this request which allows you to retry the call on error without creating duplicate HITs. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the HIT already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a message containing the HITId.
Note
Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 hours. Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create duplicate HITs.
:type AssignmentReviewPolicy: dict
:param AssignmentReviewPolicy: The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk to take various actions based on the policy.
PolicyName (string) --Name of a Review Policy: SimplePlurality/2011-09-01 or ScoreMyKnownAnswers/2011-09-01
Parameters (list) --Name of the parameter from the Review policy.
(dict) --Name of the parameter from the Review policy.
Key (string) --Name of the parameter from the list of Review Polices.
Values (list) --The list of values of the Parameter
(string) --
MapEntries (list) --List of ParameterMapEntry objects.
(dict) --This data structure is the data type for the AnswerKey parameter of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Key (string) --The QuestionID from the HIT that is used to identify which question requires Mechanical Turk to score as part of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Values (list) --The list of answers to the question specified in the MapEntry Key element. The Worker must match all values in order for the answer to be scored correctly.
(string) --
:type HITReviewPolicy: dict
:param HITReviewPolicy: The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy.
PolicyName (string) --Name of a Review Policy: SimplePlurality/2011-09-01 or ScoreMyKnownAnswers/2011-09-01
Parameters (list) --Name of the parameter from the Review policy.
(dict) --Name of the parameter from the Review policy.
Key (string) --Name of the parameter from the list of Review Polices.
Values (list) --The list of values of the Parameter
(string) --
MapEntries (list) --List of ParameterMapEntry objects.
(dict) --This data structure is the data type for the AnswerKey parameter of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Key (string) --The QuestionID from the HIT that is used to identify which question requires Mechanical Turk to score as part of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Values (list) --The list of answers to the question specified in the MapEntry Key element. The Worker must match all values in order for the answer to be scored correctly.
(string) --
:type HITLayoutId: string
:param HITLayoutId: The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an additional HIT by providing those values as HITLayoutParameters.
Constraints: Either a Question parameter or a HITLayoutId parameter must be provided.
:type HITLayoutParameters: list
:param HITLayoutParameters: If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter structure. For more information, see HITLayout.
(dict) --The HITLayoutParameter data structure defines parameter values used with a HITLayout. A HITLayout is a reusable Amazon Mechanical Turk project template used to provide Human Intelligence Task (HIT) question data for CreateHIT.
Name (string) --The name of the parameter in the HITLayout.
Value (string) --The value substituted for the parameter referenced in the HITLayout.
:rtype: dict
:return: {
'HIT': {
'HITId': 'string',
'HITTypeId': 'string',
'HITGroupId': 'string',
'HITLayoutId': 'string',
'CreationTime': datetime(2015, 1, 1),
'Title': 'string',
'Description': 'string',
'Question': 'string',
'Keywords': 'string',
'HITStatus': 'Assignable'|'Unassignable'|'Reviewable'|'Reviewing'|'Disposed',
'MaxAssignments': 123,
'Reward': 'string',
'AutoApprovalDelayInSeconds': 123,
'Expiration': datetime(2015, 1, 1),
'AssignmentDurationInSeconds': 123,
'RequesterAnnotation': 'string',
'QualificationRequirements': [
{
'QualificationTypeId': 'string',
'Comparator': 'LessThan'|'LessThanOrEqualTo'|'GreaterThan'|'GreaterThanOrEqualTo'|'EqualTo'|'NotEqualTo'|'Exists'|'DoesNotExist'|'In'|'NotIn',
'IntegerValues': [
123,
],
'LocaleValues': [
{
'Country': 'string',
'Subdivision': 'string'
},
],
'RequiredToPreview': True|False
},
],
'HITReviewStatus': 'NotReviewed'|'MarkedForReview'|'ReviewedAppropriate'|'ReviewedInappropriate',
'NumberOfAssignmentsPending': 123,
'NumberOfAssignmentsAvailable': 123,
'NumberOfAssignmentsCompleted': 123
}
}
:returns:
(integer) -- | entailment |
def create_hit_with_hit_type(HITTypeId=None, MaxAssignments=None, LifetimeInSeconds=None, Question=None, RequesterAnnotation=None, UniqueRequestToken=None, AssignmentReviewPolicy=None, HITReviewPolicy=None, HITLayoutId=None, HITLayoutParameters=None):
"""
The CreateHITWithHITType operation creates a new Human Intelligence Task (HIT) using an existing HITTypeID generated by the CreateHITType operation.
This is an alternative way to create HITs from the CreateHIT operation. This is the recommended best practice for Requesters who are creating large numbers of HITs.
CreateHITWithHITType also supports several ways to provide question data: by providing a value for the Question parameter that fully specifies the contents of the HIT, or by providing a HitLayoutId and associated HitLayoutParameters .
See also: AWS API Documentation
:example: response = client.create_hit_with_hit_type(
HITTypeId='string',
MaxAssignments=123,
LifetimeInSeconds=123,
Question='string',
RequesterAnnotation='string',
UniqueRequestToken='string',
AssignmentReviewPolicy={
'PolicyName': 'string',
'Parameters': [
{
'Key': 'string',
'Values': [
'string',
],
'MapEntries': [
{
'Key': 'string',
'Values': [
'string',
]
},
]
},
]
},
HITReviewPolicy={
'PolicyName': 'string',
'Parameters': [
{
'Key': 'string',
'Values': [
'string',
],
'MapEntries': [
{
'Key': 'string',
'Values': [
'string',
]
},
]
},
]
},
HITLayoutId='string',
HITLayoutParameters=[
{
'Name': 'string',
'Value': 'string'
},
]
)
:type HITTypeId: string
:param HITTypeId: [REQUIRED]
The HIT type ID you want to create this HIT with.
:type MaxAssignments: integer
:param MaxAssignments: The number of times the HIT can be accepted and completed before the HIT becomes unavailable.
:type LifetimeInSeconds: integer
:param LifetimeInSeconds: [REQUIRED]
An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT have been accepted.
:type Question: string
:param Question: The data the person completing the HIT uses to produce the results.
Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including whitespace.
Either a Question parameter or a HITLayoutId parameter must be provided.
:type RequesterAnnotation: string
:param RequesterAnnotation: An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to the HIT for tracking purposes. For example, this parameter could be an identifier internal to the Requester's application that corresponds with the HIT.
The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is not shown to the Worker, or any other Requester.
The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your HITs are grouped.
:type UniqueRequestToken: string
:param UniqueRequestToken: A unique identifier for this request which allows you to retry the call on error without creating duplicate HITs. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the HIT already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a message containing the HITId.
Note
Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 hours. Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create duplicate HITs.
:type AssignmentReviewPolicy: dict
:param AssignmentReviewPolicy: The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk to take various actions based on the policy.
PolicyName (string) --Name of a Review Policy: SimplePlurality/2011-09-01 or ScoreMyKnownAnswers/2011-09-01
Parameters (list) --Name of the parameter from the Review policy.
(dict) --Name of the parameter from the Review policy.
Key (string) --Name of the parameter from the list of Review Polices.
Values (list) --The list of values of the Parameter
(string) --
MapEntries (list) --List of ParameterMapEntry objects.
(dict) --This data structure is the data type for the AnswerKey parameter of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Key (string) --The QuestionID from the HIT that is used to identify which question requires Mechanical Turk to score as part of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Values (list) --The list of answers to the question specified in the MapEntry Key element. The Worker must match all values in order for the answer to be scored correctly.
(string) --
:type HITReviewPolicy: dict
:param HITReviewPolicy: The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy.
PolicyName (string) --Name of a Review Policy: SimplePlurality/2011-09-01 or ScoreMyKnownAnswers/2011-09-01
Parameters (list) --Name of the parameter from the Review policy.
(dict) --Name of the parameter from the Review policy.
Key (string) --Name of the parameter from the list of Review Polices.
Values (list) --The list of values of the Parameter
(string) --
MapEntries (list) --List of ParameterMapEntry objects.
(dict) --This data structure is the data type for the AnswerKey parameter of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Key (string) --The QuestionID from the HIT that is used to identify which question requires Mechanical Turk to score as part of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Values (list) --The list of answers to the question specified in the MapEntry Key element. The Worker must match all values in order for the answer to be scored correctly.
(string) --
:type HITLayoutId: string
:param HITLayoutId: The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an additional HIT by providing those values as HITLayoutParameters.
Constraints: Either a Question parameter or a HITLayoutId parameter must be provided.
:type HITLayoutParameters: list
:param HITLayoutParameters: If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter structure. For more information, see HITLayout.
(dict) --The HITLayoutParameter data structure defines parameter values used with a HITLayout. A HITLayout is a reusable Amazon Mechanical Turk project template used to provide Human Intelligence Task (HIT) question data for CreateHIT.
Name (string) --The name of the parameter in the HITLayout.
Value (string) --The value substituted for the parameter referenced in the HITLayout.
:rtype: dict
:return: {
'HIT': {
'HITId': 'string',
'HITTypeId': 'string',
'HITGroupId': 'string',
'HITLayoutId': 'string',
'CreationTime': datetime(2015, 1, 1),
'Title': 'string',
'Description': 'string',
'Question': 'string',
'Keywords': 'string',
'HITStatus': 'Assignable'|'Unassignable'|'Reviewable'|'Reviewing'|'Disposed',
'MaxAssignments': 123,
'Reward': 'string',
'AutoApprovalDelayInSeconds': 123,
'Expiration': datetime(2015, 1, 1),
'AssignmentDurationInSeconds': 123,
'RequesterAnnotation': 'string',
'QualificationRequirements': [
{
'QualificationTypeId': 'string',
'Comparator': 'LessThan'|'LessThanOrEqualTo'|'GreaterThan'|'GreaterThanOrEqualTo'|'EqualTo'|'NotEqualTo'|'Exists'|'DoesNotExist'|'In'|'NotIn',
'IntegerValues': [
123,
],
'LocaleValues': [
{
'Country': 'string',
'Subdivision': 'string'
},
],
'RequiredToPreview': True|False
},
],
'HITReviewStatus': 'NotReviewed'|'MarkedForReview'|'ReviewedAppropriate'|'ReviewedInappropriate',
'NumberOfAssignmentsPending': 123,
'NumberOfAssignmentsAvailable': 123,
'NumberOfAssignmentsCompleted': 123
}
}
:returns:
(integer) --
"""
pass | The CreateHITWithHITType operation creates a new Human Intelligence Task (HIT) using an existing HITTypeID generated by the CreateHITType operation.
This is an alternative way to create HITs from the CreateHIT operation. This is the recommended best practice for Requesters who are creating large numbers of HITs.
CreateHITWithHITType also supports several ways to provide question data: by providing a value for the Question parameter that fully specifies the contents of the HIT, or by providing a HitLayoutId and associated HitLayoutParameters .
See also: AWS API Documentation
:example: response = client.create_hit_with_hit_type(
HITTypeId='string',
MaxAssignments=123,
LifetimeInSeconds=123,
Question='string',
RequesterAnnotation='string',
UniqueRequestToken='string',
AssignmentReviewPolicy={
'PolicyName': 'string',
'Parameters': [
{
'Key': 'string',
'Values': [
'string',
],
'MapEntries': [
{
'Key': 'string',
'Values': [
'string',
]
},
]
},
]
},
HITReviewPolicy={
'PolicyName': 'string',
'Parameters': [
{
'Key': 'string',
'Values': [
'string',
],
'MapEntries': [
{
'Key': 'string',
'Values': [
'string',
]
},
]
},
]
},
HITLayoutId='string',
HITLayoutParameters=[
{
'Name': 'string',
'Value': 'string'
},
]
)
:type HITTypeId: string
:param HITTypeId: [REQUIRED]
The HIT type ID you want to create this HIT with.
:type MaxAssignments: integer
:param MaxAssignments: The number of times the HIT can be accepted and completed before the HIT becomes unavailable.
:type LifetimeInSeconds: integer
:param LifetimeInSeconds: [REQUIRED]
An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT have been accepted.
:type Question: string
:param Question: The data the person completing the HIT uses to produce the results.
Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including whitespace.
Either a Question parameter or a HITLayoutId parameter must be provided.
:type RequesterAnnotation: string
:param RequesterAnnotation: An arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to the HIT for tracking purposes. For example, this parameter could be an identifier internal to the Requester's application that corresponds with the HIT.
The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is not shown to the Worker, or any other Requester.
The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your HITs are grouped.
:type UniqueRequestToken: string
:param UniqueRequestToken: A unique identifier for this request which allows you to retry the call on error without creating duplicate HITs. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the HIT already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a message containing the HITId.
Note
Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 hours. Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create duplicate HITs.
:type AssignmentReviewPolicy: dict
:param AssignmentReviewPolicy: The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk to take various actions based on the policy.
PolicyName (string) --Name of a Review Policy: SimplePlurality/2011-09-01 or ScoreMyKnownAnswers/2011-09-01
Parameters (list) --Name of the parameter from the Review policy.
(dict) --Name of the parameter from the Review policy.
Key (string) --Name of the parameter from the list of Review Polices.
Values (list) --The list of values of the Parameter
(string) --
MapEntries (list) --List of ParameterMapEntry objects.
(dict) --This data structure is the data type for the AnswerKey parameter of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Key (string) --The QuestionID from the HIT that is used to identify which question requires Mechanical Turk to score as part of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Values (list) --The list of answers to the question specified in the MapEntry Key element. The Worker must match all values in order for the answer to be scored correctly.
(string) --
:type HITReviewPolicy: dict
:param HITReviewPolicy: The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy.
PolicyName (string) --Name of a Review Policy: SimplePlurality/2011-09-01 or ScoreMyKnownAnswers/2011-09-01
Parameters (list) --Name of the parameter from the Review policy.
(dict) --Name of the parameter from the Review policy.
Key (string) --Name of the parameter from the list of Review Polices.
Values (list) --The list of values of the Parameter
(string) --
MapEntries (list) --List of ParameterMapEntry objects.
(dict) --This data structure is the data type for the AnswerKey parameter of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Key (string) --The QuestionID from the HIT that is used to identify which question requires Mechanical Turk to score as part of the ScoreMyKnownAnswers/2011-09-01 Review Policy.
Values (list) --The list of answers to the question specified in the MapEntry Key element. The Worker must match all values in order for the answer to be scored correctly.
(string) --
:type HITLayoutId: string
:param HITLayoutId: The HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an additional HIT by providing those values as HITLayoutParameters.
Constraints: Either a Question parameter or a HITLayoutId parameter must be provided.
:type HITLayoutParameters: list
:param HITLayoutParameters: If the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter structure. For more information, see HITLayout.
(dict) --The HITLayoutParameter data structure defines parameter values used with a HITLayout. A HITLayout is a reusable Amazon Mechanical Turk project template used to provide Human Intelligence Task (HIT) question data for CreateHIT.
Name (string) --The name of the parameter in the HITLayout.
Value (string) --The value substituted for the parameter referenced in the HITLayout.
:rtype: dict
:return: {
'HIT': {
'HITId': 'string',
'HITTypeId': 'string',
'HITGroupId': 'string',
'HITLayoutId': 'string',
'CreationTime': datetime(2015, 1, 1),
'Title': 'string',
'Description': 'string',
'Question': 'string',
'Keywords': 'string',
'HITStatus': 'Assignable'|'Unassignable'|'Reviewable'|'Reviewing'|'Disposed',
'MaxAssignments': 123,
'Reward': 'string',
'AutoApprovalDelayInSeconds': 123,
'Expiration': datetime(2015, 1, 1),
'AssignmentDurationInSeconds': 123,
'RequesterAnnotation': 'string',
'QualificationRequirements': [
{
'QualificationTypeId': 'string',
'Comparator': 'LessThan'|'LessThanOrEqualTo'|'GreaterThan'|'GreaterThanOrEqualTo'|'EqualTo'|'NotEqualTo'|'Exists'|'DoesNotExist'|'In'|'NotIn',
'IntegerValues': [
123,
],
'LocaleValues': [
{
'Country': 'string',
'Subdivision': 'string'
},
],
'RequiredToPreview': True|False
},
],
'HITReviewStatus': 'NotReviewed'|'MarkedForReview'|'ReviewedAppropriate'|'ReviewedInappropriate',
'NumberOfAssignmentsPending': 123,
'NumberOfAssignmentsAvailable': 123,
'NumberOfAssignmentsCompleted': 123
}
}
:returns:
(integer) -- | entailment |
def create_qualification_type(Name=None, Keywords=None, Description=None, QualificationTypeStatus=None, RetryDelayInSeconds=None, Test=None, AnswerKey=None, TestDurationInSeconds=None, AutoGranted=None, AutoGrantedValue=None):
"""
The CreateQualificationType operation creates a new Qualification type, which is represented by a QualificationType data structure.
See also: AWS API Documentation
:example: response = client.create_qualification_type(
Name='string',
Keywords='string',
Description='string',
QualificationTypeStatus='Active'|'Inactive',
RetryDelayInSeconds=123,
Test='string',
AnswerKey='string',
TestDurationInSeconds=123,
AutoGranted=True|False,
AutoGrantedValue=123
)
:type Name: string
:param Name: [REQUIRED]
The name you give to the Qualification type. The type name is used to represent the Qualification to Workers, and to find the type using a Qualification type search. It must be unique across all of your Qualification types.
:type Keywords: string
:param Keywords: One or more words or phrases that describe the Qualification type, separated by commas. The keywords of a type make the type easier to find during a search.
:type Description: string
:param Description: [REQUIRED]
A long description for the Qualification type. On the Amazon Mechanical Turk website, the long description is displayed when a Worker examines a Qualification type.
:type QualificationTypeStatus: string
:param QualificationTypeStatus: [REQUIRED]
The initial status of the Qualification type.
Constraints: Valid values are: Active | Inactive
:type RetryDelayInSeconds: integer
:param RetryDelayInSeconds: The number of seconds that a Worker must wait after requesting a Qualification of the Qualification type before the worker can retry the Qualification request.
Constraints: None. If not specified, retries are disabled and Workers can request a Qualification of this type only once, even if the Worker has not been granted the Qualification. It is not possible to disable retries for a Qualification type after it has been created with retries enabled. If you want to disable retries, you must delete existing retry-enabled Qualification type and then create a new Qualification type with retries disabled.
:type Test: string
:param Test: The questions for the Qualification test a Worker must answer correctly to obtain a Qualification of this type. If this parameter is specified, TestDurationInSeconds must also be specified.
Constraints: Must not be longer than 65535 bytes. Must be a QuestionForm data structure. This parameter cannot be specified if AutoGranted is true.
Constraints: None. If not specified, the Worker may request the Qualification without answering any questions.
:type AnswerKey: string
:param AnswerKey: The answers to the Qualification test specified in the Test parameter, in the form of an AnswerKey data structure.
Constraints: Must not be longer than 65535 bytes.
Constraints: None. If not specified, you must process Qualification requests manually.
:type TestDurationInSeconds: integer
:param TestDurationInSeconds: The number of seconds the Worker has to complete the Qualification test, starting from the time the Worker requests the Qualification.
:type AutoGranted: boolean
:param AutoGranted: Specifies whether requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test.
Constraints: If the Test parameter is specified, this parameter cannot be true.
:type AutoGrantedValue: integer
:param AutoGrantedValue: The Qualification value to use for automatically granted Qualifications. This parameter is used only if the AutoGranted parameter is true.
:rtype: dict
:return: {
'QualificationType': {
'QualificationTypeId': 'string',
'CreationTime': datetime(2015, 1, 1),
'Name': 'string',
'Description': 'string',
'Keywords': 'string',
'QualificationTypeStatus': 'Active'|'Inactive',
'Test': 'string',
'TestDurationInSeconds': 123,
'AnswerKey': 'string',
'RetryDelayInSeconds': 123,
'IsRequestable': True|False,
'AutoGranted': True|False,
'AutoGrantedValue': 123
}
}
"""
pass | The CreateQualificationType operation creates a new Qualification type, which is represented by a QualificationType data structure.
See also: AWS API Documentation
:example: response = client.create_qualification_type(
Name='string',
Keywords='string',
Description='string',
QualificationTypeStatus='Active'|'Inactive',
RetryDelayInSeconds=123,
Test='string',
AnswerKey='string',
TestDurationInSeconds=123,
AutoGranted=True|False,
AutoGrantedValue=123
)
:type Name: string
:param Name: [REQUIRED]
The name you give to the Qualification type. The type name is used to represent the Qualification to Workers, and to find the type using a Qualification type search. It must be unique across all of your Qualification types.
:type Keywords: string
:param Keywords: One or more words or phrases that describe the Qualification type, separated by commas. The keywords of a type make the type easier to find during a search.
:type Description: string
:param Description: [REQUIRED]
A long description for the Qualification type. On the Amazon Mechanical Turk website, the long description is displayed when a Worker examines a Qualification type.
:type QualificationTypeStatus: string
:param QualificationTypeStatus: [REQUIRED]
The initial status of the Qualification type.
Constraints: Valid values are: Active | Inactive
:type RetryDelayInSeconds: integer
:param RetryDelayInSeconds: The number of seconds that a Worker must wait after requesting a Qualification of the Qualification type before the worker can retry the Qualification request.
Constraints: None. If not specified, retries are disabled and Workers can request a Qualification of this type only once, even if the Worker has not been granted the Qualification. It is not possible to disable retries for a Qualification type after it has been created with retries enabled. If you want to disable retries, you must delete existing retry-enabled Qualification type and then create a new Qualification type with retries disabled.
:type Test: string
:param Test: The questions for the Qualification test a Worker must answer correctly to obtain a Qualification of this type. If this parameter is specified, TestDurationInSeconds must also be specified.
Constraints: Must not be longer than 65535 bytes. Must be a QuestionForm data structure. This parameter cannot be specified if AutoGranted is true.
Constraints: None. If not specified, the Worker may request the Qualification without answering any questions.
:type AnswerKey: string
:param AnswerKey: The answers to the Qualification test specified in the Test parameter, in the form of an AnswerKey data structure.
Constraints: Must not be longer than 65535 bytes.
Constraints: None. If not specified, you must process Qualification requests manually.
:type TestDurationInSeconds: integer
:param TestDurationInSeconds: The number of seconds the Worker has to complete the Qualification test, starting from the time the Worker requests the Qualification.
:type AutoGranted: boolean
:param AutoGranted: Specifies whether requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test.
Constraints: If the Test parameter is specified, this parameter cannot be true.
:type AutoGrantedValue: integer
:param AutoGrantedValue: The Qualification value to use for automatically granted Qualifications. This parameter is used only if the AutoGranted parameter is true.
:rtype: dict
:return: {
'QualificationType': {
'QualificationTypeId': 'string',
'CreationTime': datetime(2015, 1, 1),
'Name': 'string',
'Description': 'string',
'Keywords': 'string',
'QualificationTypeStatus': 'Active'|'Inactive',
'Test': 'string',
'TestDurationInSeconds': 123,
'AnswerKey': 'string',
'RetryDelayInSeconds': 123,
'IsRequestable': True|False,
'AutoGranted': True|False,
'AutoGrantedValue': 123
}
} | entailment |
def update_qualification_type(QualificationTypeId=None, Description=None, QualificationTypeStatus=None, Test=None, AnswerKey=None, TestDurationInSeconds=None, RetryDelayInSeconds=None, AutoGranted=None, AutoGrantedValue=None):
"""
The UpdateQualificationType operation modifies the attributes of an existing Qualification type, which is represented by a QualificationType data structure. Only the owner of a Qualification type can modify its attributes.
Most attributes of a Qualification type can be changed after the type has been created. However, the Name and Keywords fields cannot be modified. The RetryDelayInSeconds parameter can be modified or added to change the delay or to enable retries, but RetryDelayInSeconds cannot be used to disable retries.
You can use this operation to update the test for a Qualification type. The test is updated based on the values specified for the Test, TestDurationInSeconds and AnswerKey parameters. All three parameters specify the updated test. If you are updating the test for a type, you must specify the Test and TestDurationInSeconds parameters. The AnswerKey parameter is optional; omitting it specifies that the updated test does not have an answer key.
If you omit the Test parameter, the test for the Qualification type is unchanged. There is no way to remove a test from a Qualification type that has one. If the type already has a test, you cannot update it to be AutoGranted. If the Qualification type does not have a test and one is provided by an update, the type will henceforth have a test.
If you want to update the test duration or answer key for an existing test without changing the questions, you must specify a Test parameter with the original questions, along with the updated values.
If you provide an updated Test but no AnswerKey, the new test will not have an answer key. Requests for such Qualifications must be granted manually.
You can also update the AutoGranted and AutoGrantedValue attributes of the Qualification type.
See also: AWS API Documentation
:example: response = client.update_qualification_type(
QualificationTypeId='string',
Description='string',
QualificationTypeStatus='Active'|'Inactive',
Test='string',
AnswerKey='string',
TestDurationInSeconds=123,
RetryDelayInSeconds=123,
AutoGranted=True|False,
AutoGrantedValue=123
)
:type QualificationTypeId: string
:param QualificationTypeId: [REQUIRED]
The ID of the Qualification type to update.
:type Description: string
:param Description: The new description of the Qualification type.
:type QualificationTypeStatus: string
:param QualificationTypeStatus: The new status of the Qualification type - Active | Inactive
:type Test: string
:param Test: The questions for the Qualification test a Worker must answer correctly to obtain a Qualification of this type. If this parameter is specified, TestDurationInSeconds must also be specified.
Constraints: Must not be longer than 65535 bytes. Must be a QuestionForm data structure. This parameter cannot be specified if AutoGranted is true.
Constraints: None. If not specified, the Worker may request the Qualification without answering any questions.
:type AnswerKey: string
:param AnswerKey: The answers to the Qualification test specified in the Test parameter, in the form of an AnswerKey data structure.
:type TestDurationInSeconds: integer
:param TestDurationInSeconds: The number of seconds the Worker has to complete the Qualification test, starting from the time the Worker requests the Qualification.
:type RetryDelayInSeconds: integer
:param RetryDelayInSeconds: The amount of time, in seconds, that Workers must wait after requesting a Qualification of the specified Qualification type before they can retry the Qualification request. It is not possible to disable retries for a Qualification type after it has been created with retries enabled. If you want to disable retries, you must dispose of the existing retry-enabled Qualification type using DisposeQualificationType and then create a new Qualification type with retries disabled using CreateQualificationType.
:type AutoGranted: boolean
:param AutoGranted: Specifies whether requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test.
Constraints: If the Test parameter is specified, this parameter cannot be true.
:type AutoGrantedValue: integer
:param AutoGrantedValue: The Qualification value to use for automatically granted Qualifications. This parameter is used only if the AutoGranted parameter is true.
:rtype: dict
:return: {
'QualificationType': {
'QualificationTypeId': 'string',
'CreationTime': datetime(2015, 1, 1),
'Name': 'string',
'Description': 'string',
'Keywords': 'string',
'QualificationTypeStatus': 'Active'|'Inactive',
'Test': 'string',
'TestDurationInSeconds': 123,
'AnswerKey': 'string',
'RetryDelayInSeconds': 123,
'IsRequestable': True|False,
'AutoGranted': True|False,
'AutoGrantedValue': 123
}
}
"""
pass | The UpdateQualificationType operation modifies the attributes of an existing Qualification type, which is represented by a QualificationType data structure. Only the owner of a Qualification type can modify its attributes.
Most attributes of a Qualification type can be changed after the type has been created. However, the Name and Keywords fields cannot be modified. The RetryDelayInSeconds parameter can be modified or added to change the delay or to enable retries, but RetryDelayInSeconds cannot be used to disable retries.
You can use this operation to update the test for a Qualification type. The test is updated based on the values specified for the Test, TestDurationInSeconds and AnswerKey parameters. All three parameters specify the updated test. If you are updating the test for a type, you must specify the Test and TestDurationInSeconds parameters. The AnswerKey parameter is optional; omitting it specifies that the updated test does not have an answer key.
If you omit the Test parameter, the test for the Qualification type is unchanged. There is no way to remove a test from a Qualification type that has one. If the type already has a test, you cannot update it to be AutoGranted. If the Qualification type does not have a test and one is provided by an update, the type will henceforth have a test.
If you want to update the test duration or answer key for an existing test without changing the questions, you must specify a Test parameter with the original questions, along with the updated values.
If you provide an updated Test but no AnswerKey, the new test will not have an answer key. Requests for such Qualifications must be granted manually.
You can also update the AutoGranted and AutoGrantedValue attributes of the Qualification type.
See also: AWS API Documentation
:example: response = client.update_qualification_type(
QualificationTypeId='string',
Description='string',
QualificationTypeStatus='Active'|'Inactive',
Test='string',
AnswerKey='string',
TestDurationInSeconds=123,
RetryDelayInSeconds=123,
AutoGranted=True|False,
AutoGrantedValue=123
)
:type QualificationTypeId: string
:param QualificationTypeId: [REQUIRED]
The ID of the Qualification type to update.
:type Description: string
:param Description: The new description of the Qualification type.
:type QualificationTypeStatus: string
:param QualificationTypeStatus: The new status of the Qualification type - Active | Inactive
:type Test: string
:param Test: The questions for the Qualification test a Worker must answer correctly to obtain a Qualification of this type. If this parameter is specified, TestDurationInSeconds must also be specified.
Constraints: Must not be longer than 65535 bytes. Must be a QuestionForm data structure. This parameter cannot be specified if AutoGranted is true.
Constraints: None. If not specified, the Worker may request the Qualification without answering any questions.
:type AnswerKey: string
:param AnswerKey: The answers to the Qualification test specified in the Test parameter, in the form of an AnswerKey data structure.
:type TestDurationInSeconds: integer
:param TestDurationInSeconds: The number of seconds the Worker has to complete the Qualification test, starting from the time the Worker requests the Qualification.
:type RetryDelayInSeconds: integer
:param RetryDelayInSeconds: The amount of time, in seconds, that Workers must wait after requesting a Qualification of the specified Qualification type before they can retry the Qualification request. It is not possible to disable retries for a Qualification type after it has been created with retries enabled. If you want to disable retries, you must dispose of the existing retry-enabled Qualification type using DisposeQualificationType and then create a new Qualification type with retries disabled using CreateQualificationType.
:type AutoGranted: boolean
:param AutoGranted: Specifies whether requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test.
Constraints: If the Test parameter is specified, this parameter cannot be true.
:type AutoGrantedValue: integer
:param AutoGrantedValue: The Qualification value to use for automatically granted Qualifications. This parameter is used only if the AutoGranted parameter is true.
:rtype: dict
:return: {
'QualificationType': {
'QualificationTypeId': 'string',
'CreationTime': datetime(2015, 1, 1),
'Name': 'string',
'Description': 'string',
'Keywords': 'string',
'QualificationTypeStatus': 'Active'|'Inactive',
'Test': 'string',
'TestDurationInSeconds': 123,
'AnswerKey': 'string',
'RetryDelayInSeconds': 123,
'IsRequestable': True|False,
'AutoGranted': True|False,
'AutoGrantedValue': 123
}
} | entailment |
def str2hashalgo(description):
'''Convert the name of a hash algorithm as described in the OATH
specifications, to a python object handling the digest algorithm
interface, PEP-xxx.
:param description
the name of the hash algorithm, example
:rtype: a hash algorithm class constructor
'''
algo = getattr(hashlib, description.lower(), None)
if not callable(algo):
raise ValueError('Unknown hash algorithm %s' % description)
return algo | Convert the name of a hash algorithm as described in the OATH
specifications, to a python object handling the digest algorithm
interface, PEP-xxx.
:param description
the name of the hash algorithm, example
:rtype: a hash algorithm class constructor | entailment |
def str2cryptofunction(crypto_function_description):
'''
Convert an OCRA crypto function description into a CryptoFunction
instance
:param crypto_function_description:
:returns:
the CryptoFunction object
:rtype: CryptoFunction
'''
s = crypto_function_description.split('-')
if len(s) != 3:
raise ValueError('CryptoFunction description must be triplet separated by -')
if s[0] != HOTP:
raise ValueError('Unknown CryptoFunction kind %s' % s[0])
algo = str2hashalgo(s[1])
try:
truncation_length = int(s[2])
if truncation_length < 0 or truncation_length > 10:
raise ValueError()
except ValueError:
raise ValueError('Invalid truncation length %s' % s[2])
return CryptoFunction(algo, truncation_length) | Convert an OCRA crypto function description into a CryptoFunction
instance
:param crypto_function_description:
:returns:
the CryptoFunction object
:rtype: CryptoFunction | entailment |
def hotp(key,counter,format='dec6',hash=hashlib.sha1):
'''
Compute a HOTP value as prescribed by RFC4226
:param key:
the HOTP secret key given as an hexadecimal string
:param counter:
the OTP generation counter
:param format:
the output format, can be:
- hex, for a variable length hexadecimal format,
- hex-notrunc, for a 40 characters hexadecimal non-truncated format,
- dec4, for a 4 characters decimal format,
- dec6,
- dec7, or
- dec8
it defaults to dec6.
:param hash:
the hash module (usually from the hashlib package) to use,
it defaults to hashlib.sha1.
:returns:
a string representation of the OTP value (as instructed by the format parameter).
Examples:
>>> hotp('343434', 2, format='dec6')
'791903'
'''
bin_hotp = __hotp(key, counter, hash)
if format == 'dec4':
return dec(bin_hotp, 4)
elif format == 'dec6':
return dec(bin_hotp, 6)
elif format == 'dec7':
return dec(bin_hotp, 7)
elif format == 'dec8':
return dec(bin_hotp, 8)
elif format == 'hex':
return '%x' % truncated_value(bin_hotp)
elif format == 'hex-notrunc':
return _utils.tohex(bin_hotp)
elif format == 'bin':
return bin_hotp
elif format == 'dec':
return str(truncated_value(bin_hotp))
else:
raise ValueError('unknown format') | Compute a HOTP value as prescribed by RFC4226
:param key:
the HOTP secret key given as an hexadecimal string
:param counter:
the OTP generation counter
:param format:
the output format, can be:
- hex, for a variable length hexadecimal format,
- hex-notrunc, for a 40 characters hexadecimal non-truncated format,
- dec4, for a 4 characters decimal format,
- dec6,
- dec7, or
- dec8
it defaults to dec6.
:param hash:
the hash module (usually from the hashlib package) to use,
it defaults to hashlib.sha1.
:returns:
a string representation of the OTP value (as instructed by the format parameter).
Examples:
>>> hotp('343434', 2, format='dec6')
'791903' | entailment |
def accept_hotp(key, response, counter, format='dec6', hash=hashlib.sha1,
drift=3, backward_drift=0):
'''
Validate a HOTP value inside a window of
[counter-backward_drift:counter+forward_drift]
:param key:
the shared secret
:type key:
hexadecimal string of even length
:param response:
the OTP to check
:type response:
ASCII string
:param counter:
value of the counter running inside an HOTP token, usually it is
just the count of HOTP value accepted so far for a given shared
secret; see the specifications of HOTP for more details;
:param format:
the output format, can be:
- hex40, for a 40 characters hexadecimal format,
- dec4, for a 4 characters decimal format,
- dec6,
- dec7, or
- dec8
it defaults to dec6.
:param hash:
the hash module (usually from the hashlib package) to use,
it defaults to hashlib.sha1.
:param drift:
how far we can look forward from the current value of the counter
:param backward_drift:
how far we can look backward from the current counter value to
match the response, default to zero as it is usually a bad idea to
look backward as the counter is only advanced when a valid value is
checked (and so the counter on the token side should have been
incremented too)
:returns:
a pair of a boolean and an integer:
- first is True if the response is validated and False otherwise,
- second is the new value for the counter; it can be more than
counter + 1 if the drift window was used; you must store it if
the response was validated.
>>> accept_hotp('343434', '122323', 2, format='dec6')
(False, 2)
>>> hotp('343434', 2, format='dec6')
'791903'
>>> accept_hotp('343434', '791903', 2, format='dec6')
(True, 3)
>>> hotp('343434', 3, format='dec6')
'907279'
>>> accept_hotp('343434', '907279', 2, format='dec6')
(True, 4)
'''
for i in range(-backward_drift, drift+1):
if _utils.compare_digest(hotp(key, counter+i, format=format, hash=hash), str(response)):
return True, counter+i+1
return False,counter | Validate a HOTP value inside a window of
[counter-backward_drift:counter+forward_drift]
:param key:
the shared secret
:type key:
hexadecimal string of even length
:param response:
the OTP to check
:type response:
ASCII string
:param counter:
value of the counter running inside an HOTP token, usually it is
just the count of HOTP value accepted so far for a given shared
secret; see the specifications of HOTP for more details;
:param format:
the output format, can be:
- hex40, for a 40 characters hexadecimal format,
- dec4, for a 4 characters decimal format,
- dec6,
- dec7, or
- dec8
it defaults to dec6.
:param hash:
the hash module (usually from the hashlib package) to use,
it defaults to hashlib.sha1.
:param drift:
how far we can look forward from the current value of the counter
:param backward_drift:
how far we can look backward from the current counter value to
match the response, default to zero as it is usually a bad idea to
look backward as the counter is only advanced when a valid value is
checked (and so the counter on the token side should have been
incremented too)
:returns:
a pair of a boolean and an integer:
- first is True if the response is validated and False otherwise,
- second is the new value for the counter; it can be more than
counter + 1 if the drift window was used; you must store it if
the response was validated.
>>> accept_hotp('343434', '122323', 2, format='dec6')
(False, 2)
>>> hotp('343434', 2, format='dec6')
'791903'
>>> accept_hotp('343434', '791903', 2, format='dec6')
(True, 3)
>>> hotp('343434', 3, format='dec6')
'907279'
>>> accept_hotp('343434', '907279', 2, format='dec6')
(True, 4) | entailment |
def totp(key, format='dec6', period=30, t=None, hash=hashlib.sha1):
'''
Compute a TOTP value as prescribed by OATH specifications.
:param key:
the TOTP key given as an hexadecimal string
:param format:
the output format, can be:
- hex, for a variable length hexadecimal format,
- hex-notrunc, for a 40 characters hexadecimal non-truncated format,
- dec4, for a 4 characters decimal format,
- dec6,
- dec7, or
- dec8
it defaults to dec6.
:param period:
a positive integer giving the period between changes of the OTP
value, as seconds, it defaults to 30.
:param t:
a positive integer giving the current time as seconds since EPOCH
(1st January 1970 at 00:00 GMT), if None we use time.time(); it
defaults to None;
:param hash:
the hash module (usually from the hashlib package) to use,
it defaults to hashlib.sha1.
:returns:
a string representation of the OTP value (as instructed by the format parameter).
:type: str
'''
if t is None:
t = int(time.time())
else:
if isinstance(t, datetime.datetime):
t = calendar.timegm(t.utctimetuple())
else:
t = int(t)
T = int(t/period)
return hotp(key, T, format=format, hash=hash) | Compute a TOTP value as prescribed by OATH specifications.
:param key:
the TOTP key given as an hexadecimal string
:param format:
the output format, can be:
- hex, for a variable length hexadecimal format,
- hex-notrunc, for a 40 characters hexadecimal non-truncated format,
- dec4, for a 4 characters decimal format,
- dec6,
- dec7, or
- dec8
it defaults to dec6.
:param period:
a positive integer giving the period between changes of the OTP
value, as seconds, it defaults to 30.
:param t:
a positive integer giving the current time as seconds since EPOCH
(1st January 1970 at 00:00 GMT), if None we use time.time(); it
defaults to None;
:param hash:
the hash module (usually from the hashlib package) to use,
it defaults to hashlib.sha1.
:returns:
a string representation of the OTP value (as instructed by the format parameter).
:type: str | entailment |
def accept_totp(key, response, format='dec6', period=30, t=None,
hash=hashlib.sha1, forward_drift=1, backward_drift=1, drift=0):
'''
Validate a TOTP value inside a window of
[drift-bacward_drift:drift+forward_drift] of time steps.
Where drift is the drift obtained during the last call to accept_totp.
:param response:
a string representing the OTP to check, its format should correspond
to the format parameter (it's not mandatory, it is part of the
checks),
:param key:
the TOTP key given as an hexadecimal string
:param format:
the output format, can be:
- hex40, for a 40 characters hexadecimal format,
- dec4, for a 4 characters decimal format,
- dec6,
- dec7, or
- dec8
it default to dec6.
:param period:
a positive integer giving the period between changes of the OTP
value, as seconds, it defaults to 30.
:param t:
a positive integer giving the current time as seconds since EPOCH
(1st January 1970 at 00:00 GMT), if None we use time.time(); it
defaults to None;
:param hash:
the hash module (usually from the hashlib package) to use,
it defaults to hashlib.sha1.
:param forward_drift:
how much we accept the client clock to advance, as a number of
periods, i.e. if the period is 30 seconds, a forward_drift of 2,
allows at most a clock a drift of 90 seconds;
Schema:
.___ Current time
|
0 v + 30s +60s +90s
[ current_period | period+1 | period+2 [
it defaults to 1.
:param backward_drift:
how much we accept the client clock to backstep; it defaults to 1.
:param drift:
an absolute drift of the local clock to the client clock; use it to
keep track of an augmenting drift with a client without augmenting
the size of the window given by forward_drift and backward_dript; it
defaults to 0, you should usually give as value the last value
returned by accept_totp for this client (read further).
:returns:
a pair (v,d) where v is a boolean giving the result, and d the
needed drift to validate the value. The drift value should be saved
relative to the current client. This saved value SHOULD be used in
later calls to accept_totp in order to accept a slowly accumulating
drift in the client token clock; on the server side you should use
reliable source of time like an NTP server.
:rtype: a two element tuple
'''
if t is None:
t = int(time.time())
for i in range(max(-divmod(t, period)[0],-backward_drift),forward_drift+1):
d = (drift+i) * period
if _utils.compare_digest(totp(key, format=format, period=period, hash=hash, t=t+d), response):
return True, drift+i
return False, 0 | Validate a TOTP value inside a window of
[drift-bacward_drift:drift+forward_drift] of time steps.
Where drift is the drift obtained during the last call to accept_totp.
:param response:
a string representing the OTP to check, its format should correspond
to the format parameter (it's not mandatory, it is part of the
checks),
:param key:
the TOTP key given as an hexadecimal string
:param format:
the output format, can be:
- hex40, for a 40 characters hexadecimal format,
- dec4, for a 4 characters decimal format,
- dec6,
- dec7, or
- dec8
it default to dec6.
:param period:
a positive integer giving the period between changes of the OTP
value, as seconds, it defaults to 30.
:param t:
a positive integer giving the current time as seconds since EPOCH
(1st January 1970 at 00:00 GMT), if None we use time.time(); it
defaults to None;
:param hash:
the hash module (usually from the hashlib package) to use,
it defaults to hashlib.sha1.
:param forward_drift:
how much we accept the client clock to advance, as a number of
periods, i.e. if the period is 30 seconds, a forward_drift of 2,
allows at most a clock a drift of 90 seconds;
Schema:
.___ Current time
|
0 v + 30s +60s +90s
[ current_period | period+1 | period+2 [
it defaults to 1.
:param backward_drift:
how much we accept the client clock to backstep; it defaults to 1.
:param drift:
an absolute drift of the local clock to the client clock; use it to
keep track of an augmenting drift with a client without augmenting
the size of the window given by forward_drift and backward_dript; it
defaults to 0, you should usually give as value the last value
returned by accept_totp for this client (read further).
:returns:
a pair (v,d) where v is a boolean giving the result, and d the
needed drift to validate the value. The drift value should be saved
relative to the current client. This saved value SHOULD be used in
later calls to accept_totp in order to accept a slowly accumulating
drift in the client token clock; on the server side you should use
reliable source of time like an NTP server.
:rtype: a two element tuple | entailment |
def from_b32key(b32_key, state=None):
'''Some phone app directly accept a partial b32 encoding, we try to emulate that'''
try:
lenient_b32decode(b32_key)
except TypeError:
raise ValueError('invalid base32 value')
return GoogleAuthenticator('otpauth://totp/xxx?%s' %
urlencode({'secret': b32_key}), state=state) | Some phone app directly accept a partial b32 encoding, we try to emulate that | entailment |
def generate(self,
secret,
type='totp',
account='alex',
issuer=None,
algo='sha1',
digits=6,
init_counter=None):
"""
https://github.com/google/google-authenticator/wiki/Key-Uri-Format
"""
args = {}
uri = 'otpauth://{0}/{1}?{2}'
try:
# converts the secret to a 16 cars string
a = binascii.unhexlify(secret)
args[SECRET] = base64.b32encode(a).decode('ascii')
except binascii.Error as ex:
raise ValueError(str(ex))
except Exception as ex:
print(ex)
raise ValueError('invalid secret format')
if type not in [TOTP, HOTP]:
raise ValueError('type should be totp or hotp, got ',
type)
if type != TOTP:
args['type'] = type
if algo not in ['sha1', 'sha256', 'sha512']:
raise ValueError('algo should be sha1, sha256 or sha512, got ',
algo)
if algo != 'sha1':
args['algorithm'] = algo
if init_counter is not None:
if type != HOTP:
raise ValueError('type should be hotp when ',
'setting init_counter')
if int(init_counter) < 0:
raise ValueError('init_counter should be positive')
args[COUNTER] = int(init_counter)
digits = int(digits)
if digits != 6 and digits != 8:
raise ValueError('digits should be 6 or 8')
if digits != 6:
args[DIGITS] = digits
args[PERIOD] = 30
account = quote(account)
if issuer is not None:
account = quote(issuer) + ':' + account
args[ISSUER] = issuer
uri = uri.format(type, account, urlencode(args).replace("+", "%20"))
return uri | https://github.com/google/google-authenticator/wiki/Key-Uri-Format | entailment |
def _convert_operator(op_name, attrs, identity_list=None, convert_map=None):
"""Convert from onnx operator to mxnet operator.
The converter must specify conversions explicitly for incompatible name, and
apply handlers to operator attributes.
Parameters
----------
op_name : str
Operator name, such as Convolution, FullyConnected
attrs : dict
Dict of operator attributes
identity_list : list
List of operators that don't require conversion
convert_map : dict
Dict of name : callable, where name is the op's name that
require conversion to mxnet, callable are functions which
take attrs and return (new_op_name, new_attrs)
Returns
-------
(op_name, attrs)
Converted (op_name, attrs) for mxnet.
"""
identity_list = identity_list if identity_list else _identity_list
convert_map = convert_map if convert_map else _convert_map
if op_name in identity_list:
pass
elif op_name in convert_map:
op_name, attrs = convert_map[op_name](attrs)
else:
raise NotImplementedError("Operator {} not implemented.".format(op_name))
op = getattr(mx.sym, op_name, None)
if not op:
raise RuntimeError("Unable to map op_name {} to sym".format(op_name))
return op, attrs | Convert from onnx operator to mxnet operator.
The converter must specify conversions explicitly for incompatible name, and
apply handlers to operator attributes.
Parameters
----------
op_name : str
Operator name, such as Convolution, FullyConnected
attrs : dict
Dict of operator attributes
identity_list : list
List of operators that don't require conversion
convert_map : dict
Dict of name : callable, where name is the op's name that
require conversion to mxnet, callable are functions which
take attrs and return (new_op_name, new_attrs)
Returns
-------
(op_name, attrs)
Converted (op_name, attrs) for mxnet. | entailment |
def from_onnx(self, graph):
"""Construct symbol from onnx graph.
The inputs from onnx graph is vague, only providing "1", "2"...
For convenience, we rename the `real` input names to "input_0",
"input_1"... And renaming parameters to "param_0", "param_1"...
Parameters
----------
graph : onnx protobuf object
The loaded onnx graph
Returns
-------
sym :mx.sym
The returned mxnet symbol
params : dict
A dict of name: mx.nd.array pairs, used as pretrained weights
"""
# parse network inputs, aka parameters
for init_tensor in graph.initializer:
if not init_tensor.name.strip():
raise ValueError("Tensor's name is required.")
self._params[init_tensor.name] = self._parse_array(init_tensor)
# converting GraphProto message
for i in graph.input:
if i.name in self._params:
# i is a param instead of input
name_param = 'param_{}'.format(self._num_param)
self._num_param += 1
self._params[name_param] = self._params.pop(i.name)
self._nodes[name_param] = mx.sym.Variable(name=name_param,
shape=self._params[name_param].shape)
self._renames[i.name] = name_param
else:
name_input = 'input_{}'.format(self._num_input)
self._num_input += 1
self._nodes[name_input] = mx.sym.Variable(name=name_input)
self._renames[i.name] = name_input
# constructing nodes, nodes are stored as directed acyclic graph
# converting NodeProto message
for node in graph.node:
op_name = node.op_type
node_name = node.name.strip()
node_name = node_name if node_name else None
onnx_attr = self._parse_attr(node.attribute)
new_op, mx_attr = _convert_operator(op_name, onnx_attr)
inputs = [self._nodes[self._renames.get(i, i)] for i in node.input]
# some workarounds for inconsistencies in onnx and mxnet conventions.
mx_attr = self._fix_bias(new_op, mx_attr, len(inputs))
mx_attr = self._fix_channels(new_op, mx_attr, list(node.input))
self._fix_bias_shape(node.op_type, node.input, onnx_attr)
# calling again to get new symbols after some workarounds
inputs = [self._nodes[self._renames.get(i, i)] for i in node.input]
# onnx's Gemm operator also supports broadcasting C input which
# mxnet's equivalent linalg_gemm doesn't. So using combination of
# transpose and FullyConnected operators.
if op_name == 'Gemm':
new_op, inputs, mx_attr = self._fix_gemm('FullyConnected', inputs, onnx_attr)
# onnx slice works on multiple axes whereas mxnet's slice_axis is for single axis
if op_name == 'Slice':
op = self._fix_slice(inputs, mx_attr)
elif op_name == 'AveragePool' and onnx_attr.get('pads') is not None or \
op_name == 'MaxPool' and onnx_attr.get('pads') is not None:
op = self._fix_pooling(op_name, inputs, onnx_attr)
elif op_name == 'Squeeze':
op = self._fix_squeeze(inputs, mx_attr)
elif op_name == 'Max' or op_name == 'Min':
op = self._fix_max_min(op_name, inputs)
elif node_name is None:
op = new_op(*inputs, **mx_attr)
else:
op = new_op(name=node_name, *inputs, **mx_attr)
node_output = self._fix_outputs(op_name, node.output)
assert len(node_output) == len(op.list_outputs()), (
"Number of output mismatch {} vs {} in {}.".format(
len(node_output), len(op.list_outputs()), op_name))
for k, i in zip(list(node_output), range(len(node_output))):
self._nodes[k] = op[i]
# now return the outputs
out = [self._nodes[i.name] for i in graph.output]
if len(out) > 1:
out = mx.sym.Group(out)
else:
out = out[0]
return out, self._params | Construct symbol from onnx graph.
The inputs from onnx graph is vague, only providing "1", "2"...
For convenience, we rename the `real` input names to "input_0",
"input_1"... And renaming parameters to "param_0", "param_1"...
Parameters
----------
graph : onnx protobuf object
The loaded onnx graph
Returns
-------
sym :mx.sym
The returned mxnet symbol
params : dict
A dict of name: mx.nd.array pairs, used as pretrained weights | entailment |
def _fix_pooling(self, op_name, inputs, new_attr):
"""onnx pooling operator supports asymmetrical padding
Adding pad operator before pooling in mxnet to work with onnx"""
pool_type = 'avg' if op_name == 'AveragePool' else 'max'
stride = new_attr.get('strides')
kernel = new_attr.get('kernel_shape')
padding = new_attr.get('pads')
pad_width = (0, 0, 0, 0) + _pad_sequence_fix(padding, len(kernel))
new_pad_op = mx.sym.pad(inputs[0], mode='constant', pad_width=pad_width)
new_pooling_op = mx.sym.Pooling(new_pad_op, pool_type=pool_type,
stride=stride, kernel=kernel)
return new_pooling_op | onnx pooling operator supports asymmetrical padding
Adding pad operator before pooling in mxnet to work with onnx | entailment |
def _fix_slice(self, inputs, new_attr):
"""onnx slice provides slicing on multiple axis. Adding multiple slice_axis operator
for multiple axes from mxnet"""
begin = new_attr.get('begin')
end = new_attr.get('end')
axes = new_attr.get('axis', tuple(range(len(begin))))
slice_op = mx.sym.slice_axis(inputs[0], axis=axes[0], begin=begin[0], end=end[0])
if len(axes) > 1:
for i, axis in enumerate(axes):
slice_op = mx.sym.slice_axis(slice_op, axis=axis, begin=begin[i], end=end[i])
return slice_op | onnx slice provides slicing on multiple axis. Adding multiple slice_axis operator
for multiple axes from mxnet | entailment |
def _fix_squeeze(self, inputs, new_attr):
"""
MXNet doesnt have a squeeze operator.
Using "split" to perform similar operation.
"split" can be slower compared to "reshape".
This can have performance impact.
TODO: Remove this implementation once mxnet adds the support.
"""
axes = new_attr.get('axis')
op = mx.sym.split(inputs[0], axis=axes[0], num_outputs=1, squeeze_axis=1)
for i in axes[1:]:
op = mx.sym.split(op, axis=i-1, num_outputs=1, squeeze_axis=1)
return op | MXNet doesnt have a squeeze operator.
Using "split" to perform similar operation.
"split" can be slower compared to "reshape".
This can have performance impact.
TODO: Remove this implementation once mxnet adds the support. | entailment |
def _fix_max_min(self, op_name, inputs):
""" MXNet maximum/minimum compares only two symbols at a time.
ONNX can send more than two to compare.
Breaking into multiple mxnet ops to compare two symbols at a time"""
if len(inputs) > 1:
if op_name == 'Max':
op = mx.sym.maximum(inputs[0], inputs[1])
for ip in inputs[2:]:
op = mx.sym.maximum(op, ip)
elif op_name == 'Min':
op = mx.sym.minimum(inputs[0], inputs[1])
for ip in inputs[2:]:
op = mx.sym.minimum(op, ip)
else:
op = inputs[0]
return op | MXNet maximum/minimum compares only two symbols at a time.
ONNX can send more than two to compare.
Breaking into multiple mxnet ops to compare two symbols at a time | entailment |
def _fix_gemm(self, op_name, inputs, old_attr):
"""Using FullyConnected operator in place of linalg_gemm to perform same operation"""
op = getattr(mx.sym, op_name, None)
alpha = float(old_attr.get('alpha', 1.0))
beta = float(old_attr.get('beta', 1.0))
transA = int(old_attr.get('transA', 0))
transB = int(old_attr.get('transB', 0))
if transA:
inputs[0] = mx.sym.transpose(inputs[0], axes=(1, 0))
if not transB:
inputs[1] = mx.sym.transpose(inputs[1], axes=(1, 0))
new_inputs = [alpha*inputs[0], inputs[1], beta*inputs[2]]
new_attr = {'num_hidden' : self._params[inputs[2].name].shape[0]}
return op, new_inputs, new_attr | Using FullyConnected operator in place of linalg_gemm to perform same operation | entailment |
def _parse_array(self, tensor_proto):
"""Grab data in TensorProto and convert to numpy array."""
try:
from onnx.numpy_helper import to_array
except ImportError as e:
raise ImportError("Unable to import onnx which is required {}".format(e))
np_array = to_array(tensor_proto).reshape(tuple(tensor_proto.dims))
return mx.nd.array(np_array) | Grab data in TensorProto and convert to numpy array. | entailment |
def _parse_attr(self, attr_proto):
"""Convert a list of AttributeProto to a dict, with names as keys."""
attrs = {}
for a in attr_proto:
for f in ['f', 'i', 's']:
if a.HasField(f):
attrs[a.name] = getattr(a, f)
for f in ['floats', 'ints', 'strings']:
if list(getattr(a, f)):
assert a.name not in attrs, "Only one type of attr is allowed"
attrs[a.name] = tuple(getattr(a, f))
for f in ['t', 'g']:
if a.HasField(f):
attrs[a.name] = getattr(a, f)
for f in ['tensors', 'graphs']:
if list(getattr(a, f)):
raise NotImplementedError("Filed {} is not supported in mxnet.".format(f))
if a.name not in attrs:
raise ValueError("Cannot parse attribute: \n{}\n.".format(a))
return attrs | Convert a list of AttributeProto to a dict, with names as keys. | entailment |
def _fix_outputs(self, op, outputs):
"""A workaround to handle dropout or similar operator that have more than one out
in ONNX.
"""
if op == 'Dropout':
assert len(outputs) == 2, "ONNX have two outputs for dropout layer."
outputs = outputs[:-1]
return outputs | A workaround to handle dropout or similar operator that have more than one out
in ONNX. | entailment |
def _fix_bias(self, op, attrs, num_inputs):
"""A workaround for 'use_bias' attribute since onnx don't provide this attribute,
we have to check the number of inputs to decide it."""
if op not in [mx.sym.Convolution, mx.sym.Deconvolution, mx.sym.FullyConnected]:
return attrs
if num_inputs == 3:
attrs['no_bias'] = False
elif num_inputs == 2:
attrs['no_bias'] = True
else:
raise ValueError("Unexpected number of inputs for: {}".format(op))
return attrs | A workaround for 'use_bias' attribute since onnx don't provide this attribute,
we have to check the number of inputs to decide it. | entailment |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.