update_deployment
async
¶
update_deployment(
deployment_identifier: DeploymentIdentifier,
update_token: UpdateToken,
is_published: IsPublished,
*,
config_overrides: Optional[AsyncNetworkSecurityManagerClientConfig] = None,
deployment_description: Optional[Description] = None,
deployment_configuration: Optional[DeploymentConfiguration] = None,
associated_policy_list: Optional[PolicyReferenceList] = None,
associated_scope_list: Optional[ScopeReferenceList] = None,
client_token: Optional[IdempotencyToken] = None,
) -> UpdateDeploymentOutput
Updates the specified deployment. To prevent conflicting concurrent updates, provide the current updateToken. Use isPublished to publish the update or keep the deployment as a draft.
Parameters:
-
deployment_identifier(DeploymentIdentifier) –The identifier of the deployment. This is the deployment'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. -
deployment_description(Optional[Description], default:None) –A description of the deployment.
-
deployment_configuration(Optional[DeploymentConfiguration], default:None) –The configuration settings for the deployment.
-
associated_policy_list(Optional[PolicyReferenceList], default:None) –The policies associated with the deployment.
-
associated_scope_list(Optional[ScopeReferenceList], default:None) –The scope associated with the deployment. A deployment has exactly one scope.
-
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 deployment and publish it Updates the deployment's associations and publishes the change. The response includes deploymentCoverage showing which resource types the associated policies can protect. The updateToken from the most recent read is required for optimistic locking.
>>> await client.update_deployment(deployment_identifier='arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456', update_token='f4a5b6c7-7d8e-4f9a-8b1c-1d2e3f4a5b6c', deployment_description='Production deployment for US East 1 region - updated', associated_policy_list=[{'policyIdentifier': 'arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789'}], associated_scope_list=[{'scopeIdentifier': 'arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123'}], deployment_configuration={'enableCrossAccountVisibility': True}, is_published=True)
Source code in docs_src/capo_network_security_manager/_services/async_network_security_manager.py
1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 | |