public void IdentityManagementServiceAttachRolePolicy()
        {
            #region 3e1b8c7c-99c8-4fc4-a20c-131fe3f22c7e

            var response = client.AttachRolePolicy(new AttachRolePolicyRequest
            {
                PolicyArn = "arn:aws:iam::aws:policy/ReadOnlyAccess",
                RoleName  = "ReadOnlyRole"
            });


            #endregion
        }
Beispiel #2
0
 private Amazon.IdentityManagement.Model.AttachRolePolicyResponse CallAWSServiceOperation(IAmazonIdentityManagementService client, Amazon.IdentityManagement.Model.AttachRolePolicyRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Identity and Access Management", "AttachRolePolicy");
     try
     {
         #if DESKTOP
         return(client.AttachRolePolicy(request));
         #elif CORECLR
         return(client.AttachRolePolicyAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }