public void IdentityManagementServiceAttachUserPolicy() { #region 1372ebd8-9475-4b1a-a479-23b6fd4b8b3e var response = client.AttachUserPolicy(new AttachUserPolicyRequest { PolicyArn = "arn:aws:iam::aws:policy/AdministratorAccess", UserName = "******" }); #endregion }
private Amazon.IdentityManagement.Model.AttachUserPolicyResponse CallAWSServiceOperation(IAmazonIdentityManagementService client, Amazon.IdentityManagement.Model.AttachUserPolicyRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Identity and Access Management", "AttachUserPolicy"); try { #if DESKTOP return(client.AttachUserPolicy(request)); #elif CORECLR return(client.AttachUserPolicyAsync(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; } }