靈活的工作室示例使用 AWS CLI - AWS Command Line Interface

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

靈活的工作室示例使用 AWS CLI

下列程式碼範例會示範如何使用 AWS Command Line Interface 搭配 Nimble Studio 來執行動作及實作常見案例。

Actions 是大型程式的程式碼摘錄,必須在內容中執行。雖然動作會告訴您如何呼叫個別服務函數,但您可以在其相關情境和跨服務範例中查看內容中的動作。

Scenarios (案例) 是向您展示如何呼叫相同服務中的多個函數來完成特定任務的程式碼範例。

每個範例都包含一個連結 GitHub,您可以在其中找到如何在內容中設定和執行程式碼的指示。

主題

動作

下列程式碼範例會示範如何使用get-eula

AWS CLI

獲取有關您的工作室的信息

下列get-eula範例會列出有關 EULA 的資訊。

aws nimble get-eula \ --eula-id "EULAid"

輸出:

{ "eula": { "content": "https://www.mozilla.org/en-US/MPL/2.0/", "createdAt": "2021-04-20T16:45:23+00:00", "eulaId": "gJZLygd-Srq_5NNbSfiaLg", "name": "Mozilla-FireFox", "updatedAt": "2021-04-20T16:45:23+00:00" } }

如需詳細資訊,請參閱 Amazon 靈活工作室使用者指南中的「接受使用者授權合約」。

  • 如需 API 詳細資訊,請參閱AWS CLI 命令參考GetEula中的。

下列程式碼範例會示範如何使用get-launch-profile-details

AWS CLI

列出可用的小器具

下列get-launch-profile-details範例會列出有關啟動設定檔的詳細資訊。

aws nimble get-launch-profile-details \ --studio-id "StudioID" \ --launch-profile-id "LaunchProfileID"

輸出:

