update_scope
async
¶
update_scope(
scope_identifier: ScopeIdentifier,
update_token: UpdateToken,
is_published: IsPublished,
*,
config_overrides: Optional[AsyncNetworkSecurityManagerClientConfig] = None,
scope_description: Optional[Description] = None,
scope_configuration: Optional[ScopeConfiguration] = None,
client_token: Optional[IdempotencyToken] = None,
) -> UpdateScopeOutput
Updates the specified scope. To prevent conflicting concurrent updates, provide the current updateToken. Use isPublished to publish the update or keep the scope as a draft.
Parameters:
-
scope_identifier(ScopeIdentifier) –The identifier of the scope. This is the scope'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. -
scope_description(Optional[Description], default:None) –A description of the scope.
-
scope_configuration(Optional[ScopeConfiguration], default:None) –The configuration that defines which accounts and resources are in scope. If you don't include this member, the scope keeps its existing configuration.
A new configuration can change which accounts and resources are selected, but it can't add or remove the account filter itself: a scope created for multi-account use stays multi-account, and a scope created for single-account use stays single-account.
-
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 scope and publish it Updates the scope's description and configuration and publishes the change. The updateToken from the most recent read is required for optimistic locking.
>>> await client.update_scope(scope_identifier='arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123', update_token='b0c4d1e2-3f4a-4b5c-8d6e-7f8a9b0c1d2e', scope_description='Scope covering all production web application resources in US East 1', scope_configuration={'accountFilter': {'includeAll': {}}, 'resourceScopes': {}}, is_published=True)
Source code in docs_src/capo_network_security_manager/_services/async_network_security_manager.py
2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 | |