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
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 | |