Table of Contents
Support.
Client
¶A low-level client representing AWS Support:
client = session.create_client('support')
These are the available methods:
add_attachments_to_set()
add_communication_to_case()
can_paginate()
create_case()
describe_attachment()
describe_cases()
describe_communications()
describe_services()
describe_severity_levels()
describe_trusted_advisor_check_refresh_statuses()
describe_trusted_advisor_check_result()
describe_trusted_advisor_check_summaries()
describe_trusted_advisor_checks()
generate_presigned_url()
get_paginator()
get_waiter()
refresh_trusted_advisor_check()
resolve_case()
add_attachments_to_set
(**kwargs)¶Adds one or more attachments to an attachment set. If an AttachmentSetId
is not specified, a new attachment set is created, and the ID of the set is returned in the response. If an AttachmentSetId
is specified, the attachments are added to the specified set, if it exists.
An attachment set is a temporary container for attachments that are to be added to a case or case communication. The set is available for one hour after it is created; the ExpiryTime
returned in the response indicates when the set expires. The maximum number of attachments in a set is 3, and the maximum size of any attachment in the set is 5 MB.
Request Syntax
response = client.add_attachments_to_set(
attachmentSetId='string',
attachments=[
{
'fileName': 'string',
'data': b'bytes'
},
]
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'attachmentSetId': 'string',
'expiryTime': 'string'
}
Response Structure
|
add_communication_to_case
(**kwargs)¶Adds additional customer communication to an AWS Support case. You use the CaseId
value to identify the case to add communication to. You can list a set of email addresses to copy on the communication using the CcEmailAddresses
value. The CommunicationBody
value contains the text of the communication.
The response indicates the success or failure of the request.
This operation implements a subset of the features of the AWS Support Center.
Request Syntax
response = client.add_communication_to_case(
caseId='string',
communicationBody='string',
ccEmailAddresses=[
'string',
],
attachmentSetId='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'result': True|False
}
Response Structure
|
can_paginate
(operation_name)¶Check if an operation can be paginated.
Parameters: | operation_name (string) -- The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo , and you'd normally invoke the
operation as client.create_foo(**kwargs) , if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo") . |
---|---|
Returns: | True if the operation can be paginated,
False otherwise. |
create_case
(**kwargs)¶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:
ServiceCode
by calling DescribeServices .ServiceCode
value. You also obtain the category code for a service by calling DescribeServices . Each AWS service defines its own set of category codes.Note
To add additional communication or attachments to an existing case, use AddCommunicationToCase .
A successful CreateCase request returns an AWS Support case number. Case numbers are used by the DescribeCases operation to retrieve existing AWS Support cases.
Request Syntax
response = client.create_case(
subject='string',
serviceCode='string',
severityCode='string',
categoryCode='string',
communicationBody='string',
ccEmailAddresses=[
'string',
],
language='string',
issueType='string',
attachmentSetId='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'caseId': 'string'
}
Response Structure
|
describe_attachment
(**kwargs)¶Returns the attachment that has the specified ID. Attachment IDs are generated by the case management system when you add an attachment to a case or case communication. Attachment IDs are returned in the AttachmentDetails objects that are returned by the DescribeCommunications operation.
Request Syntax
response = client.describe_attachment(
attachmentId='string'
)
Parameters: | attachmentId (string) -- [REQUIRED] The ID of the attachment to return. Attachment IDs are returned by the DescribeCommunications operation. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'attachment': {
'fileName': 'string',
'data': b'bytes'
}
}
Response Structure
|
describe_cases
(**kwargs)¶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:
NextToken
values, which specify where to paginate the returned records represented by the CaseDetails
objects.Request Syntax
response = client.describe_cases(
caseIdList=[
'string',
],
displayId='string',
afterTime='string',
beforeTime='string',
includeResolvedCases=True|False,
nextToken='string',
maxResults=123,
language='string',
includeCommunications=True|False
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'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'
}
Response Structure
|
describe_communications
(**kwargs)¶Returns communications (and attachments) for one or more support cases. You can use the AfterTime
and BeforeTime
parameters to filter by date. You can use the CaseId
parameter to restrict the results to a particular case.
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.
You can use the MaxResults
and NextToken
parameters to control the pagination of the result set. Set MaxResults
to the number of cases you want displayed on each page, and use NextToken
to specify the resumption of pagination.
Request Syntax
response = client.describe_communications(
caseId='string',
beforeTime='string',
afterTime='string',
nextToken='string',
maxResults=123
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'communications': [
{
'caseId': 'string',
'body': 'string',
'submittedBy': 'string',
'timeCreated': 'string',
'attachmentSet': [
{
'attachmentId': 'string',
'fileName': 'string'
},
]
},
],
'nextToken': 'string'
}
Response Structure
|
describe_services
(**kwargs)¶Returns the current list of AWS services and a list of service categories that applies to each one. You then use service names and categories in your CreateCase requests. Each AWS service has its own set of categories.
The service codes and category codes correspond to the values that are displayed in the Service and Category drop-down lists on the AWS Support Center Create Case page. The values in those fields, however, do not necessarily match the service codes and categories returned by the DescribeServices
request. Always use the service codes and categories obtained programmatically. This practice ensures that you always have the most recent set of service and category codes.
Request Syntax
response = client.describe_services(
serviceCodeList=[
'string',
],
language='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'services': [
{
'code': 'string',
'name': 'string',
'categories': [
{
'code': 'string',
'name': 'string'
},
]
},
]
}
Response Structure
|
describe_severity_levels
(**kwargs)¶Returns the list of severity levels that you can assign to an AWS Support case. The severity level for a case is also a field in the CaseDetails data type included in any CreateCase request.
Request Syntax
response = client.describe_severity_levels(
language='string'
)
Parameters: | 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. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'severityLevels': [
{
'code': 'string',
'name': 'string'
},
]
}
Response Structure
|
describe_trusted_advisor_check_refresh_statuses
(**kwargs)¶Returns the refresh status of the Trusted Advisor checks that have the specified check IDs. Check IDs can be obtained by calling DescribeTrustedAdvisorChecks .
Request Syntax
response = client.describe_trusted_advisor_check_refresh_statuses(
checkIds=[
'string',
]
)
Parameters: | checkIds (list) -- [REQUIRED] The IDs of the Trusted Advisor checks.
|
---|---|
Return type: | dict |
Returns: | Response Syntax{
'statuses': [
{
'checkId': 'string',
'status': 'string',
'millisUntilNextRefreshable': 123
},
]
}
Response Structure
|
describe_trusted_advisor_check_result
(**kwargs)¶Returns the results of the Trusted Advisor check that has the specified check ID. Check IDs can be obtained by calling DescribeTrustedAdvisorChecks .
The response contains a TrustedAdvisorCheckResult object, which contains these three objects:
In addition, the response contains these fields:
Request Syntax
response = client.describe_trusted_advisor_check_result(
checkId='string',
language='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'result': {
'checkId': 'string',
'timestamp': 'string',
'status': 'string',
'resourcesSummary': {
'resourcesProcessed': 123,
'resourcesFlagged': 123,
'resourcesIgnored': 123,
'resourcesSuppressed': 123
},
'categorySpecificSummary': {
'costOptimizing': {
'estimatedMonthlySavings': 123.0,
'estimatedPercentMonthlySavings': 123.0
}
},
'flaggedResources': [
{
'status': 'string',
'region': 'string',
'resourceId': 'string',
'isSuppressed': True|False,
'metadata': [
'string',
]
},
]
}
}
Response Structure
|
describe_trusted_advisor_check_summaries
(**kwargs)¶Returns the summaries of the results of the Trusted Advisor checks that have the specified check IDs. Check IDs can be obtained by calling DescribeTrustedAdvisorChecks .
The response contains an array of TrustedAdvisorCheckSummary objects.
Request Syntax
response = client.describe_trusted_advisor_check_summaries(
checkIds=[
'string',
]
)
Parameters: | checkIds (list) -- [REQUIRED] The IDs of the Trusted Advisor checks.
|
---|---|
Return type: | dict |
Returns: | Response Syntax{
'summaries': [
{
'checkId': 'string',
'timestamp': 'string',
'status': 'string',
'hasFlaggedResources': True|False,
'resourcesSummary': {
'resourcesProcessed': 123,
'resourcesFlagged': 123,
'resourcesIgnored': 123,
'resourcesSuppressed': 123
},
'categorySpecificSummary': {
'costOptimizing': {
'estimatedMonthlySavings': 123.0,
'estimatedPercentMonthlySavings': 123.0
}
}
},
]
}
Response Structure
|
describe_trusted_advisor_checks
(**kwargs)¶Returns information about all available Trusted Advisor checks, including name, ID, category, description, and metadata. You must specify a language code; English ("en") and Japanese ("ja") are currently supported. The response contains a TrustedAdvisorCheckDescription for each check.
Request Syntax
response = client.describe_trusted_advisor_checks(
language='string'
)
Parameters: | language (string) -- [REQUIRED] 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. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'checks': [
{
'id': 'string',
'name': 'string',
'description': 'string',
'category': 'string',
'metadata': [
'string',
]
},
]
}
Response Structure
|
generate_presigned_url
(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
Parameters: |
|
---|---|
Returns: | The presigned url |
get_paginator
(operation_name)¶Create a paginator for an operation.
Parameters: | operation_name (string) -- The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo , and you'd normally invoke the
operation as client.create_foo(**kwargs) , if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo") . |
---|---|
Raises OperationNotPageableError: | |
Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
|
Return type: | L{botocore.paginate.Paginator} |
Returns: | A paginator object. |
get_waiter
(waiter_name)¶refresh_trusted_advisor_check
(**kwargs)¶Requests a refresh of the Trusted Advisor check that has the specified check ID. Check IDs can be obtained by calling DescribeTrustedAdvisorChecks .
The response contains a TrustedAdvisorCheckRefreshStatus object, which contains these fields:
Request Syntax
response = client.refresh_trusted_advisor_check(
checkId='string'
)
Parameters: | checkId (string) -- [REQUIRED] The unique identifier for the Trusted Advisor check. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'status': {
'checkId': 'string',
'status': 'string',
'millisUntilNextRefreshable': 123
}
}
Response Structure
|
resolve_case
(**kwargs)¶Takes a CaseId
and returns the initial state of the case along with the state of the case after the call to ResolveCase completed.
Request Syntax
response = client.resolve_case(
caseId='string'
)
Parameters: | caseId (string) -- The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-12345678910-2013-c4c1d2bf33c5cf47 |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'initialCaseStatus': 'string',
'finalCaseStatus': 'string'
}
Response Structure
|
The available paginators are:
Support.Paginator.
describe_cases
¶paginator = client.get_paginator('describe_cases')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from Support.Client.describe_cases()
.
Request Syntax
response_iterator = paginator.paginate(
caseIdList=[
'string',
],
displayId='string',
afterTime='string',
beforeTime='string',
includeResolvedCases=True|False,
language='string',
includeCommunications=True|False,
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'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'
}
Response Structure
|
Support.Paginator.
describe_communications
¶paginator = client.get_paginator('describe_communications')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from Support.Client.describe_communications()
.
Request Syntax
response_iterator = paginator.paginate(
caseId='string',
beforeTime='string',
afterTime='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'communications': [
{
'caseId': 'string',
'body': 'string',
'submittedBy': 'string',
'timeCreated': 'string',
'attachmentSet': [
{
'attachmentId': 'string',
'fileName': 'string'
},
]
},
],
'NextToken': 'string'
}
Response Structure
|