put_stored_query
(**kwargs)¶Saves a new query or updates an existing saved query. The QueryName
must be unique for a single Amazon Web Services account and a single Amazon Web Services Region. You can create upto 300 queries in a single Amazon Web Services account and a single Amazon Web Services Region.
See also: AWS API Documentation
Request Syntax
response = client.put_stored_query(
StoredQuery={
'QueryId': 'string',
'QueryArn': 'string',
'QueryName': 'string',
'Description': 'string',
'Expression': 'string'
},
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
A list of StoredQuery
objects. The mandatory fields are QueryName
and Expression
.
Note
When you are creating a query, you must provide a query name and an expression. When you are updating a query, you must provide a query name but updating the description is optional.
The ID of the query.
Amazon Resource Name (ARN) of the query. For example, arn:partition:service:region:account-id:resource-type/resource-name/resource-id.
The name of the query.
A unique description for the query.
The expression of the query. For example, SELECT resourceId, resourceType, supplementaryConfiguration.BucketVersioningConfiguration.status WHERE resourceType = 'AWS::S3::Bucket' AND supplementaryConfiguration.BucketVersioningConfiguration.status = 'Off'.
A list of Tags
object.
The tags for the resource. The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.
The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).
dict
Response Syntax
{
'QueryArn': 'string'
}
Response Structure
(dict) --
QueryArn (string) --
Amazon Resource Name (ARN) of the query. For example, arn:partition:service:region:account-id:resource-type/resource-name/resource-id.
Exceptions
ConfigService.Client.exceptions.ValidationException
ConfigService.Client.exceptions.TooManyTagsException
ConfigService.Client.exceptions.ResourceConcurrentModificationException