updateDeployment
inline suspend fun NetworkSecurityManagerClient.updateDeployment(crossinline block: UpdateDeploymentRequest.Builder.() -> Unit): UpdateDeploymentResponse
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.
Samples
// 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.
val resp = networkSecurityManagerClient.updateDeployment {
deploymentIdentifier = "arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456"
updateToken = "f4a5b6c7-7d8e-4f9a-8b1c-1d2e3f4a5b6c"
deploymentDescription = "Production deployment for US East 1 region - updated"
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 = true
}
isPublished = true
}Content copied to clipboard