{ "launchProfile": { "arn": "arn:aws:nimble:us-west-2:123456789012:launch-profile/yeG7lDwNQEiwNTRT7DrV7Q", "createdAt": "2022-01-27T21:18:59+00:00", "createdBy": "AROA3OO2NEHCCYRNDDIFT:i-EXAMPLE11111", "description": "The Launch Profile for the Render workers created by StudioBuilder.", "ec2SubnetIds": [ "subnet-EXAMPLE11111" ], "launchProfileId": "yeG7lDwNQEiwNTRT7DrV7Q", "launchProfileProtocolVersions": [ "2021-03-31" ], "name": "RenderWorker-Default", "state": "READY", "statusCode": "LAUNCH_PROFILE_CREATED", "statusMessage": "Launch Profile has been created", "streamConfiguration": { "clipboardMode": "ENABLED", "ec2InstanceTypes": [ "g4dn.4xlarge", "g4dn.8xlarge" ], "maxSessionLengthInMinutes": 690, "maxStoppedSessionLengthInMinutes": 0, "streamingImageIds": [ "Cw_jXnp1QcSSXhE2hkNRoQ", "YGXAqgoWTnCNSV8VP20sHQ" ] }, "studioComponentIds": [ "_hR_-RaAReSOjAnLakbX7Q", "vQ5w_TbIRayPkAZgcbyYRA", "ZQuMxN99Qfa_Js6ma9TwdA", "45KjOSPPRzK2OyvpCuQ6qw" ], "tags": { "resourceArn": "arn:aws:nimble:us-west-2:123456789012:launch-profile/yeG7lDwNQEiwNTRT7DrV7Q" }, "updatedAt": "2022-01-27T21:19:13+00:00", "updatedBy": "AROA3OO2NEHCCYRNDDIFT:i-00b98256b04d9e989", "validationResults": [ { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_ACTIVE_DIRECTORY_STUDIO_COMPONENT" }, { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_SUBNET_ASSOCIATION" }, { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_NETWORK_ACL_ASSOCIATION" }, { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_SECURITY_GROUP_ASSOCIATION" } ] }, "streamingImages": [ { "arn": "arn:aws:nimble:us-west-2:123456789012:streaming-image/Cw_jXnp1QcSSXhE2hkNRoQ", "description": "Base windows image for NimbleStudio", "ec2ImageId": "ami-EXAMPLE11111", "eulaIds": [ "gJZLygd-Srq_5NNbSfiaLg", "ggK2eIw6RQyt8PIeeOlD3g", "a-D9Wc0VQCKUfxAinCDxaw", "RvoNmVXiSrS4LhLTb6ybkw", "wtp85BcSTa2NZeNRnMKdjw", "Rl-J0fM5Sl2hyIiwWIV6hw" ], "name": "NimbleStudioWindowsStreamImage", "owner": "amazon", "platform": "WINDOWS", "state": "READY", "streamingImageId": "Cw_jXnp1QcSSXhE2hkNRoQ", "tags": { "resourceArn": "arn:aws:nimble:us-west-2:123456789012:streaming-image/Cw_jXnp1QcSSXhE2hkNRoQ" } }, { "arn": "arn:aws:nimble:us-west-2:123456789012:streaming-image/YGXAqgoWTnCNSV8VP20sHQ", "description": "Base linux image for NimbleStudio", "ec2ImageId": "ami-EXAMPLE11111", "eulaIds": [ "gJZLygd-Srq_5NNbSfiaLg", "ggK2eIw6RQyt8PIeeOlD3g", "a-D9Wc0VQCKUfxAinCDxaw", "RvoNmVXiSrS4LhLTb6ybkw", "wtp85BcSTa2NZeNRnMKdjw", "Rl-J0fM5Sl2hyIiwWIV6hw" ], "name": "NimbleStudioLinuxStreamImage", "owner": "amazon", "platform": "LINUX", "state": "READY", "streamingImageId": "YGXAqgoWTnCNSV8VP20sHQ", "tags": { "resourceArn": "arn:aws:nimble:us-west-2:123456789012:streaming-image/YGXAqgoWTnCNSV8VP20sHQ" } } ], "studioComponentSummaries": [ { "description": "FSx for Windows", "name": "FSxWindows", "studioComponentId": "ZQuMxN99Qfa_Js6ma9TwdA", "subtype": "AMAZON_FSX_FOR_WINDOWS", "type": "SHARED_FILE_SYSTEM" }, { "description": "Instance configuration studio component.", "name": "InstanceConfiguration", "studioComponentId": "vQ5w_TbIRayPkAZgcbyYRA", "subtype": "CUSTOM", "type": "CUSTOM" }, { "name": "ActiveDirectory", "studioComponentId": "_hR_-RaAReSOjAnLakbX7Q", "subtype": "AWS_MANAGED_MICROSOFT_AD", "type": "ACTIVE_DIRECTORY" }, { "description": "Render farm running Deadline", "name": "RenderFarm", "studioComponentId": "45KjOSPPRzK2OyvpCuQ6qw", "subtype": "CUSTOM", "type": "COMPUTE_FARM" } ] }

如需詳細資訊,請參閱 Amazon 敏捷工作室使用者指南中的建立啟動設定檔

下列程式碼範例會示範如何使用get-launch-profile

AWS CLI

列出可用的小器具

下列get-launch-profile範例會列出啟動設定檔的相關資訊。

aws nimble get-launch-profile \ --studio-id "StudioID" \ --launch-profile-id "LaunchProfileID"

輸出:

{ "launchProfile": { "arn": "arn:aws:nimble:us-west-2:123456789012:launch-profile/yeG7lDwNQEiwNTRT7DrV7Q", "createdAt": "2022-01-27T21:18:59+00:00", "createdBy": "AROA3OO2NEHCCYRNDDIFT:i-EXAMPLE11111", "description": "The Launch Profile for the Render workers created by StudioBuilder.", "ec2SubnetIds": [ "subnet-EXAMPLE11111" ], "launchProfileId": "yeG7lDwNQEiwNTRT7DrV7Q", "launchProfileProtocolVersions": [ "2021-03-31" ], "name": "RenderWorker-Default", "state": "READY", "statusCode": "LAUNCH_PROFILE_CREATED", "statusMessage": "Launch Profile has been created", "streamConfiguration": { "clipboardMode": "ENABLED", "ec2InstanceTypes": [ "g4dn.4xlarge", "g4dn.8xlarge" ], "maxSessionLengthInMinutes": 690, "maxStoppedSessionLengthInMinutes": 0, "streamingImageIds": [ "Cw_jXnp1QcSSXhE2hkNRoQ", "YGXAqgoWTnCNSV8VP20sHQ" ] }, "studioComponentIds": [ "_hR_-RaAReSOjAnLakbX7Q", "vQ5w_TbIRayPkAZgcbyYRA", "ZQuMxN99Qfa_Js6ma9TwdA", "45KjOSPPRzK2OyvpCuQ6qw" ], "tags": {}, "updatedAt": "2022-01-27T21:19:13+00:00", "updatedBy": "AROA3OO2NEHCCYRNDDIFT:i-00b98256b04d9e989", "validationResults": [ { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_ACTIVE_DIRECTORY_STUDIO_COMPONENT" }, { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_SUBNET_ASSOCIATION" }, { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_NETWORK_ACL_ASSOCIATION" }, { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_SECURITY_GROUP_ASSOCIATION" } ] } }

