createDeployment

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.

Samples

// Creates a new deployment in draft state.
val resp = networkSecurityManagerClient.createDeployment {
    clientToken = "550e8400-e29b-41d4-a716-446655440003"
    deploymentName = "prod-us-east-1-deployment"
    deploymentDescription = "Production deployment for US East 1 region"
    associatedPolicyList = listOf<PolicyReference>(
        PolicyReference {
            policyIdentifier = "arn:aws:network-security-manager:us-east-1:123456789012:policy:xyz789"
        }            
    )
    associatedScopeList = listOf<ScopeReference>(
        ScopeReference {
            scopeIdentifier = "arn:aws:network-security-manager:us-east-1:123456789012:scope:abc123"
        }            
    )
    deploymentConfiguration = DeploymentConfiguration {
        enableCrossAccountVisibility = false
    }
    isPublished = false
}