update_template
¶
update_template(
template_identifier: TemplateIdentifier,
update_token: UpdateToken,
is_published: IsPublished,
*,
config_overrides: Optional[NetworkSecurityManagerClientConfig] = 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.
>>> 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/network_security_manager.py
3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 | |