update_template
async
¶
update_template(
template_identifier: TemplateIdentifier,
update_token: UpdateToken,
is_published: IsPublished,
*,
config_overrides: Optional[AsyncNetworkSecurityManagerClientConfig] = None,
template_description: Optional[Description] = None,
associated_rule_list: Optional[RuleReferenceList] = None,
client_token: Optional[IdempotencyToken] = None,
) -> UpdateTemplateOutput
Updates the specified template. To prevent conflicting concurrent updates, provide the current updateToken. Use isPublished to publish the update or keep the template as a draft.
Parameters:
-
template_identifier(TemplateIdentifier) –The identifier of the template. This is the template's Amazon Resource Name (ARN).
-
update_token(UpdateToken) –A token used for optimistic concurrency control. Each read and write returns an
updateToken. Provide the most recent value on your next update to detect and prevent conflicting concurrent modifications. -
template_description(Optional[Description], default:None) –A description of the template.
-
associated_rule_list(Optional[RuleReferenceList], default:None) –The rules associated with the template.
-
is_published(IsPublished) –Specifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT). -
client_token(Optional[IdempotencyToken], default:None) –A unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
Raises:
-
AccessDeniedException–You do not have sufficient permissions to perform this action.
-
ConflictException–The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
-
InternalServerException–The request processing failed because of an internal error in the service. This is a retryable error.
-
ResourceNotFoundException–The specified resource was not found. Verify that the resource identifier is correct and that the resource exists, then try your request again.
-
ServiceQuotaExceededException–The request would exceed a service quota.
-
ThrottlingException–The request was denied because of request throttling. Reduce your request rate and try again.
-
ValidationException–The request failed validation. For details, see the
reasonandfieldListmembers of the response. -
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Update a template and publish it Updates the template's description and rule associations and publishes the change. The updateToken from the most recent read is required for optimistic locking.
>>> await client.update_template(template_identifier='arn:aws:network-security-manager:us-east-1:123456789012:template:xyz789', update_token='d2e3f4a5-5b6c-4d7e-8f9a-9b0c1d2e3f4a', template_description='Standard WAF template with baseline rule groups - updated', associated_rule_list=[{'ruleIdentifier': 'arn:aws:network-security-manager:us-east-1:123456789012:rule:abc123'}], is_published=True)
Source code in docs_src/capo_network_security_manager/_services/async_network_security_manager.py
3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 | |