aws-sdk-php, IamClient - How to update policy json, the 'PolicyDocument'?

0

https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.Iam.IamClient.html


The "role" section makes sense to me.

There is createRole, getRole, deleteRole, and updateRole. Also, the getRole function returns the 'AssumeRolePolicyDocument', so I could compare it to what I want it to be and update it if necessary with the updateRole function.


The "policy" section seems to be missing functionality

There is createPolicy, getPolicy, and deletePolicy - but there is no updatePolicy?

When you run 'createPolicy', you pass in the 'PolicyDocument' as json. But the 'getPolicy' function does not return the 'PolicyDocument' so I can confirm it's correct. I don't see how to query this information. There also isn't a getPolicyDocument function.

And if I was able to get the PolicyDocument json, how would I update the Policy? Is there a function that I'm overlooking?

Or am I logically approaching this problem incorrectly?

질문됨 2년 전227회 조회
1개 답변
0
수락된 답변

I see, I need to manage through Policy Versions.

There is CreatePolicyVersion, DeletePolicyVersion, GetPolicyVersion, ListPolicyVersions, and SetDefaultPolicyVersion

This obviously covers it.

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