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

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

CLI로 UpdateGroup 사용

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

CLI
AWS CLI

리소스 그룹의 설명 업데이트

다음 update-group 예시에서는 지정된 리소스 그룹의 설명을 업데이트합니다.

aws resource-groups update-group \ --group-name tbq-WebServer \ --description "Resource group for all web server resources."

출력:

{ "Group": { "GroupArn": "arn:aws:resource-groups:us-west-2:123456789012:group/tbq-WebServer", "Name": "tbq-WebServer" "Description": "Resource group for all web server resources." } }

자세한 내용은 AWS Resource Groups 사용자 안내서그룹 업데이트를 참조하세요.

  • API 세부 정보는 AWS CLI 명령 참조UpdateGroup을 참조하세요.

PowerShell
Tools for PowerShell V4

예제 1: 이 예제에서는 그룹의 설명을 업데이트합니다.

Update-RGGroup -GroupName auto-yes -Description "Instances auto-remove"

출력:

Description GroupArn Name ----------- -------- ---- Instances to be cleaned arn:aws:resource-groups:eu-west-1:123456789012:group/auto-yes auto-yes
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V4)의 UpdateGroup을 참조하세요.

Tools for PowerShell V5

예제 1: 이 예제에서는 그룹의 설명을 업데이트합니다.

Update-RGGroup -GroupName auto-yes -Description "Instances auto-remove"

출력:

Description GroupArn Name ----------- -------- ---- Instances to be cleaned arn:aws:resource-groups:eu-west-1:123456789012:group/auto-yes auto-yes
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V5)UpdateGroup을 참조하세요.