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
3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 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 | |