deleteRolePolicy
inline suspend fun IamClient.deleteRolePolicy(crossinline block: DeleteRolePolicyRequest.Builder.() -> Unit): DeleteRolePolicyResponse
Deletes the specified inline policy that is embedded in the specified IAM role.
A role can also have managed policies attached to it. To detach a managed policy from a role, use DetachRolePolicy. For more information about policies, refer to Managed policies and inline policies in the IAM User Guide.
Samples
fun main() {
//sampleStart
// The following command removes the policy named ExamplePolicy from the role named Test Role.
iamClient.deleteRolePolicy {
roleName = "Test-Role"
policyName = "ExamplePolicy"
}
//sampleEnd
}