update_scope
¶
update_scope(
scope_identifier: ScopeIdentifier,
update_token: UpdateToken,
is_published: IsPublished,
*,
config_overrides: Optional[NetworkSecurityManagerClientConfig] = 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.
>>> 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/network_security_manager.py
3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 | |