CLI로 ModifyWorkspaceCreationProperties 사용 - AWS SDK 코드 예제

AWS SDK 예제 GitHub 리포지토리에 더 많은 AWS문서 SDK 예제가 있습니다.

CLI로 ModifyWorkspaceCreationProperties 사용

다음 코드 예시는 ModifyWorkspaceCreationProperties의 사용 방법을 보여 줍니다.

CLI
AWS CLI

디렉터리의 WorkSpace 생성 속성 수정

다음 modify-workspace-creation-properties 예제에서는 지정된 디렉터리에 대한 EnableInternetAccess 속성을 활성화합니다. 이렇게 하면 디렉터리에 대해 생성된 워크스페이스에 퍼블릭 IP 주소가 자동으로 할당됩니다.

aws workspaces modify-workspace-creation-properties \ --resource-id d-926722edaf \ --workspace-creation-properties EnableInternetAccess=true

이 명령은 출력을 생성하지 않습니다.

자세한 내용은 Amazon WorkSpaces 관리 안내서의 WorkSpaces의 디렉터리 업데이트를 참조하세요.

PowerShell
Tools for PowerShell V4

예제 1: 이 샘플에서는 Workspace를 생성하는 동안 인터넷 액세스 및 유지 관리 모드의 기본값을 true로 설정합니다.

Edit-WKSWorkspaceCreationProperty -Region us-west-2 -ResourceId d-123454a369 -WorkspaceCreationProperties_EnableInternetAccess $true -WorkspaceCreationProperties_EnableMaintenanceMode $true
Tools for PowerShell V5

예제 1: 이 샘플에서는 Workspace를 생성하는 동안 인터넷 액세스 및 유지 관리 모드의 기본값을 true로 설정합니다.

Edit-WKSWorkspaceCreationProperty -Region us-west-2 -ResourceId d-123454a369 -WorkspaceCreationProperties_EnableInternetAccess $true -WorkspaceCreationProperties_EnableMaintenanceMode $true