Packages
aws
0.14.0
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/amp.ex
# WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.
defmodule AWS.Amp do
@moduledoc """
Amazon Managed Service for Prometheus
"""
alias AWS.Client
alias AWS.Request
def metadata do
%{
abbreviation: nil,
api_version: "2020-08-01",
content_type: "application/x-amz-json-1.1",
credential_scope: nil,
endpoint_prefix: "aps",
global?: false,
protocol: "rest-json",
service_id: "amp",
signature_version: "v4",
signing_name: "aps",
target_prefix: nil
}
end
@doc """
Create an alert manager definition.
"""
def create_alert_manager_definition(%Client{} = client, workspace_id, input, options \\ []) do
url_path = "/workspaces/#{AWS.Util.encode_uri(workspace_id)}/alertmanager/definition"
headers = []
query_params = []
meta = metadata()
Request.request_rest(
client,
meta,
:post,
url_path,
query_params,
headers,
input,
options,
202
)
end
@doc """
Create logging configuration.
"""
def create_logging_configuration(%Client{} = client, workspace_id, input, options \\ []) do
url_path = "/workspaces/#{AWS.Util.encode_uri(workspace_id)}/logging"
headers = []
query_params = []
meta = metadata()
Request.request_rest(
client,
meta,
:post,
url_path,
query_params,
headers,
input,
options,
202
)
end
@doc """
Create a rule group namespace.
"""
def create_rule_groups_namespace(%Client{} = client, workspace_id, input, options \\ []) do
url_path = "/workspaces/#{AWS.Util.encode_uri(workspace_id)}/rulegroupsnamespaces"
headers = []
query_params = []
meta = metadata()
Request.request_rest(
client,
meta,
:post,
url_path,
query_params,
headers,
input,
options,
202
)
end
@doc """
Create a scraper.
"""
def create_scraper(%Client{} = client, input, options \\ []) do
url_path = "/scrapers"
headers = []
query_params = []
meta = metadata()
Request.request_rest(
client,
meta,
:post,
url_path,
query_params,
headers,
input,
options,
202
)
end
@doc """
Creates a new AMP workspace.
"""
def create_workspace(%Client{} = client, input, options \\ []) do
url_path = "/workspaces"
headers = []
query_params = []
meta = metadata()
Request.request_rest(
client,
meta,
:post,
url_path,
query_params,
headers,
input,
options,
202
)
end
@doc """
Deletes an alert manager definition.
"""
def delete_alert_manager_definition(%Client{} = client, workspace_id, input, options \\ []) do
url_path = "/workspaces/#{AWS.Util.encode_uri(workspace_id)}/alertmanager/definition"
headers = []
{query_params, input} =
[
{"clientToken", "clientToken"}
]
|> Request.build_params(input)
meta = metadata()
Request.request_rest(
client,
meta,
:delete,
url_path,
query_params,
headers,
input,
options,
202
)
end
@doc """
Delete logging configuration.
"""
def delete_logging_configuration(%Client{} = client, workspace_id, input, options \\ []) do
url_path = "/workspaces/#{AWS.Util.encode_uri(workspace_id)}/logging"
headers = []
{query_params, input} =
[
{"clientToken", "clientToken"}
]
|> Request.build_params(input)
meta = metadata()
Request.request_rest(
client,
meta,
:delete,
url_path,
query_params,
headers,
input,
options,
202
)
end
@doc """
Delete a rule groups namespace.
"""
def delete_rule_groups_namespace(%Client{} = client, name, workspace_id, input, options \\ []) do
url_path =
"/workspaces/#{AWS.Util.encode_uri(workspace_id)}/rulegroupsnamespaces/#{AWS.Util.encode_uri(name)}"
headers = []
{query_params, input} =
[
{"clientToken", "clientToken"}
]
|> Request.build_params(input)
meta = metadata()
Request.request_rest(
client,
meta,
:delete,
url_path,
query_params,
headers,
input,
options,
202
)
end
@doc """
Deletes a scraper.
"""
def delete_scraper(%Client{} = client, scraper_id, input, options \\ []) do
url_path = "/scrapers/#{AWS.Util.encode_uri(scraper_id)}"
headers = []
{query_params, input} =
[
{"clientToken", "clientToken"}
]
|> Request.build_params(input)
meta = metadata()
Request.request_rest(
client,
meta,
:delete,
url_path,
query_params,
headers,
input,
options,
202
)
end
@doc """
Deletes an AMP workspace.
"""
def delete_workspace(%Client{} = client, workspace_id, input, options \\ []) do
url_path = "/workspaces/#{AWS.Util.encode_uri(workspace_id)}"
headers = []
{query_params, input} =
[
{"clientToken", "clientToken"}
]
|> Request.build_params(input)
meta = metadata()
Request.request_rest(
client,
meta,
:delete,
url_path,
query_params,
headers,
input,
options,
202
)
end
@doc """
Describes an alert manager definition.
"""
def describe_alert_manager_definition(%Client{} = client, workspace_id, options \\ []) do
url_path = "/workspaces/#{AWS.Util.encode_uri(workspace_id)}/alertmanager/definition"
headers = []
query_params = []
meta = metadata()
Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, 200)
end
@doc """
Describes logging configuration.
"""
def describe_logging_configuration(%Client{} = client, workspace_id, options \\ []) do
url_path = "/workspaces/#{AWS.Util.encode_uri(workspace_id)}/logging"
headers = []
query_params = []
meta = metadata()
Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, 200)
end
@doc """
Describe a rule groups namespace.
"""
def describe_rule_groups_namespace(%Client{} = client, name, workspace_id, options \\ []) do
url_path =
"/workspaces/#{AWS.Util.encode_uri(workspace_id)}/rulegroupsnamespaces/#{AWS.Util.encode_uri(name)}"
headers = []
query_params = []
meta = metadata()
Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, 200)
end
@doc """
Describe an existing scraper.
"""
def describe_scraper(%Client{} = client, scraper_id, options \\ []) do
url_path = "/scrapers/#{AWS.Util.encode_uri(scraper_id)}"
headers = []
query_params = []
meta = metadata()
Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, 200)
end
@doc """
Describes an existing AMP workspace.
"""
def describe_workspace(%Client{} = client, workspace_id, options \\ []) do
url_path = "/workspaces/#{AWS.Util.encode_uri(workspace_id)}"
headers = []
query_params = []
meta = metadata()
Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, 200)
end
@doc """
Gets a default configuration.
"""
def get_default_scraper_configuration(%Client{} = client, options \\ []) do
url_path = "/scraperconfiguration"
headers = []
query_params = []
meta = metadata()
Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, 200)
end
@doc """
Lists rule groups namespaces.
"""
def list_rule_groups_namespaces(
%Client{} = client,
workspace_id,
max_results \\ nil,
name \\ nil,
next_token \\ nil,
options \\ []
) do
url_path = "/workspaces/#{AWS.Util.encode_uri(workspace_id)}/rulegroupsnamespaces"
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(name) do
[{"name", name} | query_params]
else
query_params
end
query_params =
if !is_nil(max_results) do
[{"maxResults", max_results} | 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 all scrapers in a customer account, including scrapers being created or
deleted.
You may provide filters to return a more specific list of results.
"""
def list_scrapers(
%Client{} = client,
filters \\ nil,
max_results \\ nil,
next_token \\ nil,
options \\ []
) do
url_path = "/scrapers"
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
query_params =
if !is_nil(filters) do
[{"", filters} | 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 the tags you have assigned to the resource.
"""
def list_tags_for_resource(%Client{} = client, resource_arn, options \\ []) do
url_path = "/tags/#{AWS.Util.encode_uri(resource_arn)}"
headers = []
query_params = []
meta = metadata()
Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, 200)
end
@doc """
Lists all AMP workspaces, including workspaces being created or deleted.
"""
def list_workspaces(
%Client{} = client,
alias \\ nil,
max_results \\ nil,
next_token \\ nil,
options \\ []
) do
url_path = "/workspaces"
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
query_params =
if !is_nil(alias) do
[{"alias", alias} | query_params]
else
query_params
end
meta = metadata()
Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, 200)
end
@doc """
Update an alert manager definition.
"""
def put_alert_manager_definition(%Client{} = client, workspace_id, input, options \\ []) do
url_path = "/workspaces/#{AWS.Util.encode_uri(workspace_id)}/alertmanager/definition"
headers = []
query_params = []
meta = metadata()
Request.request_rest(client, meta, :put, url_path, query_params, headers, input, options, 202)
end
@doc """
Update a rule groups namespace.
"""
def put_rule_groups_namespace(%Client{} = client, name, workspace_id, input, options \\ []) do
url_path =
"/workspaces/#{AWS.Util.encode_uri(workspace_id)}/rulegroupsnamespaces/#{AWS.Util.encode_uri(name)}"
headers = []
query_params = []
meta = metadata()
Request.request_rest(client, meta, :put, url_path, query_params, headers, input, options, 202)
end
@doc """
Creates tags for the specified resource.
"""
def tag_resource(%Client{} = client, resource_arn, input, options \\ []) do
url_path = "/tags/#{AWS.Util.encode_uri(resource_arn)}"
headers = []
query_params = []
meta = metadata()
Request.request_rest(
client,
meta,
:post,
url_path,
query_params,
headers,
input,
options,
200
)
end
@doc """
Deletes tags from the specified 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)
meta = metadata()
Request.request_rest(
client,
meta,
:delete,
url_path,
query_params,
headers,
input,
options,
200
)
end
@doc """
Update logging configuration.
"""
def update_logging_configuration(%Client{} = client, workspace_id, input, options \\ []) do
url_path = "/workspaces/#{AWS.Util.encode_uri(workspace_id)}/logging"
headers = []
query_params = []
meta = metadata()
Request.request_rest(client, meta, :put, url_path, query_params, headers, input, options, 202)
end
@doc """
Updates an AMP workspace alias.
"""
def update_workspace_alias(%Client{} = client, workspace_id, input, options \\ []) do
url_path = "/workspaces/#{AWS.Util.encode_uri(workspace_id)}/alias"
headers = []
query_params = []
meta = metadata()
Request.request_rest(
client,
meta,
:post,
url_path,
query_params,
headers,
input,
options,
204
)
end
end