AWS 문서 AWS SDK SDK 예제
기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
UpdateAssociation
OR와 함께 사용 AWS SDK CLI
다음 코드 예제는 UpdateAssociation
의 사용 방법을 보여 줍니다.
- CLI
-
- AWS CLI
-
예제 1: 문서 연결을 업데이트하는 방법
다음
update-association
예제에서는 새 문서 버전과의 연결을 업데이트합니다.aws ssm update-association \ --association-id
"8dfe3659-4309-493a-8755-0123456789ab"
\ --document-version"\$LATEST"
출력:
{ "AssociationDescription": { "Name": "AWS-UpdateSSMAgent", "AssociationVersion": "2", "Date": 1550508093.293, "LastUpdateAssociationDate": 1550508106.596, "Overview": { "Status": "Pending", "DetailedStatus": "Creating" }, "DocumentVersion": "$LATEST", "AssociationId": "8dfe3659-4309-493a-8755-0123456789ab", "Targets": [ { "Key": "tag:Name", "Values": [ "Linux" ] } ], "LastExecutionDate": 1550508094.879, "LastSuccessfulExecutionDate": 1550508094.879 } }
자세한 내용은 AWS Systems Manager 사용 설명서의 새 연결 버전 편집 및 생성을 참조하세요.
예제 2: 연결의 일정 표현식을 업데이트하는 방법
다음
update-association
예제에서는 지정된 연결의 일정 표현식을 업데이트합니다.aws ssm update-association \ --association-id
"8dfe3659-4309-493a-8755-0123456789ab"
\ --schedule-expression"cron(0 0 0/4 1/1 * ? *)"
출력:
{ "AssociationDescription": { "Name": "AWS-HelloWorld", "AssociationVersion": "2", "Date": "2021-02-08T13:54:19.203000-08:00", "LastUpdateAssociationDate": "2021-06-29T11:51:07.933000-07:00", "Overview": { "Status": "Pending", "DetailedStatus": "Creating" }, "DocumentVersion": "$DEFAULT", "AssociationId": "8dfe3659-4309-493a-8755-0123456789ab", "Targets": [ { "Key": "aws:NoOpAutomationTag", "Values": [ "AWS-NoOpAutomationTarget-Value" ] } ], "ScheduleExpression": "cron(0 0 0/4 1/1 * ? *)", "LastExecutionDate": "2021-06-26T19:00:48.110000-07:00", "ApplyOnlyAtCronInterval": false } }
자세한 내용은 AWS Systems Manager 사용 설명서의 새 연결 버전 편집 및 생성을 참조하세요.
-
자세한 API 내용은 AWS CLI 명령 UpdateAssociation
참조를 참조하십시오.
-
- PowerShell
-
- 에 대한 도구 PowerShell
-
예제 1: 이 예제에서는 연결을 새 문서 버전으로 업데이트합니다.
Update-SSMAssociation -AssociationId "93285663-92df-44cb-9f26-2292d4ecc439" -DocumentVersion "1"
출력:
Name : AWS-UpdateSSMAgent InstanceId : Date : 3/1/2017 6:22:21 PM Status.Name : Status.Date : Status.Message : Status.AdditionalInfo :
-
자세한 API 내용은 AWS Tools for PowerShell Cmdlet 참조를 참조하십시오 UpdateAssociation.
-
StopAutomationExecution
UpdateAssociationStatus