create_deployment
¶
create_deployment(
deployment_name: DeploymentName,
deployment_configuration: DeploymentConfiguration,
associated_policy_list: PolicyReferenceList,
associated_scope_list: ScopeReferenceList,
*,
config_overrides: Optional[NetworkSecurityManagerClientConfig] = None,
client_token: Optional[IdempotencyToken] = None,
deployment_description: Optional[Description] = None,
is_published: Optional[IsPublished] = None,
tags: Optional[TagMap] = None,
) -> CreateDeploymentOutput
Creates a deployment. A deployment applies one or more policies to the accounts and resources selected by a scope. Use isPublished to create the deployment in published (ACTIVE) or draft (DRAFT) state. The response includes coverage information and any warnings about the deployment.
Parameters:
-
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.
-
deployment_name(DeploymentName) –The name of the deployment.
-
deployment_description(Optional[Description], default:None) –A description of the deployment.
-
deployment_configuration(DeploymentConfiguration) –The configuration settings for the deployment.
-
associated_policy_list(PolicyReferenceList) –The policies associated with the deployment.
-
associated_scope_list(ScopeReferenceList) –The scope associated with the deployment. A deployment has exactly one scope.
-
is_published(Optional[IsPublished], default:None) –Specifies whether to publish the resource. When
true, the resource is saved in published (ACTIVE) state. Whenfalse, it is saved as a draft (DRAFT). Default:true. -
tags(Optional[TagMap], default:None) –The tags to add to the resource when it is created.
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.
-
ServiceQuotaExceededException–The request would exceed a service quota.
-
ServiceUnavailableException–The service is temporarily unavailable. This is a retryable error.
-
TagPolicyViolationException–The request violates a tag policy that is in effect for the account or organization.
-
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:
Create a deployment Creates a new deployment in draft state.
>>> client.create_deployment(client_token='550e8400-e29b-41d4-a716-446655440003', deployment_name='prod-us-east-1-deployment', deployment_description='Production deployment for US East 1 region', 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': False}, is_published=False)
Source code in docs_src/capo_network_security_manager/_services/network_security_manager.py
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 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 | |