Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 0 additions & 94 deletions .doc_gen/metadata/iam_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2662,18 +2662,6 @@ iam_DetachUserPolicy:
- ruby.iam.DetachUserPolicy
services:
iam: {DetachUserPolicy}
iam_PutGroupPolicy:
languages:
.NET:
versions:
- sdk_version: 3
github: dotnetv3/IAM
excerpts:
- description:
snippet_tags:
- IAM.dotnetv3.PutGroupPolicy
services:
iam: {PutGroupPolicy}
iam_PutUserPolicy:
languages:
Go:
Expand Down Expand Up @@ -2972,15 +2960,6 @@ iam_DeleteServerCertificate:
iam: {DeleteServerCertificate}
iam_CreateGroup:
languages:
.NET:
versions:
- sdk_version: 3
github: dotnetv3/IAM
sdkguide:
excerpts:
- description:
snippet_tags:
- IAM.dotnetv3.CreateGroup
JavaScript:
versions:
- sdk_version: 3
Expand All @@ -2992,43 +2971,8 @@ iam_CreateGroup:
- javascript.v3.iam.actions.CreateGroup
services:
iam: {CreateGroup}
iam_AddUserToGroup:
languages:
.NET:
versions:
- sdk_version: 3
github: dotnetv3/IAM
sdkguide:
excerpts:
- description:
snippet_tags:
- IAM.dotnetv3.AddUserToGroup
services:
iam: {AddUserToGroup}
iam_RemoveUserFromGroup:
languages:
.NET:
versions:
- sdk_version: 3
github: dotnetv3/IAM
sdkguide:
excerpts:
- description:
snippet_tags:
- IAM.dotnetv3.RemoveUserFromGroup
services:
iam: {RemoveUserFromGroup}
iam_DeleteGroup:
languages:
.NET:
versions:
- sdk_version: 3
github: dotnetv3/IAM
sdkguide:
excerpts:
- description:
snippet_tags:
- IAM.dotnetv3.DeleteGroup
JavaScript:
versions:
- sdk_version: 3
Expand All @@ -3040,19 +2984,6 @@ iam_DeleteGroup:
- javascript.v3.iam.actions.DeleteGroup
services:
iam: {DeleteGroup}
iam_DeleteGroupPolicy:
languages:
.NET:
versions:
- sdk_version: 3
github: dotnetv3/IAM
sdkguide:
excerpts:
- description:
snippet_tags:
- IAM.dotnetv3.DeleteGroupPolicy
services:
iam: {DeleteGroupPolicy}
iam_ListGroups:
languages:
.NET:
Expand Down Expand Up @@ -3329,31 +3260,6 @@ iam_DeleteInstanceProfile:
- javascript.v3.wkflw.resilient.DeleteInstanceProfile
services:
iam: {DeleteInstanceProfile}
iam_Scenario_GroupBasics:
title: Create an &IAM; group and add a user to the group using an &AWS; SDK
title_abbrev: Create a group and add a user
synopsis_list:
- Create a group and grant full &S3; access permissions to it.
- Create a new user with no permissions to access &S3;.
- Add the user to the group and show that they now have permissions for &S3;, then clean up resources.
category: Scenarios
languages:
.NET:
versions:
- sdk_version: 3
github: dotnetv3/IAM
sdkguide:
excerpts:
- description:
snippet_tags:
- IAM.dotnetv3.IAMGroups.Usings
- IAM.dotnetv3.IAMWrapper
- IAM.dotnetv3.IAMGroups
- IAM.dotnetv3.IAMCommon.S3Wrapper
- IAM.dotnetv3.IAMCommon.UIWrapper
services:
iam: {AddUserToGroup, CreateGroup, CreateUser, CreateAccessKey, CreateRole, CreatePolicy, AttachRolePolicy, PutGroupPolicy,
DeleteGroup, DeleteGroupPolicy, DeleteAccessKey, DeleteUser, RemoveUserFromGroup}
iam_Scenario_CreateUserAssumeRole:
synopsis: create a user and assume a role. &aws_sec_sdk_use-federation-warning;
synopsis_list:
Expand Down
7 changes: 0 additions & 7 deletions dotnetv3/DotNetV3Examples.sln
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scenarios", "Scenarios", "{
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IamScenariosCommon", "IAM\Scenarios\IamScenariosCommon\IamScenariosCommon.csproj", "{7A9C0470-3F46-4ABF-8C27-C481C900F0D7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IAMGroups", "IAM\Scenarios\IAMGroups\IAMGroups.csproj", "{9903CF83-4346-4E05-B6D3-5D89D08A9AC9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IAMBasics", "IAM\Scenarios\IAMBasics\IAMBasics.csproj", "{65F86381-CA92-4257-9826-0CA369F9CEED}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IAMActions", "IAM\Actions\IAMActions.csproj", "{566ACFAF-FDCB-4013-9C0D-4886869528DC}"
Expand Down Expand Up @@ -1093,10 +1091,6 @@ Global
{7A9C0470-3F46-4ABF-8C27-C481C900F0D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A9C0470-3F46-4ABF-8C27-C481C900F0D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A9C0470-3F46-4ABF-8C27-C481C900F0D7}.Release|Any CPU.Build.0 = Release|Any CPU
{9903CF83-4346-4E05-B6D3-5D89D08A9AC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9903CF83-4346-4E05-B6D3-5D89D08A9AC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9903CF83-4346-4E05-B6D3-5D89D08A9AC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9903CF83-4346-4E05-B6D3-5D89D08A9AC9}.Release|Any CPU.Build.0 = Release|Any CPU
{65F86381-CA92-4257-9826-0CA369F9CEED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{65F86381-CA92-4257-9826-0CA369F9CEED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{65F86381-CA92-4257-9826-0CA369F9CEED}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -2032,7 +2026,6 @@ Global
{1F56F380-B3EF-490C-973B-A9ABA6054151} = {13BBCDD1-667E-4A15-9586-72746FE08716}
{098747DB-270D-4F9D-AECD-0F545F3F219B} = {13BBCDD1-667E-4A15-9586-72746FE08716}
{7A9C0470-3F46-4ABF-8C27-C481C900F0D7} = {098747DB-270D-4F9D-AECD-0F545F3F219B}
{9903CF83-4346-4E05-B6D3-5D89D08A9AC9} = {098747DB-270D-4F9D-AECD-0F545F3F219B}
{65F86381-CA92-4257-9826-0CA369F9CEED} = {098747DB-270D-4F9D-AECD-0F545F3F219B}
{566ACFAF-FDCB-4013-9C0D-4886869528DC} = {13BBCDD1-667E-4A15-9586-72746FE08716}
{0557715C-76F2-4B76-B223-E1ACEC252B35} = {7A6E328B-09BD-41D8-B64D-B30229B00C1B}
Expand Down
115 changes: 0 additions & 115 deletions dotnetv3/IAM/Actions/IAMWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@ public IAMWrapper(IAmazonIdentityManagementService IAMService)
_IAMService = IAMService;
}

// snippet-start:[IAM.dotnetv3.AddUserToGroup]
/// <summary>
/// Add an existing IAM user to an existing IAM group.
/// </summary>
/// <param name="userName">The username of the user to add.</param>
/// <param name="groupName">The name of the group to add the user to.</param>
/// <returns>A Boolean value indicating the success of the action.</returns>
public async Task<bool> AddUserToGroupAsync(string userName, string groupName)
{
var response = await _IAMService.AddUserToGroupAsync(new AddUserToGroupRequest
{
GroupName = groupName,
UserName = userName,
});

return response.HttpStatusCode == HttpStatusCode.OK;
}

// snippet-end:[IAM.dotnetv3.AddUserToGroup]

// snippet-start:[IAM.dotnetv3.AttachRolePolicy]
/// <summary>
/// Attach an IAM policy to a role.
Expand Down Expand Up @@ -79,20 +59,6 @@ public async Task<AccessKey> CreateAccessKeyAsync(string userName)

// snippet-end:[IAM.dotnetv3.CreateAccessKey]

// snippet-start:[IAM.dotnetv3.CreateGroup]
/// <summary>
/// Create an IAM group.
/// </summary>
/// <param name="groupName">The name to give the IAM group.</param>
/// <returns>The IAM group that was created.</returns>
public async Task<Group> CreateGroupAsync(string groupName)
{
var response = await _IAMService.CreateGroupAsync(new CreateGroupRequest { GroupName = groupName });
return response.Group;
}

// snippet-end:[IAM.dotnetv3.CreateGroup]

// snippet-start:[IAM.dotnetv3.CreatePolicy]
/// <summary>
/// Create an IAM policy.
Expand Down Expand Up @@ -191,42 +157,6 @@ public async Task<bool> DeleteAccessKeyAsync(string accessKeyId, string userName

// snippet-end:[IAM.dotnetv3.DeleteAccessKey]

// snippet-start:[IAM.dotnetv3.DeleteGroup]
/// <summary>
/// Delete an IAM group.
/// </summary>
/// <param name="groupName">The name of the IAM group to delete.</param>
/// <returns>A Boolean value indicating the success of the action.</returns>
public async Task<bool> DeleteGroupAsync(string groupName)
{
var response = await _IAMService.DeleteGroupAsync(new DeleteGroupRequest { GroupName = groupName });
return response.HttpStatusCode == HttpStatusCode.OK;
}

// snippet-end:[IAM.dotnetv3.DeleteGroup]

// snippet-start:[IAM.dotnetv3.DeleteGroupPolicy]
/// <summary>
/// Delete an IAM policy associated with an IAM group.
/// </summary>
/// <param name="groupName">The name of the IAM group associated with the
/// policy.</param>
/// <param name="policyName">The name of the policy to delete.</param>
/// <returns>A Boolean value indicating the success of the action.</returns>
public async Task<bool> DeleteGroupPolicyAsync(string groupName, string policyName)
{
var request = new DeleteGroupPolicyRequest()
{
GroupName = groupName,
PolicyName = policyName,
};

var response = await _IAMService.DeleteGroupPolicyAsync(request);
return response.HttpStatusCode == System.Net.HttpStatusCode.OK;
}

// snippet-end:[IAM.dotnetv3.DeleteGroupPolicy]

// snippet-start:[IAM.dotnetv3.DeletePolicy]
/// <summary>
/// Delete an IAM policy.
Expand Down Expand Up @@ -523,51 +453,6 @@ public async Task<List<User>> ListUsersAsync()

// snippet-end:[IAM.dotnetv3.ListUsers]

// snippet-start:[IAM.dotnetv3.RemoveUserFromGroup]
/// <summary>
/// Remove a user from an IAM group.
/// </summary>
/// <param name="userName">The username of the user to remove.</param>
/// <param name="groupName">The name of the IAM group to remove the user from.</param>
/// <returns>A Boolean value indicating the success of the action.</returns>
public async Task<bool> RemoveUserFromGroupAsync(string userName, string groupName)
{
// Remove the user from the group.
var removeUserRequest = new RemoveUserFromGroupRequest()
{
UserName = userName,
GroupName = groupName,
};

var response = await _IAMService.RemoveUserFromGroupAsync(removeUserRequest);
return response.HttpStatusCode == HttpStatusCode.OK;
}

// snippet-end:[IAM.dotnetv3.RemoveUserFromGroup]

// snippet-start:[IAM.dotnetv3.PutGroupPolicy]
/// <summary>
/// Add or update an inline policy document that is embedded in an IAM group.
/// </summary>
/// <param name="groupName">The name of the IAM group.</param>
/// <param name="policyName">The name of the IAM policy.</param>
/// <param name="policyDocument">The policy document defining the IAM policy.</param>
/// <returns>A Boolean value indicating the success of the action.</returns>
public async Task<bool> PutGroupPolicyAsync(string groupName, string policyName, string policyDocument)
{
var request = new PutGroupPolicyRequest
{
GroupName = groupName,
PolicyName = policyName,
PolicyDocument = policyDocument
};

var response = await _IAMService.PutGroupPolicyAsync(request);
return response.HttpStatusCode == System.Net.HttpStatusCode.OK;
}

// snippet-end:[IAM.dotnetv3.PutGroupPolicy]

// snippet-start:[IAM.dotnetv3.PutRolePolicy]
/// <summary>
/// Update the inline policy document embedded in a role.
Expand Down
9 changes: 1 addition & 8 deletions dotnetv3/IAM/IAMExamples.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IAMBasics", "Scenarios\IAMB
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IAMTests", "Tests\IAMTests.csproj", "{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IAMGroups", "Scenarios\IAMGroups\IAMGroups.csproj", "{B2B9BC93-7C77-4B11-A435-F017D5940F76}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IamScenariosCommon", "Scenarios\IamScenariosCommon\IamScenariosCommon.csproj", "{E2A9A321-23AA-4F1F-B109-549A93222793}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IamScenariosCommon", "Scenarios\IamScenariosCommon\IamScenariosCommon.csproj", "{E2A9A321-23AA-4F1F-B109-549A93222793}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -37,10 +35,6 @@ Global
{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88}.Release|Any CPU.Build.0 = Release|Any CPU
{B2B9BC93-7C77-4B11-A435-F017D5940F76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B2B9BC93-7C77-4B11-A435-F017D5940F76}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B2B9BC93-7C77-4B11-A435-F017D5940F76}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B2B9BC93-7C77-4B11-A435-F017D5940F76}.Release|Any CPU.Build.0 = Release|Any CPU
{E2A9A321-23AA-4F1F-B109-549A93222793}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E2A9A321-23AA-4F1F-B109-549A93222793}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2A9A321-23AA-4F1F-B109-549A93222793}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -53,7 +47,6 @@ Global
{796910FA-6E94-460B-8CB4-97DF01B9ADC8} = {7907FB6A-1353-4735-95DC-EEC5DF8C0649}
{B1731AE1-381F-4044-BEBE-269FF7E24B1F} = {B987097B-189C-4D0B-99BC-E67CD705BCA0}
{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88} = {5455D423-2AFC-4BC6-B79D-9DC4270D8F7D}
{B2B9BC93-7C77-4B11-A435-F017D5940F76} = {B987097B-189C-4D0B-99BC-E67CD705BCA0}
{E2A9A321-23AA-4F1F-B109-549A93222793} = {B987097B-189C-4D0B-99BC-E67CD705BCA0}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
Loading
Loading