createWorkspaceEnforcedPolicy
abstract suspend fun createWorkspaceEnforcedPolicy(input: CreateWorkspaceEnforcedPolicyRequest): CreateWorkspaceEnforcedPolicyResponse
Creates a WorkSpace-enforced policy, which the WorkSpace applies. The name must be unique among the WorkSpace-enforced policies in your account. If it isn't, the operation returns ConflictException, and its ResourceId identifies the existing policy. If your account would exceed its maximum number of WorkSpace-enforced policies, the operation returns ServiceQuotaExceededException.
Samples
// The following example creates a WorkSpace enforced policy that keeps internet access on.
val resp = workSpacesClient.createWorkspaceEnforcedPolicy {
clientToken = "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
name = "default-network"
policyBody = "{\"disableInternetAccess\":false,\"deniedPaths\":[]}"
}Content copied to clipboard