/
code_star.ex
273 lines (204 loc) · 7.85 KB
/
code_star.ex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.CodeStar do
@moduledoc """
AWS CodeStar
This is the API reference for AWS CodeStar.
This reference provides descriptions of the operations and data types for the
AWS CodeStar API along with usage examples.
You can use the AWS CodeStar API to work with:
Projects and their resources, by calling the following:
* `DeleteProject`, which deletes a project.
* `DescribeProject`, which lists the attributes of a project.
* `ListProjects`, which lists all projects associated with your AWS
account.
* `ListResources`, which lists the resources associated with a
project.
* `ListTagsForProject`, which lists the tags associated with a
project.
* `TagProject`, which adds tags to a project.
* `UntagProject`, which removes tags from a project.
* `UpdateProject`, which updates the attributes of a project.
Teams and team members, by calling the following:
* `AssociateTeamMember`, which adds an IAM user to the team for a
project.
* `DisassociateTeamMember`, which removes an IAM user from the team
for a project.
* `ListTeamMembers`, which lists all the IAM users in the team for a
project, including their roles and attributes.
* `UpdateTeamMember`, which updates a team member's attributes in a
project.
Users, by calling the following:
* `CreateUserProfile`, which creates a user profile that contains
data associated with the user across all projects.
* `DeleteUserProfile`, which deletes all user profile information
across all projects.
* `DescribeUserProfile`, which describes the profile of a user.
* `ListUserProfiles`, which lists all user profiles.
* `UpdateUserProfile`, which updates the profile for a user.
"""
alias AWS.Client
alias AWS.Request
def metadata do
%{
abbreviation: "CodeStar",
api_version: "2017-04-19",
content_type: "application/x-amz-json-1.1",
credential_scope: nil,
endpoint_prefix: "codestar",
global?: false,
protocol: "json",
service_id: "CodeStar",
signature_version: "v4",
signing_name: "codestar",
target_prefix: "CodeStar_20170419"
}
end
@doc """
Adds an IAM user to the team for an AWS CodeStar project.
"""
def associate_team_member(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "AssociateTeamMember", input, options)
end
@doc """
Creates a project, including project resources.
This action creates a project based on a submitted project request. A set of
source code files and a toolchain template file can be included with the project
request. If these are not provided, an empty project is created.
"""
def create_project(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "CreateProject", input, options)
end
@doc """
Creates a profile for a user that includes user preferences, such as the display
name and email address assocciated with the user, in AWS CodeStar.
The user profile is not project-specific. Information in the user profile is
displayed wherever the user's information appears to other users in AWS
CodeStar.
"""
def create_user_profile(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "CreateUserProfile", input, options)
end
@doc """
Deletes a project, including project resources.
Does not delete users associated with the project, but does delete the IAM roles
that allowed access to the project.
"""
def delete_project(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "DeleteProject", input, options)
end
@doc """
Deletes a user profile in AWS CodeStar, including all personal preference data
associated with that profile, such as display name and email address.
It does not delete the history of that user, for example the history of commits
made by that user.
"""
def delete_user_profile(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "DeleteUserProfile", input, options)
end
@doc """
Describes a project and its resources.
"""
def describe_project(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "DescribeProject", input, options)
end
@doc """
Describes a user in AWS CodeStar and the user attributes across all projects.
"""
def describe_user_profile(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "DescribeUserProfile", input, options)
end
@doc """
Removes a user from a project.
Removing a user from a project also removes the IAM policies from that user that
allowed access to the project and its resources. Disassociating a team member
does not remove that user's profile from AWS CodeStar. It does not remove the
user from IAM.
"""
def disassociate_team_member(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "DisassociateTeamMember", input, options)
end
@doc """
Lists all projects in AWS CodeStar associated with your AWS account.
"""
def list_projects(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "ListProjects", input, options)
end
@doc """
Lists resources associated with a project in AWS CodeStar.
"""
def list_resources(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "ListResources", input, options)
end
@doc """
Gets the tags for a project.
"""
def list_tags_for_project(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "ListTagsForProject", input, options)
end
@doc """
Lists all team members associated with a project.
"""
def list_team_members(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "ListTeamMembers", input, options)
end
@doc """
Lists all the user profiles configured for your AWS account in AWS CodeStar.
"""
def list_user_profiles(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "ListUserProfiles", input, options)
end
@doc """
Adds tags to a project.
"""
def tag_project(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "TagProject", input, options)
end
@doc """
Removes tags from a project.
"""
def untag_project(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "UntagProject", input, options)
end
@doc """
Updates a project in AWS CodeStar.
"""
def update_project(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "UpdateProject", input, options)
end
@doc """
Updates a team member's attributes in an AWS CodeStar project.
For example, you can change a team member's role in the project, or change
whether they have remote access to project resources.
"""
def update_team_member(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "UpdateTeamMember", input, options)
end
@doc """
Updates a user's profile in AWS CodeStar.
The user profile is not project-specific. Information in the user profile is
displayed wherever the user's information appears to other users in AWS
CodeStar.
"""
def update_user_profile(%Client{} = client, input, options \\ []) do
meta = metadata()
Request.request_post(client, meta, "UpdateUserProfile", input, options)
end
end