如需詳細資訊,請參閱 Amazon 敏捷工作室使用者指南中的建立啟動設定檔

  • 如需 API 詳細資訊,請參閱AWS CLI 命令參考GetLaunchProfile中的。

下列程式碼範例會示範如何使用get-studio

AWS CLI

獲取有關您的工作室的信息

下列get-studio範例會列出您 AWS 帳戶中的工作室。

aws nimble get-studio \ --studio-id "StudioID"

輸出:

{ "studio": { "adminRoleArn": "arn:aws:iam::123456789012:role/studio-admin-role", "arn": "arn:aws:nimble:us-west-2:123456789012:studio/stid-EXAMPLE11111", "createdAt": "2022-01-27T20:29:35+00:00", "displayName": "studio-name", "homeRegion": "us-west-2", "ssoClientId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "state": "READY", "statusCode": "STUDIO_CREATED", "statusMessage": "The studio has been created successfully ", "studioEncryptionConfiguration": { "keyType": "AWS_OWNED_KEY" }, "studioId": "us-west-2:stid-EXAMPLE11111", "studioName": "studio-name", "studioUrl": "https://studio-name.nimblestudio.us-west-2.amazonaws.com", "tags": {}, "updatedAt": "2022-01-27T20:29:37+00:00", "userRoleArn": "arn:aws:iam::123456789012:role/studio-user-role" } }

如需詳細資訊,請參閱什麼是 Amazon 敏捷工作室? 在 Amazon 靈活工作室用戶指南

  • 如需 API 詳細資訊,請參閱AWS CLI 命令參考GetStudio中的。

下列程式碼範例會示範如何使用list-eula-acceptances

AWS CLI

列出可用的小器具

下列list-eula-acceptances範例會列出您 AWS 帳戶中接受的 EULA。

aws nimble list-eula-acceptances \ --studio-id "StudioID"

輸出:

{ "eulaAcceptances": [ { "acceptedAt": "2022-01-28T17:44:35+00:00", "acceptedBy": "92677b4b19-e9fd012a-94ad-4f16-9866-c69a63ab6486", "accepteeId": "us-west-2:stid-nyoqq12fteqy1x48", "eulaAcceptanceId": "V0JlpZQaSx6yHcUuX0qfQw", "eulaId": "Rl-J0fM5Sl2hyIiwWIV6hw" }, { "acceptedAt": "2022-01-28T17:44:35+00:00", "acceptedBy": "92677b4b19-e9fd012a-94ad-4f16-9866-c69a63ab6486", "accepteeId": "us-west-2:stid-nyoqq12fteqy1x48", "eulaAcceptanceId": "YY_uDFW-SVibc627qbug0Q", "eulaId": "RvoNmVXiSrS4LhLTb6ybkw" }, { "acceptedAt": "2022-01-28T17:44:35+00:00", "acceptedBy": "92677b4b19-e9fd012a-94ad-4f16-9866-c69a63ab6486", "accepteeId": "us-west-2:stid-nyoqq12fteqy1x48", "eulaAcceptanceId": "ovO87PnhQ4-MpttiL5uN6Q", "eulaId": "a-D9Wc0VQCKUfxAinCDxaw" }, { "acceptedAt": "2022-01-28T17:44:35+00:00", "acceptedBy": "92677b4b19-e9fd012a-94ad-4f16-9866-c69a63ab6486", "accepteeId": "us-west-2:stid-nyoqq12fteqy1x48", "eulaAcceptanceId": "5YeXje4yROamuTESGvqIAQ", "eulaId": "gJZLygd-Srq_5NNbSfiaLg" }, { "acceptedAt": "2022-01-28T17:44:35+00:00", "acceptedBy": "92677b4b19-e9fd012a-94ad-4f16-9866-c69a63ab6486", "accepteeId": "us-west-2:stid-nyoqq12fteqy1x48", "eulaAcceptanceId": "W1sIn8PtScqeJEn8sxxhgw", "eulaId": "ggK2eIw6RQyt8PIeeOlD3g" }, { "acceptedAt": "2022-01-28T17:44:35+00:00", "acceptedBy": "92677b4b19-e9fd012a-94ad-4f16-9866-c69a63ab6486", "accepteeId": "us-west-2:stid-nyoqq12fteqy1x48", "eulaAcceptanceId": "Zq9KNEQPRMWJ7FolSoQgUA", "eulaId": "wtp85BcSTa2NZeNRnMKdjw" } ] }

如需詳細資訊,請參閱 Amazon 靈活工作室使用者指南中的「接受使用者授權合約」。

下列程式碼範例會示範如何使用list-eulas

AWS CLI

列出可用的小器具

下列list-eulas範例會列出您 AWS 帳戶中的 EULA。

aws nimble list-eulas

輸出:

{ "eulas": [ { "content": "https://www.mozilla.org/en-US/MPL/2.0/", "createdAt": "2021-04-20T16:45:23+00:00", "eulaId": "gJZLygd-Srq_5NNbSfiaLg", "name": "Mozilla-FireFox", "updatedAt": "2021-04-20T16:45:23+00:00" }, { "content": "https://www.awsthinkbox.com/end-user-license-agreement", "createdAt": "2021-04-20T16:45:24+00:00", "eulaId": "RvoNmVXiSrS4LhLTb6ybkw", "name": "Thinkbox-Deadline", "updatedAt": "2021-04-20T16:45:24+00:00" }, { "content": "https://www.videolan.org/legal.html", "createdAt": "2021-04-20T16:45:24+00:00", "eulaId": "Rl-J0fM5Sl2hyIiwWIV6hw", "name": "Videolan-VLC", "updatedAt": "2021-04-20T16:45:24+00:00" }, { "content": "https://code.visualstudio.com/license", "createdAt": "2021-04-20T16:45:23+00:00", "eulaId": "ggK2eIw6RQyt8PIeeOlD3g", "name": "Microsoft-VSCode", "updatedAt": "2021-04-20T16:45:23+00:00" }, { "content": "https://darbyjohnston.github.io/DJV/legal.html#License", "createdAt": "2021-04-20T16:45:23+00:00", "eulaId": "wtp85BcSTa2NZeNRnMKdjw", "name": "DJV-DJV", "updatedAt": "2021-04-20T16:45:23+00:00" }, { "content": "https://www.sidefx.com/legal/license-agreement/", "createdAt": "2021-04-20T16:45:24+00:00", "eulaId": "uu2VDLo-QJeIGWWLBae_UA", "name": "SideFX-Houdini", "updatedAt": "2021-04-20T16:45:24+00:00" }, { "content": "https://www.chaosgroup.com/eula", "createdAt": "2021-04-20T16:45:23+00:00", "eulaId": "L0HS4P3CRYKVXc2J2LO7Vw", "name": "ChaosGroup-Vray", "updatedAt": "2021-04-20T16:45:23+00:00" }, { "content": "https://www.foundry.com/eula", "createdAt": "2021-04-20T16:45:23+00:00", "eulaId": "SAuhfHmmSAeUuq3wsMiMlw", "name": "Foundry-Nuke", "updatedAt": "2021-04-20T16:45:23+00:00" }, { "content": "https://download.blender.org/release/GPL3-license.txt", "createdAt": "2021-04-20T16:45:23+00:00", "eulaId": "a-D9Wc0VQCKUfxAinCDxaw", "name": "BlenderFoundation-Blender", "updatedAt": "2021-04-20T16:45:23+00:00" } ] }

如需詳細資訊,請參閱 Amazon 靈活工作室使用者指南中的「接受使用者授權合約」。

  • 如需 API 詳細資訊,請參閱AWS CLI 命令參考ListEulas中的。

下列程式碼範例會示範如何使用list-launch-profiles

AWS CLI

列出可用的小器具

下列list-launch-profiles範例會列出您 AWS 帳戶中的啟動設定檔。

aws nimble list-launch-profiles \ --studio-id "StudioID"

輸出:

{ "launchProfiles": [ { "arn": "arn:aws:nimble:us-west-2:123456789012:launch-profile/yeG7lDwNQEiwNTRT7DrV7Q", "createdAt": "2022-01-27T21:18:59+00:00", "createdBy": "AROA3OO2NEHCCYRNDDIFT:i-EXAMPLE11111", "description": "The Launch Profile for the Render workers created by StudioBuilder.", "ec2SubnetIds": [ "subnet-EXAMPLE11111" ], "launchProfileId": "yeG7lDwNQEiwNTRT7DrV7Q", "launchProfileProtocolVersions": [ "2021-03-31" ], "name": "RenderWorker-Default", "state": "READY", "statusCode": "LAUNCH_PROFILE_CREATED", "statusMessage": "Launch Profile has been created", "streamConfiguration": { "clipboardMode": "ENABLED", "ec2InstanceTypes": [ "g4dn.4xlarge", "g4dn.8xlarge" ], "maxSessionLengthInMinutes": 690, "maxStoppedSessionLengthInMinutes": 0, "streamingImageIds": [ "Cw_jXnp1QcSSXhE2hkNRoQ", "YGXAqgoWTnCNSV8VP20sHQ" ] }, "studioComponentIds": [ "_hR_-RaAReSOjAnLakbX7Q", "vQ5w_TbIRayPkAZgcbyYRA", "ZQuMxN99Qfa_Js6ma9TwdA", "45KjOSPPRzK2OyvpCuQ6qw" ], "tags": {}, "updatedAt": "2022-01-27T21:19:13+00:00", "updatedBy": "AROA3OO2NEHCCYRNDDIFT:i-EXAMPLE11111", "validationResults": [ { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_ACTIVE_DIRECTORY_STUDIO_COMPONENT" }, { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_SUBNET_ASSOCIATION" }, { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_NETWORK_ACL_ASSOCIATION" }, { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_SECURITY_GROUP_ASSOCIATION" } ] }, { "arn": "arn:aws:nimble:us-west-2:123456789012:launch-profile/jDCIm1jRSaa9e44PZ3w7gg", "createdAt": "2022-01-27T21:19:26+00:00", "createdBy": "AROA3OO2NEHCCYRNDDIFT:i-EXAMPLE11111", "description": "This Workstation Launch Profile was created by StudioBuilder", "ec2SubnetIds": [ "subnet-046f4205ae535b2cc" ], "launchProfileId": "jDCIm1jRSaa9e44PZ3w7gg", "launchProfileProtocolVersions": [ "2021-03-31" ], "name": "Workstation-Default", "state": "READY", "statusCode": "LAUNCH_PROFILE_CREATED", "statusMessage": "Launch Profile has been created", "streamConfiguration": { "clipboardMode": "ENABLED", "ec2InstanceTypes": [ "g4dn.4xlarge", "g4dn.8xlarge" ], "maxSessionLengthInMinutes": 690, "maxStoppedSessionLengthInMinutes": 0, "streamingImageIds": [ "Cw_jXnp1QcSSXhE2hkNRoQ", "YGXAqgoWTnCNSV8VP20sHQ" ] }, "studioComponentIds": [ "_hR_-RaAReSOjAnLakbX7Q", "vQ5w_TbIRayPkAZgcbyYRA", "ZQuMxN99Qfa_Js6ma9TwdA", "yJSbsHXAQYWk9FXLNusXlQ", "45KjOSPPRzK2OyvpCuQ6qw" ], "tags": {}, "updatedAt": "2022-01-27T21:19:40+00:00", "updatedBy": "AROA3OO2NEHCCYRNDDIFT:i-EXAMPLE11111", "validationResults": [ { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_ACTIVE_DIRECTORY_STUDIO_COMPONENT" }, { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_SUBNET_ASSOCIATION" }, { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_NETWORK_ACL_ASSOCIATION" }, { "state": "VALIDATION_SUCCESS", "statusCode": "VALIDATION_SUCCESS", "statusMessage": "The validation succeeded.", "type": "VALIDATE_SECURITY_GROUP_ASSOCIATION" } ] } ] }

如需詳細資訊,請參閱 Amazon 敏捷工作室使用者指南中的建立啟動設定檔

下列程式碼範例會示範如何使用list-studio-components

AWS CLI

列出可用的小器具

下列list-studio-components範例會列出您 AWS 帳戶中的 Studio 元件。

aws nimble list-studio-components \ --studio-id "StudioID"

輸出:

{ "studioComponents": [ { "arn": "arn:aws:nimble:us-west-2:123456789012:studio-component/ZQuMxN99Qfa_Js6ma9TwdA", "configuration": { "sharedFileSystemConfiguration": { "fileSystemId": "fs-EXAMPLE11111", "linuxMountPoint": "/mnt/fsxshare", "shareName": "share", "windowsMountDrive": "Z" } }, "createdAt": "2022-01-27T21:15:34+00:00", "createdBy": "AROA3OO2NEHCCYRNDDIFT:i-EXAMPLE11111", "description": "FSx for Windows", "ec2SecurityGroupIds": [ "sg-EXAMPLE11111" ], "name": "FSxWindows", "state": "READY", "statusCode": "STUDIO_COMPONENT_CREATED", "statusMessage": "Studio Component has been created", "studioComponentId": "ZQuMxN99Qfa_Js6ma9TwdA", "subtype": "AMAZON_FSX_FOR_WINDOWS", "tags": {}, "type": "SHARED_FILE_SYSTEM", "updatedAt": "2022-01-27T21:15:35+00:00", "updatedBy": "AROA3OO2NEHCCYRNDDIFT:i-EXAMPLE11111" }, ... }

有關更多信息,請參閱 Amazon 敏捷 StudioBuilder 工作室用戶指南中的 Amazon 敏捷工作室如何使用

下列程式碼範例會示範如何使用list-studio-members

AWS CLI

列出可用的小器具

下列list-studio-members範例會列出您 AWS 帳戶中可用的工作室成員。

aws nimble list-studio-members \ --studio-id "StudioID"

輸出:

{ "members": [ { "identityStoreId": "d-EXAMPLE11111", "persona": "ADMINISTRATOR", "principalId": "EXAMPLE11111-e9fd012a-94ad-4f16-9866-c69a63ab6486" } ] }

如需詳細資訊,請參閱 Amazon 敏捷工作室使用者指南中的新增工作室使用者

下列程式碼範例會示範如何使用list-studios

AWS CLI

若要列出您的工作室

下列list-studios範例會列出您 AWS 帳戶中的工作室。

aws nimble list-studios

輸出:

{ "studios": [ { "adminRoleArn": "arn:aws:iam::123456789012:role/studio-admin-role", "arn": "arn:aws:nimble:us-west-2:123456789012:studio/studio-id", "createdAt": "2022-01-27T20:29:35+00:00", "displayName": "studio-name", "homeRegion": "us-west-2", "ssoClientId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "state": "READY", "statusCode": "STUDIO_CREATED", "statusMessage": "The studio has been created successfully ", "studioEncryptionConfiguration": { "keyType": "AWS_OWNED_KEY" }, "studioId": "us-west-2:studio-id", "studioName": "studio-name", "studioUrl": "https://studio-name.nimblestudio.us-west-2.amazonaws.com", "tags": {}, "updatedAt": "2022-01-27T20:29:37+00:00", "userRoleArn": "arn:aws:iam::123456789012:role/studio-user-role" } ] }

如需詳細資訊,請參閱什麼是 Amazon 敏捷工作室? 在 Amazon 靈活工作室用戶指南

  • 如需 API 詳細資訊,請參閱AWS CLI 命令參考ListStudios中的。