Packages
aws
0.13.1
1.0.14
1.0.13
1.0.12
1.0.11
1.0.10
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.14.1
0.14.0
0.13.3
0.13.2
0.13.1
0.13.0
0.12.0
0.11.0
0.10.1
0.10.0
0.9.2
0.9.1
0.9.0
0.8.0
0.7.0
0.6.0
0.5.0
0.4.0
0.3.0
0.2.0
0.1.0
0.0.12
0.0.11
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
AWS clients for Elixir
Current section
Files
Jump to
Current section
Files
lib/aws/generated/serverless_application_repository.ex
# WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.ServerlessApplicationRepository do
@moduledoc """
The AWS Serverless Application Repository makes it easy for developers and
enterprises to quickly find
and deploy serverless applications in the AWS Cloud.
For more information about serverless applications,
see Serverless Computing and Applications on the AWS website.
The AWS Serverless Application Repository is deeply integrated with the AWS
Lambda console, so that developers of
all levels can get started with serverless computing without needing to learn
anything new. You can use category
keywords to browse for applications such as web and mobile backends, data
processing applications, or chatbots.
You can also search for applications by name, publisher, or event source. To use
an application, you simply choose it,
configure any required fields, and deploy it with a few clicks.
You can also easily publish applications, sharing them publicly with the
community at large, or privately
within your team or across your organization. To publish a serverless
application (or app), you can use the
AWS Management Console, AWS Command Line Interface (AWS CLI), or AWS SDKs to
upload the code. Along with the
code, you upload a simple manifest file, also known as the AWS Serverless
Application Model (AWS SAM) template.
For more information about AWS SAM, see AWS Serverless Application Model (AWS
SAM) on the AWS Labs
GitHub repository.
The AWS Serverless Application Repository Developer Guide contains more
information about the two developer
experiences available:
*
Consuming Applications – Browse for applications and view information about
them, including
source code and readme files. Also install, configure, and deploy applications
of your choosing.
Publishing Applications – Configure and upload applications to make them
available to other
developers, and publish new versions of applications.
"""
alias AWS.Client
alias AWS.Request
def metadata do
%{
abbreviation: nil,
api_version: "2017-09-08",
content_type: "application/x-amz-json-1.1",
credential_scope: nil,
endpoint_prefix: "serverlessrepo",
global?: false,
protocol: "rest-json",
service_id: "ServerlessApplicationRepository",
signature_version: "v4",
signing_name: "serverlessrepo",
target_prefix: nil
}
end
@doc """
Creates an application, optionally including an AWS SAM file to create the first
application version in the same call.
"""
def create_application(%Client{} = client, input, options \\ []) do
url_path = "/applications"
headers = []
query_params = []
meta = metadata()
Request.request_rest(
client,
meta,
:post,
url_path,
query_params,
headers,
input,
options,
201
)
end
@doc """
Creates an application version.
"""
def create_application_version(
%Client{} = client,
application_id,
semantic_version,
input,
options \\ []
) do
url_path =
"/applications/#{AWS.Util.encode_uri(application_id)}/versions/#{AWS.Util.encode_uri(semantic_version)}"
headers = []
query_params = []
meta = metadata()
Request.request_rest(client, meta, :put, url_path, query_params, headers, input, options, 201)
end
@doc """
Creates an AWS CloudFormation change set for the given application.
"""
def create_cloud_formation_change_set(%Client{} = client, application_id, input, options \\ []) do
url_path = "/applications/#{AWS.Util.encode_uri(application_id)}/changesets"
headers = []
query_params = []
meta = metadata()
Request.request_rest(
client,
meta,
:post,
url_path,
query_params,
headers,
input,
options,
201
)
end
@doc """
Creates an AWS CloudFormation template.
"""
def create_cloud_formation_template(%Client{} = client, application_id, input, options \\ []) do
url_path = "/applications/#{AWS.Util.encode_uri(application_id)}/templates"
headers = []
query_params = []
meta = metadata()
Request.request_rest(
client,
meta,
:post,
url_path,
query_params,
headers,
input,
options,
201
)
end
@doc """
Deletes the specified application.
"""
def delete_application(%Client{} = client, application_id, input, options \\ []) do
url_path = "/applications/#{AWS.Util.encode_uri(application_id)}"
headers = []
query_params = []
meta = metadata()
Request.request_rest(
client,
meta,
:delete,
url_path,
query_params,
headers,
input,
options,
204
)
end
@doc """
Gets the specified application.
"""
def get_application(%Client{} = client, application_id, semantic_version \\ nil, options \\ []) do
url_path = "/applications/#{AWS.Util.encode_uri(application_id)}"
headers = []
query_params = []
query_params =
if !is_nil(semantic_version) do
[{"semanticVersion", semantic_version} | query_params]
else
query_params
end
meta = metadata()
Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, 200)
end
@doc """
Retrieves the policy for the application.
"""
def get_application_policy(%Client{} = client, application_id, options \\ []) do
url_path = "/applications/#{AWS.Util.encode_uri(application_id)}/policy"
headers = []
query_params = []
meta = metadata()
Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, 200)
end
@doc """
Gets the specified AWS CloudFormation template.
"""
def get_cloud_formation_template(%Client{} = client, application_id, template_id, options \\ []) do
url_path =
"/applications/#{AWS.Util.encode_uri(application_id)}/templates/#{AWS.Util.encode_uri(template_id)}"
headers = []
query_params = []
meta = metadata()
Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, 200)
end
@doc """
Retrieves the list of applications nested in the containing application.
"""
def list_application_dependencies(
%Client{} = client,
application_id,
max_items \\ nil,
next_token \\ nil,
semantic_version \\ nil,
options \\ []
) do
url_path = "/applications/#{AWS.Util.encode_uri(application_id)}/dependencies"
headers = []
query_params = []
query_params =
if !is_nil(semantic_version) do
[{"semanticVersion", semantic_version} | query_params]
else
query_params
end
query_params =
if !is_nil(next_token) do
[{"nextToken", next_token} | query_params]
else
query_params
end
query_params =
if !is_nil(max_items) do
[{"maxItems", max_items} | query_params]
else
query_params
end
meta = metadata()
Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, 200)
end
@doc """
Lists versions for the specified application.
"""
def list_application_versions(
%Client{} = client,
application_id,
max_items \\ nil,
next_token \\ nil,
options \\ []
) do
url_path = "/applications/#{AWS.Util.encode_uri(application_id)}/versions"
headers = []
query_params = []
query_params =
if !is_nil(next_token) do
[{"nextToken", next_token} | query_params]
else
query_params
end
query_params =
if !is_nil(max_items) do
[{"maxItems", max_items} | query_params]
else
query_params
end
meta = metadata()
Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, 200)
end
@doc """
Lists applications owned by the requester.
"""
def list_applications(%Client{} = client, max_items \\ nil, next_token \\ nil, options \\ []) do
url_path = "/applications"
headers = []
query_params = []
query_params =
if !is_nil(next_token) do
[{"nextToken", next_token} | query_params]
else
query_params
end
query_params =
if !is_nil(max_items) do
[{"maxItems", max_items} | query_params]
else
query_params
end
meta = metadata()
Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, 200)
end
@doc """
Sets the permission policy for an application.
For the list of actions supported for this operation, see
[Application Permissions](https://docs.aws.amazon.com/serverlessrepo/latest/devguide/access-control-resource-based.html#application-permissions)
.
"""
def put_application_policy(%Client{} = client, application_id, input, options \\ []) do
url_path = "/applications/#{AWS.Util.encode_uri(application_id)}/policy"
headers = []
query_params = []
meta = metadata()
Request.request_rest(client, meta, :put, url_path, query_params, headers, input, options, 200)
end
@doc """
Unshares an application from an AWS Organization.
This operation can be called only from the organization's master account.
"""
def unshare_application(%Client{} = client, application_id, input, options \\ []) do
url_path = "/applications/#{AWS.Util.encode_uri(application_id)}/unshare"
headers = []
query_params = []
meta = metadata()
Request.request_rest(
client,
meta,
:post,
url_path,
query_params,
headers,
input,
options,
204
)
end
@doc """
Updates the specified application.
"""
def update_application(%Client{} = client, application_id, input, options \\ []) do
url_path = "/applications/#{AWS.Util.encode_uri(application_id)}"
headers = []
query_params = []
meta = metadata()
Request.request_rest(
client,
meta,
:patch,
url_path,
query_params,
headers,
input,
options,
200
)
end
end