/// <summary>
        /// Delete the instance profile created for the sample.
        /// </summary>
        public static void DeleteInstance()
        {
            var roleName = Args.Value("Role");
            var client   = new AmazonIdentityManagementServiceClient();

            DeleteRolePolicy();
            RemoveRoleFromInstance();
            DeleteRole();
            client.DeleteInstanceProfile(new DeleteInstanceProfileRequest
            {
                InstanceProfileName = roleName
            });
        }
Beispiel #2
0
        public void IdentityManagementServiceDeleteInstanceProfile()
        {
            #region 12d74fb8-3433-49db-8171-a1fc764e354d

            var client   = new AmazonIdentityManagementServiceClient();
            var response = client.DeleteInstanceProfile(new DeleteInstanceProfileRequest
            {
                InstanceProfileName = "ExampleInstanceProfile"
            });


            #endregion
        }