Allows you to request changes for your entities. Within a single ChangeSet, you can't start the same change type against the same entity multiple times. Additionally, when a ChangeSet is running, all the entities targeted by the different changes are locked until the change set has completed (either succeeded, cancelled, or failed). If you try to start a change set containing a change against an entity that is already locked, you will receive a ResourceInUseException error.
For example, you can't start the ChangeSet described in the example later in this topic because it contains two changes to run the same change type (AddRevisions) against the same entity (entity-id@1).
For more information about working with change sets, see Working with change sets. For information about change types for single-AMI products, see Working with single-AMI products. Also, for more information about change types available for container-based products, see Working with container products.
To download "DetailsDocument" shapes, see Python and Java shapes on GitHub.
Parameters:
-
catalog
(Catalog)
–
The catalog related to the request. Fixed value: AWSMarketplace
-
change_set
(RequestedChangeList)
–
-
change_set_name
(Optional[ChangeSetName], default:
None
)
–
Optional case sensitive string of up to 100 ASCII characters. The change set name can be used to filter the list of change sets.
-
client_request_token
(Optional[ClientRequestToken], default:
None
)
–
A unique token to identify the request to ensure idempotency.
-
change_set_tags
(Optional[TagList], default:
None
)
–
A list of objects specifying each key name and value for the ChangeSetTags property.
-
intent
(Optional[Intent], default:
None
)
–
The intent related to the request. The default is APPLY. To test your request before applying changes to your entities, use VALIDATE. This feature is currently available for adding versions to single-AMI products. For more information, see Add a new version.
Raises:
Source code in docs_src/capo_marketplace_catalog/_services/async_marketplace_catalog.py
| async def start_change_set(
self,
catalog: "capo_marketplace_catalog.types.catalog.Catalog",
change_set: "capo_marketplace_catalog.types.requested_change_list.RequestedChangeList",
*,
config_overrides: Optional[AsyncMarketplaceCatalogClientConfig] = None,
change_set_name: Optional[
"capo_marketplace_catalog.types.change_set_name.ChangeSetName"
] = None,
client_request_token: Optional[
"capo_marketplace_catalog.types.client_request_token.ClientRequestToken"
] = None,
change_set_tags: Optional[
"capo_marketplace_catalog.types.tag_list.TagList"
] = None,
intent: Optional["capo_marketplace_catalog.types.intent.Intent"] = None,
) -> "capo_marketplace_catalog.types.start_change_set_response.StartChangeSetResponse":
"""<p>Allows you to request changes for your entities. Within a single <code>ChangeSet</code>, you can't start the same change type against the same entity multiple times. Additionally, when a <code>ChangeSet</code> is running, all the entities targeted by the different changes are locked until the change set has completed (either succeeded, cancelled, or failed). If you try to start a change set containing a change against an entity that is already locked, you will receive a <code>ResourceInUseException</code> error.</p> <p>For example, you can't start the <code>ChangeSet</code> described in the <a href="https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/API_StartChangeSet.html#API_StartChangeSet_Examples">example</a> later in this topic because it contains two changes to run the same change type (<code>AddRevisions</code>) against the same entity (<code>entity-id@1</code>).</p> <p>For more information about working with change sets, see <a href="https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/welcome.html#working-with-change-sets"> Working with change sets</a>. For information about change types for single-AMI products, see <a href="https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/ami-products.html#working-with-single-AMI-products">Working with single-AMI products</a>. Also, for more information about change types available for container-based products, see <a href="https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/container-products.html#working-with-container-products">Working with container products</a>.</p> <p>To download "DetailsDocument" shapes, see <a href="https://github.com/awslabs/aws-marketplace-catalog-api-shapes-for-python">Python</a> and <a href="https://github.com/awslabs/aws-marketplace-catalog-api-shapes-for-java/tree/main">Java</a> shapes on GitHub.</p>
Args:
catalog: <p>The catalog related to the request. Fixed value: <code>AWSMarketplace</code> </p>
change_set: <p>Array of <code>change</code> object.</p>
change_set_name: <p>Optional case sensitive string of up to 100 ASCII characters. The change set name can be used to filter the list of change sets. </p>
client_request_token: <p>A unique token to identify the request to ensure idempotency.</p>
change_set_tags: <p>A list of objects specifying each key name and value for the <code>ChangeSetTags</code> property.</p>
intent: <p>The intent related to the request. The default is <code>APPLY</code>. To test your request before applying changes to your entities, use <code>VALIDATE</code>. This feature is currently available for adding versions to single-AMI products. For more information, see <a href="https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/ami-products.html#ami-add-version">Add a new version</a>.</p>
Raises:
capo_marketplace_catalog.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p> <p>HTTP status code: 403</p>
capo_marketplace_catalog.errors.internal_service_exception.InternalServiceException: <p>There was an internal service exception.</p> <p>HTTP status code: 500</p>
capo_marketplace_catalog.errors.resource_in_use_exception.ResourceInUseException: <p>The resource is currently in use.</p>
capo_marketplace_catalog.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource wasn't found.</p> <p>HTTP status code: 404</p>
capo_marketplace_catalog.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The maximum number of open requests per account has been exceeded.</p>
capo_marketplace_catalog.errors.throttling_exception.ThrottlingException: <p>Too many requests.</p> <p>HTTP status code: 429</p>
capo_marketplace_catalog.errors.validation_exception.ValidationException: <p>An error occurred during validation.</p> <p>HTTP status code: 422</p>
capo_marketplace_catalog.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_marketplace_catalog.types.start_change_set_request.StartChangeSetRequest]",
) -> AsyncOperationResponse[
"capo_marketplace_catalog.types.start_change_set_response.StartChangeSetResponse"
]:
import capo_marketplace_catalog._operations.awsmp_seymour.start_change_set
(
output,
http_response,
) = await capo_marketplace_catalog._operations.awsmp_seymour.start_change_set.async_start_change_set(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartChangeSet")
)
input_: capo_marketplace_catalog.types.start_change_set_request.StartChangeSetRequest = {
"catalog": catalog,
"change_set": change_set,
}
if change_set_name is not None:
input_["change_set_name"] = change_set_name
if client_request_token is None:
client_request_token = str(uuid.uuid4())
input_["client_request_token"] = client_request_token
if change_set_tags is not None:
input_["change_set_tags"] = change_set_tags
if intent is not None:
input_["intent"] = intent
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|