Skip to content

Commit 101da34

Browse files
committed
Removing old IAM examples.
1 parent 1d3e7c7 commit 101da34

File tree

10 files changed

+8
-451
lines changed

10 files changed

+8
-451
lines changed

.doc_gen/metadata/iam_metadata.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2662,18 +2662,6 @@ iam_DetachUserPolicy:
26622662
- ruby.iam.DetachUserPolicy
26632663
services:
26642664
iam: {DetachUserPolicy}
2665-
iam_PutGroupPolicy:
2666-
languages:
2667-
.NET:
2668-
versions:
2669-
- sdk_version: 3
2670-
github: dotnetv3/IAM
2671-
excerpts:
2672-
- description:
2673-
snippet_tags:
2674-
- IAM.dotnetv3.PutGroupPolicy
2675-
services:
2676-
iam: {PutGroupPolicy}
26772665
iam_PutUserPolicy:
26782666
languages:
26792667
Go:

dotnetv3/DotNetV3Examples.sln

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scenarios", "Scenarios", "{
219219
EndProject
220220
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IamScenariosCommon", "IAM\Scenarios\IamScenariosCommon\IamScenariosCommon.csproj", "{7A9C0470-3F46-4ABF-8C27-C481C900F0D7}"
221221
EndProject
222-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IAMGroups", "IAM\Scenarios\IAMGroups\IAMGroups.csproj", "{9903CF83-4346-4E05-B6D3-5D89D08A9AC9}"
223-
EndProject
224222
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IAMBasics", "IAM\Scenarios\IAMBasics\IAMBasics.csproj", "{65F86381-CA92-4257-9826-0CA369F9CEED}"
225223
EndProject
226224
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IAMActions", "IAM\Actions\IAMActions.csproj", "{566ACFAF-FDCB-4013-9C0D-4886869528DC}"
@@ -1093,10 +1091,6 @@ Global
10931091
{7A9C0470-3F46-4ABF-8C27-C481C900F0D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
10941092
{7A9C0470-3F46-4ABF-8C27-C481C900F0D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
10951093
{7A9C0470-3F46-4ABF-8C27-C481C900F0D7}.Release|Any CPU.Build.0 = Release|Any CPU
1096-
{9903CF83-4346-4E05-B6D3-5D89D08A9AC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1097-
{9903CF83-4346-4E05-B6D3-5D89D08A9AC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
1098-
{9903CF83-4346-4E05-B6D3-5D89D08A9AC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
1099-
{9903CF83-4346-4E05-B6D3-5D89D08A9AC9}.Release|Any CPU.Build.0 = Release|Any CPU
11001094
{65F86381-CA92-4257-9826-0CA369F9CEED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
11011095
{65F86381-CA92-4257-9826-0CA369F9CEED}.Debug|Any CPU.Build.0 = Debug|Any CPU
11021096
{65F86381-CA92-4257-9826-0CA369F9CEED}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -2032,7 +2026,6 @@ Global
20322026
{1F56F380-B3EF-490C-973B-A9ABA6054151} = {13BBCDD1-667E-4A15-9586-72746FE08716}
20332027
{098747DB-270D-4F9D-AECD-0F545F3F219B} = {13BBCDD1-667E-4A15-9586-72746FE08716}
20342028
{7A9C0470-3F46-4ABF-8C27-C481C900F0D7} = {098747DB-270D-4F9D-AECD-0F545F3F219B}
2035-
{9903CF83-4346-4E05-B6D3-5D89D08A9AC9} = {098747DB-270D-4F9D-AECD-0F545F3F219B}
20362029
{65F86381-CA92-4257-9826-0CA369F9CEED} = {098747DB-270D-4F9D-AECD-0F545F3F219B}
20372030
{566ACFAF-FDCB-4013-9C0D-4886869528DC} = {13BBCDD1-667E-4A15-9586-72746FE08716}
20382031
{0557715C-76F2-4B76-B223-E1ACEC252B35} = {7A6E328B-09BD-41D8-B64D-B30229B00C1B}

dotnetv3/IAM/Actions/IAMWrapper.cs

Lines changed: 0 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,6 @@ public IAMWrapper(IAmazonIdentityManagementService IAMService)
1919
_IAMService = IAMService;
2020
}
2121

22-
// snippet-start:[IAM.dotnetv3.AddUserToGroup]
23-
/// <summary>
24-
/// Add an existing IAM user to an existing IAM group.
25-
/// </summary>
26-
/// <param name="userName">The username of the user to add.</param>
27-
/// <param name="groupName">The name of the group to add the user to.</param>
28-
/// <returns>A Boolean value indicating the success of the action.</returns>
29-
public async Task<bool> AddUserToGroupAsync(string userName, string groupName)
30-
{
31-
var response = await _IAMService.AddUserToGroupAsync(new AddUserToGroupRequest
32-
{
33-
GroupName = groupName,
34-
UserName = userName,
35-
});
36-
37-
return response.HttpStatusCode == HttpStatusCode.OK;
38-
}
39-
40-
// snippet-end:[IAM.dotnetv3.AddUserToGroup]
41-
4222
// snippet-start:[IAM.dotnetv3.AttachRolePolicy]
4323
/// <summary>
4424
/// Attach an IAM policy to a role.
@@ -79,20 +59,6 @@ public async Task<AccessKey> CreateAccessKeyAsync(string userName)
7959

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

82-
// snippet-start:[IAM.dotnetv3.CreateGroup]
83-
/// <summary>
84-
/// Create an IAM group.
85-
/// </summary>
86-
/// <param name="groupName">The name to give the IAM group.</param>
87-
/// <returns>The IAM group that was created.</returns>
88-
public async Task<Group> CreateGroupAsync(string groupName)
89-
{
90-
var response = await _IAMService.CreateGroupAsync(new CreateGroupRequest { GroupName = groupName });
91-
return response.Group;
92-
}
93-
94-
// snippet-end:[IAM.dotnetv3.CreateGroup]
95-
9662
// snippet-start:[IAM.dotnetv3.CreatePolicy]
9763
/// <summary>
9864
/// Create an IAM policy.
@@ -191,42 +157,6 @@ public async Task<bool> DeleteAccessKeyAsync(string accessKeyId, string userName
191157

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

194-
// snippet-start:[IAM.dotnetv3.DeleteGroup]
195-
/// <summary>
196-
/// Delete an IAM group.
197-
/// </summary>
198-
/// <param name="groupName">The name of the IAM group to delete.</param>
199-
/// <returns>A Boolean value indicating the success of the action.</returns>
200-
public async Task<bool> DeleteGroupAsync(string groupName)
201-
{
202-
var response = await _IAMService.DeleteGroupAsync(new DeleteGroupRequest { GroupName = groupName });
203-
return response.HttpStatusCode == HttpStatusCode.OK;
204-
}
205-
206-
// snippet-end:[IAM.dotnetv3.DeleteGroup]
207-
208-
// snippet-start:[IAM.dotnetv3.DeleteGroupPolicy]
209-
/// <summary>
210-
/// Delete an IAM policy associated with an IAM group.
211-
/// </summary>
212-
/// <param name="groupName">The name of the IAM group associated with the
213-
/// policy.</param>
214-
/// <param name="policyName">The name of the policy to delete.</param>
215-
/// <returns>A Boolean value indicating the success of the action.</returns>
216-
public async Task<bool> DeleteGroupPolicyAsync(string groupName, string policyName)
217-
{
218-
var request = new DeleteGroupPolicyRequest()
219-
{
220-
GroupName = groupName,
221-
PolicyName = policyName,
222-
};
223-
224-
var response = await _IAMService.DeleteGroupPolicyAsync(request);
225-
return response.HttpStatusCode == System.Net.HttpStatusCode.OK;
226-
}
227-
228-
// snippet-end:[IAM.dotnetv3.DeleteGroupPolicy]
229-
230160
// snippet-start:[IAM.dotnetv3.DeletePolicy]
231161
/// <summary>
232162
/// Delete an IAM policy.
@@ -523,51 +453,6 @@ public async Task<List<User>> ListUsersAsync()
523453

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

526-
// snippet-start:[IAM.dotnetv3.RemoveUserFromGroup]
527-
/// <summary>
528-
/// Remove a user from an IAM group.
529-
/// </summary>
530-
/// <param name="userName">The username of the user to remove.</param>
531-
/// <param name="groupName">The name of the IAM group to remove the user from.</param>
532-
/// <returns>A Boolean value indicating the success of the action.</returns>
533-
public async Task<bool> RemoveUserFromGroupAsync(string userName, string groupName)
534-
{
535-
// Remove the user from the group.
536-
var removeUserRequest = new RemoveUserFromGroupRequest()
537-
{
538-
UserName = userName,
539-
GroupName = groupName,
540-
};
541-
542-
var response = await _IAMService.RemoveUserFromGroupAsync(removeUserRequest);
543-
return response.HttpStatusCode == HttpStatusCode.OK;
544-
}
545-
546-
// snippet-end:[IAM.dotnetv3.RemoveUserFromGroup]
547-
548-
// snippet-start:[IAM.dotnetv3.PutGroupPolicy]
549-
/// <summary>
550-
/// Add or update an inline policy document that is embedded in an IAM group.
551-
/// </summary>
552-
/// <param name="groupName">The name of the IAM group.</param>
553-
/// <param name="policyName">The name of the IAM policy.</param>
554-
/// <param name="policyDocument">The policy document defining the IAM policy.</param>
555-
/// <returns>A Boolean value indicating the success of the action.</returns>
556-
public async Task<bool> PutGroupPolicyAsync(string groupName, string policyName, string policyDocument)
557-
{
558-
var request = new PutGroupPolicyRequest
559-
{
560-
GroupName = groupName,
561-
PolicyName = policyName,
562-
PolicyDocument = policyDocument
563-
};
564-
565-
var response = await _IAMService.PutGroupPolicyAsync(request);
566-
return response.HttpStatusCode == System.Net.HttpStatusCode.OK;
567-
}
568-
569-
// snippet-end:[IAM.dotnetv3.PutGroupPolicy]
570-
571456
// snippet-start:[IAM.dotnetv3.PutRolePolicy]
572457
/// <summary>
573458
/// Update the inline policy document embedded in a role.

dotnetv3/IAM/IAMExamples.sln

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IAMBasics", "Scenarios\IAMB
1515
EndProject
1616
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IAMTests", "Tests\IAMTests.csproj", "{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88}"
1717
EndProject
18-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IAMGroups", "Scenarios\IAMGroups\IAMGroups.csproj", "{B2B9BC93-7C77-4B11-A435-F017D5940F76}"
19-
EndProject
20-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IamScenariosCommon", "Scenarios\IamScenariosCommon\IamScenariosCommon.csproj", "{E2A9A321-23AA-4F1F-B109-549A93222793}"
18+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IamScenariosCommon", "Scenarios\IamScenariosCommon\IamScenariosCommon.csproj", "{E2A9A321-23AA-4F1F-B109-549A93222793}"
2119
EndProject
2220
Global
2321
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -37,10 +35,6 @@ Global
3735
{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88}.Debug|Any CPU.Build.0 = Debug|Any CPU
3836
{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88}.Release|Any CPU.ActiveCfg = Release|Any CPU
3937
{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88}.Release|Any CPU.Build.0 = Release|Any CPU
40-
{B2B9BC93-7C77-4B11-A435-F017D5940F76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
41-
{B2B9BC93-7C77-4B11-A435-F017D5940F76}.Debug|Any CPU.Build.0 = Debug|Any CPU
42-
{B2B9BC93-7C77-4B11-A435-F017D5940F76}.Release|Any CPU.ActiveCfg = Release|Any CPU
43-
{B2B9BC93-7C77-4B11-A435-F017D5940F76}.Release|Any CPU.Build.0 = Release|Any CPU
4438
{E2A9A321-23AA-4F1F-B109-549A93222793}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4539
{E2A9A321-23AA-4F1F-B109-549A93222793}.Debug|Any CPU.Build.0 = Debug|Any CPU
4640
{E2A9A321-23AA-4F1F-B109-549A93222793}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -53,7 +47,6 @@ Global
5347
{796910FA-6E94-460B-8CB4-97DF01B9ADC8} = {7907FB6A-1353-4735-95DC-EEC5DF8C0649}
5448
{B1731AE1-381F-4044-BEBE-269FF7E24B1F} = {B987097B-189C-4D0B-99BC-E67CD705BCA0}
5549
{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88} = {5455D423-2AFC-4BC6-B79D-9DC4270D8F7D}
56-
{B2B9BC93-7C77-4B11-A435-F017D5940F76} = {B987097B-189C-4D0B-99BC-E67CD705BCA0}
5750
{E2A9A321-23AA-4F1F-B109-549A93222793} = {B987097B-189C-4D0B-99BC-E67CD705BCA0}
5851
EndGlobalSection
5952
GlobalSection(ExtensibilityGlobals) = postSolution
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"UserName": "iam-test-user",
3-
"S3PolicyName": "s3-list-buckets-policy",
4-
"RoleName": "test-temporary-role",
5-
"AssumePolicyName": "test-trust-user",
6-
"BucketName": "my-test-bucket",
7-
"GroupName": "test-group"
2+
"UserName": "iam-test-user23",
3+
"S3PolicyName": "s3-list-buckets-policy23",
4+
"RoleName": "test-temporary-role23",
5+
"AssumePolicyName": "test-trust-user23",
6+
"BucketName": "my-test-bucket23",
7+
"GroupName": "test-group23"
88
}

0 commit comments

Comments
 (0)