Current section

Files

Jump to
aws lib aws generated finspace.ex
Raw

lib/aws/generated/finspace.ex

# WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.Finspace do
@moduledoc """
The FinSpace management service provides the APIs for managing FinSpace
environments.
"""
alias AWS.Client
alias AWS.Request
def metadata do
%AWS.ServiceMetadata{
abbreviation: nil,
api_version: "2021-03-12",
content_type: "application/x-amz-json-1.1",
credential_scope: nil,
endpoint_prefix: "finspace",
global?: false,
protocol: "rest-json",
service_id: "finspace",
signature_version: "v4",
signing_name: "finspace",
target_prefix: nil
}
end
@doc """
Create a new FinSpace environment.
"""
def create_environment(%Client{} = client, input, options \\ []) do
url_path = "/environment"
headers = []
query_params = []
Request.request_rest(
client,
metadata(),
:post,
url_path,
query_params,
headers,
input,
options,
nil
)
end
@doc """
Delete an FinSpace environment.
"""
def delete_environment(%Client{} = client, environment_id, input, options \\ []) do
url_path = "/environment/#{AWS.Util.encode_uri(environment_id)}"
headers = []
query_params = []
Request.request_rest(
client,
metadata(),
:delete,
url_path,
query_params,
headers,
input,
options,
nil
)
end
@doc """
Returns the FinSpace environment object.
"""
def get_environment(%Client{} = client, environment_id, options \\ []) do
url_path = "/environment/#{AWS.Util.encode_uri(environment_id)}"
headers = []
query_params = []
Request.request_rest(
client,
metadata(),
:get,
url_path,
query_params,
headers,
nil,
options,
nil
)
end
@doc """
A list of all of your FinSpace environments.
"""
def list_environments(%Client{} = client, max_results \\ nil, next_token \\ nil, options \\ []) do
url_path = "/environment"
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_results) do
[{"maxResults", max_results} | query_params]
else
query_params
end
Request.request_rest(
client,
metadata(),
:get,
url_path,
query_params,
headers,
nil,
options,
nil
)
end
@doc """
A list of all tags for a resource.
"""
def list_tags_for_resource(%Client{} = client, resource_arn, options \\ []) do
url_path = "/tags/#{AWS.Util.encode_uri(resource_arn)}"
headers = []
query_params = []
Request.request_rest(
client,
metadata(),
:get,
url_path,
query_params,
headers,
nil,
options,
nil
)
end
@doc """
Adds metadata tags to a FinSpace resource.
"""
def tag_resource(%Client{} = client, resource_arn, input, options \\ []) do
url_path = "/tags/#{AWS.Util.encode_uri(resource_arn)}"
headers = []
query_params = []
Request.request_rest(
client,
metadata(),
:post,
url_path,
query_params,
headers,
input,
options,
nil
)
end
@doc """
Removes metadata tags from a FinSpace resource.
"""
def untag_resource(%Client{} = client, resource_arn, input, options \\ []) do
url_path = "/tags/#{AWS.Util.encode_uri(resource_arn)}"
headers = []
{query_params, input} =
[
{"tagKeys", "tagKeys"}
]
|> Request.build_params(input)
Request.request_rest(
client,
metadata(),
:delete,
url_path,
query_params,
headers,
input,
options,
nil
)
end
@doc """
Update your FinSpace environment.
"""
def update_environment(%Client{} = client, environment_id, input, options \\ []) do
url_path = "/environment/#{AWS.Util.encode_uri(environment_id)}"
headers = []
query_params = []
Request.request_rest(
client,
metadata(),
:put,
url_path,
query_params,
headers,
input,
options,
nil
)
end
end