diff --git a/.latest-tag-aws-sdk-go b/.latest-tag-aws-sdk-go index aed8dd17..a262334c 100644 --- a/.latest-tag-aws-sdk-go +++ b/.latest-tag-aws-sdk-go @@ -1 +1 @@ -release-2024-11-15.2 +release-2024-11-18 diff --git a/src/aws_auto_scaling.erl b/src/aws_auto_scaling.erl index a1d36b61..81dae73c 100644 --- a/src/aws_auto_scaling.erl +++ b/src/aws_auto_scaling.erl @@ -391,6 +391,13 @@ %% } -type metric_granularity_type() :: #{binary() => any()}. +%% Example: +%% availability_zone_impairment_policy() :: #{ +%% <<"ImpairedZoneHealthCheckBehavior">> => list(any()), +%% <<"ZonalShiftEnabled">> => boolean() +%% } +-type availability_zone_impairment_policy() :: #{binary() => any()}. + %% Example: %% describe_warm_pool_type() :: #{ %% <<"AutoScalingGroupName">> := string(), @@ -951,6 +958,7 @@ %% Example: %% attach_traffic_sources_type() :: #{ %% <<"AutoScalingGroupName">> := string(), +%% <<"SkipZonalShiftValidation">> => boolean(), %% <<"TrafficSources">> := list(traffic_source_identifier()()) %% } -type attach_traffic_sources_type() :: #{binary() => any()}. @@ -1068,6 +1076,7 @@ %% create_auto_scaling_group_type() :: #{ %% <<"AutoScalingGroupName">> := string(), %% <<"AvailabilityZoneDistribution">> => availability_zone_distribution(), +%% <<"AvailabilityZoneImpairmentPolicy">> => availability_zone_impairment_policy(), %% <<"AvailabilityZones">> => list(string()()), %% <<"CapacityRebalance">> => boolean(), %% <<"Context">> => string(), @@ -1090,6 +1099,7 @@ %% <<"NewInstancesProtectedFromScaleIn">> => boolean(), %% <<"PlacementGroup">> => string(), %% <<"ServiceLinkedRoleARN">> => string(), +%% <<"SkipZonalShiftValidation">> => boolean(), %% <<"Tags">> => list(tag()()), %% <<"TargetGroupARNs">> => list(string()()), %% <<"TerminationPolicies">> => list(string()()), @@ -1359,6 +1369,7 @@ %% <<"Tags">> => list(tag_description()()), %% <<"CapacityRebalance">> => boolean(), %% <<"TrafficSources">> => list(traffic_source_identifier()()), +%% <<"AvailabilityZoneImpairmentPolicy">> => availability_zone_impairment_policy(), %% <<"InstanceMaintenancePolicy">> => instance_maintenance_policy(), %% <<"CreatedTime">> => non_neg_integer(), %% <<"DefaultCooldown">> => integer(), @@ -1431,6 +1442,7 @@ %% update_auto_scaling_group_type() :: #{ %% <<"AutoScalingGroupName">> := string(), %% <<"AvailabilityZoneDistribution">> => availability_zone_distribution(), +%% <<"AvailabilityZoneImpairmentPolicy">> => availability_zone_impairment_policy(), %% <<"AvailabilityZones">> => list(string()()), %% <<"CapacityRebalance">> => boolean(), %% <<"Context">> => string(), @@ -1450,6 +1462,7 @@ %% <<"NewInstancesProtectedFromScaleIn">> => boolean(), %% <<"PlacementGroup">> => string(), %% <<"ServiceLinkedRoleARN">> => string(), +%% <<"SkipZonalShiftValidation">> => boolean(), %% <<"TerminationPolicies">> => list(string()()), %% <<"VPCZoneIdentifier">> => string() %% } diff --git a/src/aws_cloudformation.erl b/src/aws_cloudformation.erl index 0c5f882d..ec97bd0a 100644 --- a/src/aws_cloudformation.erl +++ b/src/aws_cloudformation.erl @@ -130,6 +130,8 @@ list_exports/3, list_generated_templates/2, list_generated_templates/3, + list_hook_results/2, + list_hook_results/3, list_imports/2, list_imports/3, list_resource_scan_related_resources/2, @@ -610,6 +612,15 @@ %% } -type describe_stack_instance_input() :: #{binary() => any()}. +%% Example: +%% list_hook_results_output() :: #{ +%% <<"HookResults">> => list(hook_result_summary()()), +%% <<"NextToken">> => string(), +%% <<"TargetId">> => string(), +%% <<"TargetType">> => list(any()) +%% } +-type list_hook_results_output() :: #{binary() => any()}. + %% Example: %% invalid_operation_exception() :: #{ %% <<"Message">> => string() @@ -656,6 +667,12 @@ %% } -type list_stack_set_operation_results_input() :: #{binary() => any()}. +%% Example: +%% hook_result_not_found_exception() :: #{ +%% <<"Message">> => string() +%% } +-type hook_result_not_found_exception() :: #{binary() => any()}. + %% Example: %% detect_stack_resource_drift_input() :: #{ %% <<"LogicalResourceId">> := string(), @@ -1096,6 +1113,14 @@ %% } -type stack_summary() :: #{binary() => any()}. +%% Example: +%% list_hook_results_input() :: #{ +%% <<"NextToken">> => string(), +%% <<"TargetId">> := string(), +%% <<"TargetType">> := list(any()) +%% } +-type list_hook_results_input() :: #{binary() => any()}. + %% Example: %% tag() :: #{ %% <<"Key">> => string(), @@ -1930,6 +1955,18 @@ %% } -type describe_resource_scan_input() :: #{binary() => any()}. +%% Example: +%% hook_result_summary() :: #{ +%% <<"FailureMode">> => list(any()), +%% <<"HookStatusReason">> => string(), +%% <<"InvocationPoint">> => list(any()), +%% <<"Status">> => list(any()), +%% <<"TypeConfigurationVersionId">> => string(), +%% <<"TypeName">> => string(), +%% <<"TypeVersionId">> => string() +%% } +-type hook_result_summary() :: #{binary() => any()}. + %% Example: %% resource_change_detail() :: #{ %% <<"CausingEntity">> => string(), @@ -2632,6 +2669,9 @@ invalid_operation_exception() | stale_request_exception(). +-type list_hook_results_errors() :: + hook_result_not_found_exception(). + -type list_resource_scan_related_resources_errors() :: resource_scan_in_progress_exception() | resource_scan_not_found_exception(). @@ -4078,6 +4118,24 @@ list_generated_templates(Client, Input, Options) when is_map(Client), is_map(Input), is_list(Options) -> request(Client, <<"ListGeneratedTemplates">>, Input, Options). +%% @doc Returns summaries of invoked Hooks when a change set or Cloud Control +%% API operation target is provided. +-spec list_hook_results(aws_client:aws_client(), list_hook_results_input()) -> + {ok, list_hook_results_output(), tuple()} | + {error, any()} | + {error, list_hook_results_errors(), tuple()}. +list_hook_results(Client, Input) + when is_map(Client), is_map(Input) -> + list_hook_results(Client, Input, []). + +-spec list_hook_results(aws_client:aws_client(), list_hook_results_input(), proplists:proplist()) -> + {ok, list_hook_results_output(), tuple()} | + {error, any()} | + {error, list_hook_results_errors(), tuple()}. +list_hook_results(Client, Input, Options) + when is_map(Client), is_map(Input), is_list(Options) -> + request(Client, <<"ListHookResults">>, Input, Options). + %% @doc Lists all stacks that are importing an exported output value. %% %% To modify or remove an diff --git a/src/aws_connect.erl b/src/aws_connect.erl index 596f715d..168671ce 100644 --- a/src/aws_connect.erl +++ b/src/aws_connect.erl @@ -86,6 +86,8 @@ create_contact_flow/4, create_contact_flow_module/3, create_contact_flow_module/4, + create_contact_flow_version/4, + create_contact_flow_version/5, create_evaluation_form/3, create_evaluation_form/4, create_hours_of_operation/3, @@ -331,6 +333,9 @@ list_contact_flow_modules/2, list_contact_flow_modules/4, list_contact_flow_modules/5, + list_contact_flow_versions/3, + list_contact_flow_versions/5, + list_contact_flow_versions/6, list_contact_flows/2, list_contact_flows/4, list_contact_flows/5, @@ -1654,6 +1659,15 @@ -type tag_condition() :: #{binary() => any()}. +%% Example: +%% contact_flow_version_summary() :: #{ +%% <<"Arn">> => string(), +%% <<"Version">> => float(), +%% <<"VersionDescription">> => string() +%% } +-type contact_flow_version_summary() :: #{binary() => any()}. + + %% Example: %% view() :: #{ %% <<"Arn">> => string(), @@ -1673,6 +1687,14 @@ -type view() :: #{binary() => any()}. +%% Example: +%% list_contact_flow_versions_request() :: #{ +%% <<"MaxResults">> => integer(), +%% <<"NextToken">> => string() +%% } +-type list_contact_flow_versions_request() :: #{binary() => any()}. + + %% Example: %% describe_queue_response() :: #{ %% <<"Queue">> => queue() @@ -3471,6 +3493,14 @@ -type list_phone_numbers_request() :: #{binary() => any()}. +%% Example: +%% create_contact_flow_version_response() :: #{ +%% <<"ContactFlowArn">> => string(), +%% <<"Version">> => float() +%% } +-type create_contact_flow_version_response() :: #{binary() => any()}. + + %% Example: %% get_metric_data_request() :: #{ %% <<"EndTime">> := non_neg_integer(), @@ -4774,6 +4804,14 @@ %% delete_traffic_distribution_group_request() :: #{} -type delete_traffic_distribution_group_request() :: #{}. + +%% Example: +%% list_contact_flow_versions_response() :: #{ +%% <<"ContactFlowVersionSummaryList">> => list(contact_flow_version_summary()()), +%% <<"NextToken">> => string() +%% } +-type list_contact_flow_versions_response() :: #{binary() => any()}. + %% Example: %% describe_rule_request() :: #{} -type describe_rule_request() :: #{}. @@ -5464,12 +5502,18 @@ %% <<"Arn">> => string(), %% <<"Content">> => string(), %% <<"Description">> => string(), +%% <<"FlowContentSha256">> => string(), %% <<"Id">> => string(), +%% <<"IsDefault">> => boolean(), +%% <<"LastModifiedRegion">> => string(), +%% <<"LastModifiedTime">> => non_neg_integer(), %% <<"Name">> => string(), %% <<"State">> => list(any()), %% <<"Status">> => list(any()), %% <<"Tags">> => map(), -%% <<"Type">> => list(any()) +%% <<"Type">> => list(any()), +%% <<"Version">> => float(), +%% <<"VersionDescription">> => string() %% } -type contact_flow() :: #{binary() => any()}. @@ -5879,6 +5923,16 @@ -type threshold() :: #{binary() => any()}. +%% Example: +%% create_contact_flow_version_request() :: #{ +%% <<"Description">> => string(), +%% <<"FlowContentSha256">> => string(), +%% <<"LastModifiedRegion">> => string(), +%% <<"LastModifiedTime">> => non_neg_integer() +%% } +-type create_contact_flow_version_request() :: #{binary() => any()}. + + %% Example: %% start_outbound_voice_contact_request() :: #{ %% <<"AnswerMachineDetectionConfig">> => answer_machine_detection_config(), @@ -7007,7 +7061,8 @@ %% Example: %% create_contact_flow_response() :: #{ %% <<"ContactFlowArn">> => string(), -%% <<"ContactFlowId">> => string() +%% <<"ContactFlowId">> => string(), +%% <<"FlowContentSha256">> => string() %% } -type create_contact_flow_response() :: #{binary() => any()}. @@ -7356,6 +7411,15 @@ resource_not_found_exception() | internal_service_exception(). +-type create_contact_flow_version_errors() :: + limit_exceeded_exception() | + throttling_exception() | + invalid_parameter_exception() | + access_denied_exception() | + invalid_request_exception() | + resource_not_found_exception() | + internal_service_exception(). + -type create_evaluation_form_errors() :: resource_conflict_exception() | throttling_exception() | @@ -8121,6 +8185,14 @@ resource_not_found_exception() | internal_service_exception(). +-type list_contact_flow_versions_errors() :: + throttling_exception() | + invalid_parameter_exception() | + access_denied_exception() | + invalid_request_exception() | + resource_not_found_exception() | + internal_service_exception(). + -type list_contact_flows_errors() :: throttling_exception() | invalid_parameter_exception() | @@ -9574,9 +9646,8 @@ associate_security_key(Client, InstanceId, Input0, Options0) -> %% @doc Associates an agent with a traffic distribution group. %% -%% This API can be called only in the Region where the traffic distribution -%% group is -%% created. +%% This API can be called only in the +%% Region where the traffic distribution group is created. -spec associate_traffic_distribution_group_user(aws_client:aws_client(), binary() | list(), associate_traffic_distribution_group_user_request()) -> {ok, associate_traffic_distribution_group_user_response(), tuple()} | {error, any()} | @@ -10069,6 +10140,51 @@ create_contact_flow_module(Client, InstanceId, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Publishes a new version of the flow provided. +%% +%% Versions are immutable and monotonically +%% increasing. If a version of the same flow content already exists, no new +%% version is created and +%% instead the existing version number is returned. If the +%% `FlowContentSha256' provided +%% is different from the `FlowContentSha256' of the `$LATEST' +%% published flow +%% content, then an error is returned. This API only supports creating +%% versions for flows of type +%% `Campaign'. +-spec create_contact_flow_version(aws_client:aws_client(), binary() | list(), binary() | list(), create_contact_flow_version_request()) -> + {ok, create_contact_flow_version_response(), tuple()} | + {error, any()} | + {error, create_contact_flow_version_errors(), tuple()}. +create_contact_flow_version(Client, ContactFlowId, InstanceId, Input) -> + create_contact_flow_version(Client, ContactFlowId, InstanceId, Input, []). + +-spec create_contact_flow_version(aws_client:aws_client(), binary() | list(), binary() | list(), create_contact_flow_version_request(), proplists:proplist()) -> + {ok, create_contact_flow_version_response(), tuple()} | + {error, any()} | + {error, create_contact_flow_version_errors(), tuple()}. +create_contact_flow_version(Client, ContactFlowId, InstanceId, Input0, Options0) -> + Method = put, + Path = ["/contact-flows/", aws_util:encode_uri(InstanceId), "/", aws_util:encode_uri(ContactFlowId), "/version"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Creates an evaluation form in the specified Amazon Connect instance. %% %% The form can be @@ -13351,9 +13467,8 @@ disassociate_security_key(Client, AssociationId, InstanceId, Input0, Options0) - %% @doc Disassociates an agent from a traffic distribution group. %% -%% This API can be called only in the Region where the traffic distribution -%% group is -%% created. +%% This API can be called only in the +%% Region where the traffic distribution group is created. -spec disassociate_traffic_distribution_group_user(aws_client:aws_client(), binary() | list(), disassociate_traffic_distribution_group_user_request()) -> {ok, disassociate_traffic_distribution_group_user_response(), tuple()} | {error, any()} | @@ -14331,6 +14446,50 @@ list_contact_flow_modules(Client, InstanceId, QueryMap, HeadersMap, Options0) request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). +%% @doc Returns all the available versions for the specified Amazon Connect +%% instance and flow +%% identifier. +-spec list_contact_flow_versions(aws_client:aws_client(), binary() | list(), binary() | list()) -> + {ok, list_contact_flow_versions_response(), tuple()} | + {error, any()} | + {error, list_contact_flow_versions_errors(), tuple()}. +list_contact_flow_versions(Client, ContactFlowId, InstanceId) + when is_map(Client) -> + list_contact_flow_versions(Client, ContactFlowId, InstanceId, #{}, #{}). + +-spec list_contact_flow_versions(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> + {ok, list_contact_flow_versions_response(), tuple()} | + {error, any()} | + {error, list_contact_flow_versions_errors(), tuple()}. +list_contact_flow_versions(Client, ContactFlowId, InstanceId, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + list_contact_flow_versions(Client, ContactFlowId, InstanceId, QueryMap, HeadersMap, []). + +-spec list_contact_flow_versions(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, list_contact_flow_versions_response(), tuple()} | + {error, any()} | + {error, list_contact_flow_versions_errors(), tuple()}. +list_contact_flow_versions(Client, ContactFlowId, InstanceId, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/contact-flows/", aws_util:encode_uri(InstanceId), "/", aws_util:encode_uri(ContactFlowId), "/versions"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query0_ = + [ + {<<"maxResults">>, maps:get(<<"maxResults">>, QueryMap, undefined)}, + {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)} + ], + Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + %% @doc Provides information about the flows for the specified Amazon Connect %% instance. %% @@ -17456,7 +17615,8 @@ start_outbound_voice_contact(Client, Input0, Options0) -> %% For more information about screen sharing, see Set up in-app, web, %% video calling, and screen sharing capabilities: %% https://docs.aws.amazon.com/connect/latest/adminguide/inapp-calling.html -%% in the Amazon Connect Administrator Guide. +%% in the Amazon Connect Administrator +%% Guide. -spec start_screen_sharing(aws_client:aws_client(), start_screen_sharing_request()) -> {ok, start_screen_sharing_response(), tuple()} | {error, any()} | diff --git a/src/aws_customer_profiles.erl b/src/aws_customer_profiles.erl index cac95257..484199db 100644 --- a/src/aws_customer_profiles.erl +++ b/src/aws_customer_profiles.erl @@ -27,6 +27,10 @@ -export([add_profile_key/3, add_profile_key/4, + batch_get_calculated_attribute_for_profile/4, + batch_get_calculated_attribute_for_profile/5, + batch_get_profile/3, + batch_get_profile/4, create_calculated_attribute_definition/4, create_calculated_attribute_definition/5, create_domain/3, @@ -37,6 +41,12 @@ create_integration_workflow/4, create_profile/3, create_profile/4, + create_segment_definition/4, + create_segment_definition/5, + create_segment_estimate/3, + create_segment_estimate/4, + create_segment_snapshot/4, + create_segment_snapshot/5, delete_calculated_attribute_definition/4, delete_calculated_attribute_definition/5, delete_domain/3, @@ -53,6 +63,8 @@ delete_profile_object/4, delete_profile_object_type/4, delete_profile_object_type/5, + delete_segment_definition/4, + delete_segment_definition/5, delete_workflow/4, delete_workflow/5, detect_profile_object_type/3, @@ -85,6 +97,17 @@ get_profile_object_type_template/2, get_profile_object_type_template/4, get_profile_object_type_template/5, + get_segment_definition/3, + get_segment_definition/5, + get_segment_definition/6, + get_segment_estimate/3, + get_segment_estimate/5, + get_segment_estimate/6, + get_segment_membership/4, + get_segment_membership/5, + get_segment_snapshot/4, + get_segment_snapshot/6, + get_segment_snapshot/7, get_similar_profiles/3, get_similar_profiles/4, get_workflow/3, @@ -113,6 +136,12 @@ list_integrations/2, list_integrations/4, list_integrations/5, + list_object_type_attributes/3, + list_object_type_attributes/5, + list_object_type_attributes/6, + list_profile_attribute_values/3, + list_profile_attribute_values/5, + list_profile_attribute_values/6, list_profile_object_type_templates/1, list_profile_object_type_templates/3, list_profile_object_type_templates/4, @@ -124,6 +153,9 @@ list_rule_based_matches/2, list_rule_based_matches/4, list_rule_based_matches/5, + list_segment_definitions/2, + list_segment_definitions/4, + list_segment_definitions/5, list_tags_for_resource/2, list_tags_for_resource/4, list_tags_for_resource/5, @@ -215,6 +247,13 @@ -type auto_merging() :: #{binary() => any()}. +%% Example: +%% create_segment_estimate_request() :: #{ +%% <<"SegmentQuery">> := segment_group_structure() +%% } +-type create_segment_estimate_request() :: #{binary() => any()}. + + %% Example: %% create_calculated_attribute_definition_response() :: #{ %% <<"AttributeDetails">> => attribute_details(), @@ -223,6 +262,7 @@ %% <<"CreatedAt">> => non_neg_integer(), %% <<"Description">> => string(), %% <<"DisplayName">> => string(), +%% <<"Filter">> => filter(), %% <<"LastUpdatedAt">> => non_neg_integer(), %% <<"Statistic">> => list(any()), %% <<"Tags">> => map() @@ -234,6 +274,16 @@ -type get_domain_request() :: #{}. +%% Example: +%% create_segment_snapshot_request() :: #{ +%% <<"DataFormat">> := list(any()), +%% <<"DestinationUri">> => string(), +%% <<"EncryptionKey">> => string(), +%% <<"RoleArn">> => string() +%% } +-type create_segment_snapshot_request() :: #{binary() => any()}. + + %% Example: %% put_profile_object_type_response() :: #{ %% <<"AllowProfileCreation">> => boolean(), @@ -254,6 +304,14 @@ -type put_profile_object_type_response() :: #{binary() => any()}. +%% Example: +%% date_dimension() :: #{ +%% <<"DimensionType">> => list(any()), +%% <<"Values">> => list([string()]()) +%% } +-type date_dimension() :: #{binary() => any()}. + + %% Example: %% delete_domain_response() :: #{ %% <<"Message">> => string() @@ -334,6 +392,15 @@ -type range() :: #{binary() => any()}. +%% Example: +%% profile_query_result() :: #{ +%% <<"Profile">> => profile(), +%% <<"ProfileId">> => string(), +%% <<"QueryResult">> => list(any()) +%% } +-type profile_query_result() :: #{binary() => any()}. + + %% Example: %% delete_profile_key_response() :: #{ %% <<"Message">> => string() @@ -434,6 +501,10 @@ %% } -type delete_profile_request() :: #{binary() => any()}. +%% Example: +%% delete_segment_definition_request() :: #{} +-type delete_segment_definition_request() :: #{}. + %% Example: %% untag_resource_response() :: #{} -type untag_resource_response() :: #{}. @@ -479,6 +550,18 @@ -type s3_source_properties() :: #{binary() => any()}. +%% Example: +%% segment_definition_item() :: #{ +%% <<"CreatedAt">> => non_neg_integer(), +%% <<"Description">> => string(), +%% <<"DisplayName">> => string(), +%% <<"SegmentDefinitionArn">> => string(), +%% <<"SegmentDefinitionName">> => string(), +%% <<"Tags">> => map() +%% } +-type segment_definition_item() :: #{binary() => any()}. + + %% Example: %% found_by_key_value() :: #{ %% <<"KeyName">> => string(), @@ -515,6 +598,14 @@ %% } -type delete_profile_response() :: #{binary() => any()}. + +%% Example: +%% list_segment_definitions_request() :: #{ +%% <<"MaxResults">> => integer(), +%% <<"NextToken">> => string() +%% } +-type list_segment_definitions_request() :: #{binary() => any()}. + %% Example: %% get_identity_resolution_job_request() :: #{} -type get_identity_resolution_job_request() :: #{}. @@ -541,6 +632,29 @@ -type detect_profile_object_type_request() :: #{binary() => any()}. +%% Example: +%% calculated_attribute_value() :: #{ +%% <<"CalculatedAttributeName">> => string(), +%% <<"DisplayName">> => string(), +%% <<"IsDataPartial">> => string(), +%% <<"ProfileId">> => string(), +%% <<"Value">> => string() +%% } +-type calculated_attribute_value() :: #{binary() => any()}. + + +%% Example: +%% address_dimension() :: #{ +%% <<"City">> => profile_dimension(), +%% <<"Country">> => profile_dimension(), +%% <<"County">> => profile_dimension(), +%% <<"PostalCode">> => profile_dimension(), +%% <<"Province">> => profile_dimension(), +%% <<"State">> => profile_dimension() +%% } +-type address_dimension() :: #{binary() => any()}. + + %% Example: %% exporting_location() :: #{ %% <<"S3Exporting">> => s3_exporting_location() @@ -609,6 +723,14 @@ -type add_profile_key_response() :: #{binary() => any()}. +%% Example: +%% filter_group() :: #{ +%% <<"Dimensions">> => list(filter_dimension()()), +%% <<"Type">> => list(any()) +%% } +-type filter_group() :: #{binary() => any()}. + + %% Example: %% list_identity_resolution_jobs_response() :: #{ %% <<"IdentityResolutionJobsList">> => list(identity_resolution_job()()), @@ -617,6 +739,22 @@ -type list_identity_resolution_jobs_response() :: #{binary() => any()}. +%% Example: +%% batch_get_calculated_attribute_for_profile_error() :: #{ +%% <<"Code">> => string(), +%% <<"Message">> => string(), +%% <<"ProfileId">> => string() +%% } +-type batch_get_calculated_attribute_for_profile_error() :: #{binary() => any()}. + + +%% Example: +%% condition_overrides() :: #{ +%% <<"Range">> => range_override() +%% } +-type condition_overrides() :: #{binary() => any()}. + + %% Example: %% untag_resource_request() :: #{ %% <<"tagKeys">> := list(string()()) @@ -631,6 +769,13 @@ -type matching_rule() :: #{binary() => any()}. +%% Example: +%% attribute_value_item() :: #{ +%% <<"Value">> => string() +%% } +-type attribute_value_item() :: #{binary() => any()}. + + %% Example: %% put_integration_response() :: #{ %% <<"CreatedAt">> => non_neg_integer(), @@ -699,6 +844,15 @@ %% } -type trigger_properties() :: #{binary() => any()}. + +%% Example: +%% range_override() :: #{ +%% <<"End">> => integer(), +%% <<"Start">> => integer(), +%% <<"Unit">> => list(any()) +%% } +-type range_override() :: #{binary() => any()}. + %% Example: %% get_calculated_attribute_definition_request() :: #{} -type get_calculated_attribute_definition_request() :: #{}. @@ -714,6 +868,7 @@ %% <<"Conditions">> => conditions(), %% <<"Description">> => string(), %% <<"DisplayName">> => string(), +%% <<"Filter">> => filter(), %% <<"Statistic">> := list(any()), %% <<"Tags">> => map() %% } @@ -787,6 +942,22 @@ -type update_address() :: #{binary() => any()}. +%% Example: +%% list_object_type_attributes_request() :: #{ +%% <<"MaxResults">> => integer(), +%% <<"NextToken">> => string() +%% } +-type list_object_type_attributes_request() :: #{binary() => any()}. + + +%% Example: +%% list_object_type_attribute_item() :: #{ +%% <<"AttributeName">> => string(), +%% <<"LastUpdatedAt">> => non_neg_integer() +%% } +-type list_object_type_attribute_item() :: #{binary() => any()}. + + %% Example: %% get_integration_response() :: #{ %% <<"CreatedAt">> => non_neg_integer(), @@ -823,6 +994,15 @@ -type delete_profile_key_request() :: #{binary() => any()}. +%% Example: +%% calculated_attribute_dimension() :: #{ +%% <<"ConditionOverrides">> => condition_overrides(), +%% <<"DimensionType">> => list(any()), +%% <<"Values">> => list(string()()) +%% } +-type calculated_attribute_dimension() :: #{binary() => any()}. + + %% Example: %% workflow_attributes() :: #{ %% <<"AppflowIntegration">> => appflow_integration_workflow_attributes() @@ -872,6 +1052,19 @@ -type delete_workflow_response() :: #{}. +%% Example: +%% get_segment_definition_response() :: #{ +%% <<"CreatedAt">> => non_neg_integer(), +%% <<"Description">> => string(), +%% <<"DisplayName">> => string(), +%% <<"SegmentDefinitionArn">> => string(), +%% <<"SegmentDefinitionName">> => string(), +%% <<"SegmentGroups">> => segment_group(), +%% <<"Tags">> => map() +%% } +-type get_segment_definition_response() :: #{binary() => any()}. + + %% Example: %% rule_based_matching_response() :: #{ %% <<"AttributeTypesSelector">> => attribute_types_selector(), @@ -909,6 +1102,15 @@ -type additional_search_key() :: #{binary() => any()}. +%% Example: +%% profile_query_failures() :: #{ +%% <<"Message">> => string(), +%% <<"ProfileId">> => string(), +%% <<"Status">> => integer() +%% } +-type profile_query_failures() :: #{binary() => any()}. + + %% Example: %% resource_not_found_exception() :: #{ %% <<"Message">> => string() @@ -916,6 +1118,14 @@ -type resource_not_found_exception() :: #{binary() => any()}. +%% Example: +%% segment_group_structure() :: #{ +%% <<"Groups">> => list(group()()), +%% <<"Include">> => list(any()) +%% } +-type segment_group_structure() :: #{binary() => any()}. + + %% Example: %% delete_integration_request() :: #{ %% <<"Uri">> := string() @@ -983,6 +1193,23 @@ -type list_rule_based_matches_request() :: #{binary() => any()}. +%% Example: +%% profile_dimension() :: #{ +%% <<"DimensionType">> => list(any()), +%% <<"Values">> => list(string()()) +%% } +-type profile_dimension() :: #{binary() => any()}. + + +%% Example: +%% batch_get_calculated_attribute_for_profile_response() :: #{ +%% <<"CalculatedAttributeValues">> => list(calculated_attribute_value()()), +%% <<"ConditionOverrides">> => condition_overrides(), +%% <<"Errors">> => list(batch_get_calculated_attribute_for_profile_error()()) +%% } +-type batch_get_calculated_attribute_for_profile_response() :: #{binary() => any()}. + + %% Example: %% list_event_streams_response() :: #{ %% <<"Items">> => list(event_stream_summary()()), @@ -991,6 +1218,14 @@ -type list_event_streams_response() :: #{binary() => any()}. +%% Example: +%% list_object_type_attributes_response() :: #{ +%% <<"Items">> => list(list_object_type_attribute_item()()), +%% <<"NextToken">> => string() +%% } +-type list_object_type_attributes_response() :: #{binary() => any()}. + + %% Example: %% list_profile_objects_response() :: #{ %% <<"Items">> => list(list_profile_objects_item()()), @@ -1085,6 +1320,14 @@ -type list_workflows_request() :: #{binary() => any()}. +%% Example: +%% batch_get_profile_response() :: #{ +%% <<"Errors">> => list(batch_get_profile_error()()), +%% <<"Profiles">> => list(profile()()) +%% } +-type batch_get_profile_response() :: #{binary() => any()}. + + %% Example: %% exporting_config() :: #{ %% <<"S3Exporting">> => s3_exporting_config() @@ -1122,6 +1365,18 @@ -type s3_exporting_location() :: #{binary() => any()}. +%% Example: +%% create_segment_definition_response() :: #{ +%% <<"CreatedAt">> => non_neg_integer(), +%% <<"Description">> => string(), +%% <<"DisplayName">> => string(), +%% <<"SegmentDefinitionArn">> => string(), +%% <<"SegmentDefinitionName">> => string(), +%% <<"Tags">> => map() +%% } +-type create_segment_definition_response() :: #{binary() => any()}. + + %% Example: %% matching_response() :: #{ %% <<"AutoMerging">> => auto_merging(), @@ -1141,6 +1396,13 @@ -type conditions() :: #{binary() => any()}. +%% Example: +%% source_segment() :: #{ +%% <<"SegmentDefinitionName">> => string() +%% } +-type source_segment() :: #{binary() => any()}. + + %% Example: %% get_auto_merging_preview_request() :: #{ %% <<"ConflictResolution">> := conflict_resolution(), @@ -1221,6 +1483,34 @@ -type get_matches_response() :: #{binary() => any()}. +%% Example: +%% create_segment_snapshot_response() :: #{ +%% <<"SnapshotId">> => string() +%% } +-type create_segment_snapshot_response() :: #{binary() => any()}. + + +%% Example: +%% filter() :: #{ +%% <<"Groups">> => list(filter_group()()), +%% <<"Include">> => list(any()) +%% } +-type filter() :: #{binary() => any()}. + + +%% Example: +%% get_segment_snapshot_response() :: #{ +%% <<"DataFormat">> => list(any()), +%% <<"DestinationUri">> => string(), +%% <<"EncryptionKey">> => string(), +%% <<"RoleArn">> => string(), +%% <<"SnapshotId">> => string(), +%% <<"Status">> => list(any()), +%% <<"StatusMessage">> => string() +%% } +-type get_segment_snapshot_response() :: #{binary() => any()}. + + %% Example: %% list_profile_objects_item() :: #{ %% <<"Object">> => string(), @@ -1291,6 +1581,22 @@ -type event_stream_destination_details() :: #{binary() => any()}. +%% Example: +%% filter_attribute_dimension() :: #{ +%% <<"DimensionType">> => list(any()), +%% <<"Values">> => list(string()()) +%% } +-type filter_attribute_dimension() :: #{binary() => any()}. + + +%% Example: +%% segment_group() :: #{ +%% <<"Groups">> => list(group()()), +%% <<"Include">> => list(any()) +%% } +-type segment_group() :: #{binary() => any()}. + + %% Example: %% search_profiles_request() :: #{ %% <<"AdditionalSearchKeys">> => list(additional_search_key()()), @@ -1302,6 +1608,26 @@ %% } -type search_profiles_request() :: #{binary() => any()}. + +%% Example: +%% list_segment_definitions_response() :: #{ +%% <<"Items">> => list(segment_definition_item()()), +%% <<"NextToken">> => string() +%% } +-type list_segment_definitions_response() :: #{binary() => any()}. + + +%% Example: +%% get_segment_estimate_response() :: #{ +%% <<"DomainName">> => string(), +%% <<"Estimate">> => string(), +%% <<"EstimateId">> => string(), +%% <<"Message">> => string(), +%% <<"Status">> => list(any()), +%% <<"StatusCode">> => integer() +%% } +-type get_segment_estimate_response() :: #{binary() => any()}. + %% Example: %% get_profile_object_type_request() :: #{} -type get_profile_object_type_request() :: #{}. @@ -1335,6 +1661,10 @@ %% } -type internal_server_exception() :: #{binary() => any()}. +%% Example: +%% get_segment_snapshot_request() :: #{} +-type get_segment_snapshot_request() :: #{}. + %% Example: %% salesforce_source_properties() :: #{ @@ -1370,11 +1700,25 @@ %% } -type get_workflow_steps_request() :: #{binary() => any()}. + +%% Example: +%% get_segment_membership_request() :: #{ +%% <<"ProfileIds">> := list(string()()) +%% } +-type get_segment_membership_request() :: #{binary() => any()}. + %% Example: %% delete_calculated_attribute_definition_request() :: #{} -type delete_calculated_attribute_definition_request() :: #{}. +%% Example: +%% filter_dimension() :: #{ +%% <<"Attributes">> => map() +%% } +-type filter_dimension() :: #{binary() => any()}. + + %% Example: %% get_auto_merging_preview_response() :: #{ %% <<"DomainName">> => string(), @@ -1416,6 +1760,16 @@ %% } -type update_calculated_attribute_definition_request() :: #{binary() => any()}. + +%% Example: +%% create_segment_definition_request() :: #{ +%% <<"Description">> => string(), +%% <<"DisplayName">> := string(), +%% <<"SegmentGroups">> := segment_group(), +%% <<"Tags">> => map() +%% } +-type create_segment_definition_request() :: #{binary() => any()}. + %% Example: %% tag_resource_response() :: #{} -type tag_resource_response() :: #{}. @@ -1434,6 +1788,14 @@ %% } -type identity_resolution_job() :: #{binary() => any()}. + +%% Example: +%% batch_get_calculated_attribute_for_profile_request() :: #{ +%% <<"ConditionOverrides">> => condition_overrides(), +%% <<"ProfileIds">> := list(string()()) +%% } +-type batch_get_calculated_attribute_for_profile_request() :: #{binary() => any()}. + %% Example: %% delete_event_stream_response() :: #{} -type delete_event_stream_response() :: #{}. @@ -1484,6 +1846,15 @@ -type list_tags_for_resource_request() :: #{}. +%% Example: +%% get_segment_membership_response() :: #{ +%% <<"Failures">> => list(profile_query_failures()()), +%% <<"Profiles">> => list(profile_query_result()()), +%% <<"SegmentDefinitionName">> => string() +%% } +-type get_segment_membership_response() :: #{binary() => any()}. + + %% Example: %% s3_exporting_config() :: #{ %% <<"S3BucketName">> => string(), @@ -1499,6 +1870,24 @@ -type throttling_exception() :: #{binary() => any()}. +%% Example: +%% attribute_dimension() :: #{ +%% <<"DimensionType">> => list(any()), +%% <<"Values">> => list(string()()) +%% } +-type attribute_dimension() :: #{binary() => any()}. + + +%% Example: +%% group() :: #{ +%% <<"Dimensions">> => list(list()()), +%% <<"SourceSegments">> => list(source_segment()()), +%% <<"SourceType">> => list(any()), +%% <<"Type">> => list(any()) +%% } +-type group() :: #{binary() => any()}. + + %% Example: %% create_domain_response() :: #{ %% <<"CreatedAt">> => non_neg_integer(), @@ -1557,6 +1946,20 @@ %% } -type detected_profile_object_type() :: #{binary() => any()}. + +%% Example: +%% batch_get_profile_request() :: #{ +%% <<"ProfileIds">> := list(string()()) +%% } +-type batch_get_profile_request() :: #{binary() => any()}. + + +%% Example: +%% delete_segment_definition_response() :: #{ +%% <<"Message">> => string() +%% } +-type delete_segment_definition_response() :: #{binary() => any()}. + %% Example: %% delete_profile_object_type_request() :: #{} -type delete_profile_object_type_request() :: #{}. @@ -1579,6 +1982,10 @@ %% } -type connector_operator() :: #{binary() => any()}. +%% Example: +%% profile_attribute_values_request() :: #{} +-type profile_attribute_values_request() :: #{}. + %% Example: %% put_profile_object_request() :: #{ @@ -1634,6 +2041,16 @@ -type address() :: #{binary() => any()}. +%% Example: +%% profile_attribute_values_response() :: #{ +%% <<"AttributeName">> => string(), +%% <<"DomainName">> => string(), +%% <<"Items">> => list(attribute_value_item()()), +%% <<"StatusCode">> => integer() +%% } +-type profile_attribute_values_response() :: #{binary() => any()}. + + %% Example: %% delete_profile_object_request() :: #{ %% <<"ObjectTypeName">> := string(), @@ -1650,6 +2067,10 @@ %% } -type list_calculated_attribute_definitions_response() :: #{binary() => any()}. +%% Example: +%% get_segment_estimate_request() :: #{} +-type get_segment_estimate_request() :: #{}. + %% Example: %% list_workflows_response() :: #{ @@ -1659,6 +2080,18 @@ -type list_workflows_response() :: #{binary() => any()}. +%% Example: +%% extra_length_value_profile_dimension() :: #{ +%% <<"DimensionType">> => list(any()), +%% <<"Values">> => list(string()()) +%% } +-type extra_length_value_profile_dimension() :: #{binary() => any()}. + +%% Example: +%% get_segment_definition_request() :: #{} +-type get_segment_definition_request() :: #{}. + + %% Example: %% list_profile_object_type_templates_response() :: #{ %% <<"Items">> => list(list_profile_object_type_template_item()()), @@ -1723,6 +2156,15 @@ -type incremental_pull_config() :: #{binary() => any()}. +%% Example: +%% batch_get_profile_error() :: #{ +%% <<"Code">> => string(), +%% <<"Message">> => string(), +%% <<"ProfileId">> => string() +%% } +-type batch_get_profile_error() :: #{binary() => any()}. + + %% Example: %% create_event_stream_response() :: #{ %% <<"EventStreamArn">> => string(), @@ -1758,6 +2200,33 @@ -type matching_request() :: #{binary() => any()}. +%% Example: +%% profile_attributes() :: #{ +%% <<"AccountNumber">> => profile_dimension(), +%% <<"AdditionalInformation">> => extra_length_value_profile_dimension(), +%% <<"Address">> => address_dimension(), +%% <<"Attributes">> => map(), +%% <<"BillingAddress">> => address_dimension(), +%% <<"BirthDate">> => date_dimension(), +%% <<"BusinessEmailAddress">> => profile_dimension(), +%% <<"BusinessName">> => profile_dimension(), +%% <<"BusinessPhoneNumber">> => profile_dimension(), +%% <<"EmailAddress">> => profile_dimension(), +%% <<"FirstName">> => profile_dimension(), +%% <<"GenderString">> => profile_dimension(), +%% <<"HomePhoneNumber">> => profile_dimension(), +%% <<"LastName">> => profile_dimension(), +%% <<"MailingAddress">> => address_dimension(), +%% <<"MiddleName">> => profile_dimension(), +%% <<"MobilePhoneNumber">> => profile_dimension(), +%% <<"PartyTypeString">> => profile_dimension(), +%% <<"PersonalEmailAddress">> => profile_dimension(), +%% <<"PhoneNumber">> => profile_dimension(), +%% <<"ShippingAddress">> => address_dimension() +%% } +-type profile_attributes() :: #{binary() => any()}. + + %% Example: %% get_calculated_attribute_definition_response() :: #{ %% <<"AttributeDetails">> => attribute_details(), @@ -1766,6 +2235,7 @@ %% <<"CreatedAt">> => non_neg_integer(), %% <<"Description">> => string(), %% <<"DisplayName">> => string(), +%% <<"Filter">> => filter(), %% <<"LastUpdatedAt">> => non_neg_integer(), %% <<"Statistic">> => list(any()), %% <<"Tags">> => map() @@ -1773,6 +2243,15 @@ -type get_calculated_attribute_definition_response() :: #{binary() => any()}. +%% Example: +%% create_segment_estimate_response() :: #{ +%% <<"DomainName">> => string(), +%% <<"EstimateId">> => string(), +%% <<"StatusCode">> => integer() +%% } +-type create_segment_estimate_response() :: #{binary() => any()}. + + %% Example: %% list_profile_object_types_response() :: #{ %% <<"Items">> => list(list_profile_object_type_item()()), @@ -1822,63 +2301,98 @@ internal_server_exception() | resource_not_found_exception(). --type create_calculated_attribute_definition_errors() :: +-type batch_get_calculated_attribute_for_profile_errors() :: bad_request_exception() | throttling_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). --type create_domain_errors() :: +-type batch_get_profile_errors() :: bad_request_exception() | throttling_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). --type create_event_stream_errors() :: +-type create_calculated_attribute_definition_errors() :: bad_request_exception() | throttling_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). --type create_integration_workflow_errors() :: +-type create_domain_errors() :: bad_request_exception() | throttling_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). --type create_profile_errors() :: +-type create_event_stream_errors() :: bad_request_exception() | throttling_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). --type delete_calculated_attribute_definition_errors() :: +-type create_integration_workflow_errors() :: bad_request_exception() | throttling_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). --type delete_domain_errors() :: +-type create_profile_errors() :: bad_request_exception() | throttling_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). --type delete_event_stream_errors() :: +-type create_segment_definition_errors() :: bad_request_exception() | throttling_exception() | access_denied_exception() | internal_server_exception() | resource_not_found_exception(). --type delete_integration_errors() :: +-type create_segment_estimate_errors() :: + bad_request_exception() | + throttling_exception() | + access_denied_exception() | + internal_server_exception() | + resource_not_found_exception(). + +-type create_segment_snapshot_errors() :: + bad_request_exception() | + throttling_exception() | + access_denied_exception() | + internal_server_exception() | + resource_not_found_exception(). + +-type delete_calculated_attribute_definition_errors() :: + bad_request_exception() | + throttling_exception() | + access_denied_exception() | + internal_server_exception() | + resource_not_found_exception(). + +-type delete_domain_errors() :: + bad_request_exception() | + throttling_exception() | + access_denied_exception() | + internal_server_exception() | + resource_not_found_exception(). + +-type delete_event_stream_errors() :: + bad_request_exception() | + throttling_exception() | + access_denied_exception() | + internal_server_exception() | + resource_not_found_exception(). + +-type delete_integration_errors() :: bad_request_exception() | throttling_exception() | access_denied_exception() | @@ -1913,6 +2427,13 @@ internal_server_exception() | resource_not_found_exception(). +-type delete_segment_definition_errors() :: + bad_request_exception() | + throttling_exception() | + access_denied_exception() | + internal_server_exception() | + resource_not_found_exception(). + -type delete_workflow_errors() :: bad_request_exception() | throttling_exception() | @@ -1997,6 +2518,34 @@ internal_server_exception() | resource_not_found_exception(). +-type get_segment_definition_errors() :: + bad_request_exception() | + throttling_exception() | + access_denied_exception() | + internal_server_exception() | + resource_not_found_exception(). + +-type get_segment_estimate_errors() :: + bad_request_exception() | + throttling_exception() | + access_denied_exception() | + internal_server_exception() | + resource_not_found_exception(). + +-type get_segment_membership_errors() :: + bad_request_exception() | + throttling_exception() | + access_denied_exception() | + internal_server_exception() | + resource_not_found_exception(). + +-type get_segment_snapshot_errors() :: + bad_request_exception() | + throttling_exception() | + access_denied_exception() | + internal_server_exception() | + resource_not_found_exception(). + -type get_similar_profiles_errors() :: bad_request_exception() | throttling_exception() | @@ -2067,6 +2616,20 @@ internal_server_exception() | resource_not_found_exception(). +-type list_object_type_attributes_errors() :: + bad_request_exception() | + throttling_exception() | + access_denied_exception() | + internal_server_exception() | + resource_not_found_exception(). + +-type list_profile_attribute_values_errors() :: + bad_request_exception() | + throttling_exception() | + access_denied_exception() | + internal_server_exception() | + resource_not_found_exception(). + -type list_profile_object_type_templates_errors() :: bad_request_exception() | throttling_exception() | @@ -2095,6 +2658,13 @@ internal_server_exception() | resource_not_found_exception(). +-type list_segment_definitions_errors() :: + bad_request_exception() | + throttling_exception() | + access_denied_exception() | + internal_server_exception() | + resource_not_found_exception(). + -type list_tags_for_resource_errors() :: bad_request_exception() | internal_server_exception() | @@ -2216,6 +2786,74 @@ add_profile_key(Client, DomainName, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Fetch the possible attribute values given the attribute name. +-spec batch_get_calculated_attribute_for_profile(aws_client:aws_client(), binary() | list(), binary() | list(), batch_get_calculated_attribute_for_profile_request()) -> + {ok, batch_get_calculated_attribute_for_profile_response(), tuple()} | + {error, any()} | + {error, batch_get_calculated_attribute_for_profile_errors(), tuple()}. +batch_get_calculated_attribute_for_profile(Client, CalculatedAttributeName, DomainName, Input) -> + batch_get_calculated_attribute_for_profile(Client, CalculatedAttributeName, DomainName, Input, []). + +-spec batch_get_calculated_attribute_for_profile(aws_client:aws_client(), binary() | list(), binary() | list(), batch_get_calculated_attribute_for_profile_request(), proplists:proplist()) -> + {ok, batch_get_calculated_attribute_for_profile_response(), tuple()} | + {error, any()} | + {error, batch_get_calculated_attribute_for_profile_errors(), tuple()}. +batch_get_calculated_attribute_for_profile(Client, CalculatedAttributeName, DomainName, Input0, Options0) -> + Method = post, + Path = ["/domains/", aws_util:encode_uri(DomainName), "/calculated-attributes/", aws_util:encode_uri(CalculatedAttributeName), "/batch-get-for-profiles"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Get a batch of profiles. +-spec batch_get_profile(aws_client:aws_client(), binary() | list(), batch_get_profile_request()) -> + {ok, batch_get_profile_response(), tuple()} | + {error, any()} | + {error, batch_get_profile_errors(), tuple()}. +batch_get_profile(Client, DomainName, Input) -> + batch_get_profile(Client, DomainName, Input, []). + +-spec batch_get_profile(aws_client:aws_client(), binary() | list(), batch_get_profile_request(), proplists:proplist()) -> + {ok, batch_get_profile_response(), tuple()} | + {error, any()} | + {error, batch_get_profile_errors(), tuple()}. +batch_get_profile(Client, DomainName, Input0, Options0) -> + Method = post, + Path = ["/domains/", aws_util:encode_uri(DomainName), "/batch-get-profiles"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Creates a new calculated attribute definition. %% %% After creation, new object data ingested @@ -2446,6 +3084,108 @@ create_profile(Client, DomainName, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Creates a segment definition associated to the given domain. +-spec create_segment_definition(aws_client:aws_client(), binary() | list(), binary() | list(), create_segment_definition_request()) -> + {ok, create_segment_definition_response(), tuple()} | + {error, any()} | + {error, create_segment_definition_errors(), tuple()}. +create_segment_definition(Client, DomainName, SegmentDefinitionName, Input) -> + create_segment_definition(Client, DomainName, SegmentDefinitionName, Input, []). + +-spec create_segment_definition(aws_client:aws_client(), binary() | list(), binary() | list(), create_segment_definition_request(), proplists:proplist()) -> + {ok, create_segment_definition_response(), tuple()} | + {error, any()} | + {error, create_segment_definition_errors(), tuple()}. +create_segment_definition(Client, DomainName, SegmentDefinitionName, Input0, Options0) -> + Method = post, + Path = ["/domains/", aws_util:encode_uri(DomainName), "/segment-definitions/", aws_util:encode_uri(SegmentDefinitionName), ""], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Creates a segment estimate query. +-spec create_segment_estimate(aws_client:aws_client(), binary() | list(), create_segment_estimate_request()) -> + {ok, create_segment_estimate_response(), tuple()} | + {error, any()} | + {error, create_segment_estimate_errors(), tuple()}. +create_segment_estimate(Client, DomainName, Input) -> + create_segment_estimate(Client, DomainName, Input, []). + +-spec create_segment_estimate(aws_client:aws_client(), binary() | list(), create_segment_estimate_request(), proplists:proplist()) -> + {ok, create_segment_estimate_response(), tuple()} | + {error, any()} | + {error, create_segment_estimate_errors(), tuple()}. +create_segment_estimate(Client, DomainName, Input0, Options0) -> + Method = post, + Path = ["/domains/", aws_util:encode_uri(DomainName), "/segment-estimates"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Triggers a job to export a segment to a specified destination. +-spec create_segment_snapshot(aws_client:aws_client(), binary() | list(), binary() | list(), create_segment_snapshot_request()) -> + {ok, create_segment_snapshot_response(), tuple()} | + {error, any()} | + {error, create_segment_snapshot_errors(), tuple()}. +create_segment_snapshot(Client, DomainName, SegmentDefinitionName, Input) -> + create_segment_snapshot(Client, DomainName, SegmentDefinitionName, Input, []). + +-spec create_segment_snapshot(aws_client:aws_client(), binary() | list(), binary() | list(), create_segment_snapshot_request(), proplists:proplist()) -> + {ok, create_segment_snapshot_response(), tuple()} | + {error, any()} | + {error, create_segment_snapshot_errors(), tuple()}. +create_segment_snapshot(Client, DomainName, SegmentDefinitionName, Input0, Options0) -> + Method = post, + Path = ["/domains/", aws_util:encode_uri(DomainName), "/segments/", aws_util:encode_uri(SegmentDefinitionName), "/snapshots"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Deletes an existing calculated attribute definition. %% %% Note that deleting a default @@ -2735,6 +3475,40 @@ delete_profile_object_type(Client, DomainName, ObjectTypeName, Input0, Options0) request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Deletes a segment definition from the domain. +-spec delete_segment_definition(aws_client:aws_client(), binary() | list(), binary() | list(), delete_segment_definition_request()) -> + {ok, delete_segment_definition_response(), tuple()} | + {error, any()} | + {error, delete_segment_definition_errors(), tuple()}. +delete_segment_definition(Client, DomainName, SegmentDefinitionName, Input) -> + delete_segment_definition(Client, DomainName, SegmentDefinitionName, Input, []). + +-spec delete_segment_definition(aws_client:aws_client(), binary() | list(), binary() | list(), delete_segment_definition_request(), proplists:proplist()) -> + {ok, delete_segment_definition_response(), tuple()} | + {error, any()} | + {error, delete_segment_definition_errors(), tuple()}. +delete_segment_definition(Client, DomainName, SegmentDefinitionName, Input0, Options0) -> + Method = delete, + Path = ["/domains/", aws_util:encode_uri(DomainName), "/segment-definitions/", aws_util:encode_uri(SegmentDefinitionName), ""], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Deletes the specified workflow and all its corresponding resources. %% %% This is an async @@ -3263,6 +4037,151 @@ get_profile_object_type_template(Client, TemplateId, QueryMap, HeadersMap, Optio request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). +%% @doc Gets a segment definition from the domain. +-spec get_segment_definition(aws_client:aws_client(), binary() | list(), binary() | list()) -> + {ok, get_segment_definition_response(), tuple()} | + {error, any()} | + {error, get_segment_definition_errors(), tuple()}. +get_segment_definition(Client, DomainName, SegmentDefinitionName) + when is_map(Client) -> + get_segment_definition(Client, DomainName, SegmentDefinitionName, #{}, #{}). + +-spec get_segment_definition(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> + {ok, get_segment_definition_response(), tuple()} | + {error, any()} | + {error, get_segment_definition_errors(), tuple()}. +get_segment_definition(Client, DomainName, SegmentDefinitionName, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + get_segment_definition(Client, DomainName, SegmentDefinitionName, QueryMap, HeadersMap, []). + +-spec get_segment_definition(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, get_segment_definition_response(), tuple()} | + {error, any()} | + {error, get_segment_definition_errors(), tuple()}. +get_segment_definition(Client, DomainName, SegmentDefinitionName, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/domains/", aws_util:encode_uri(DomainName), "/segment-definitions/", aws_util:encode_uri(SegmentDefinitionName), ""], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query_ = [], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + +%% @doc Gets the result of a segment estimate query. +-spec get_segment_estimate(aws_client:aws_client(), binary() | list(), binary() | list()) -> + {ok, get_segment_estimate_response(), tuple()} | + {error, any()} | + {error, get_segment_estimate_errors(), tuple()}. +get_segment_estimate(Client, DomainName, EstimateId) + when is_map(Client) -> + get_segment_estimate(Client, DomainName, EstimateId, #{}, #{}). + +-spec get_segment_estimate(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> + {ok, get_segment_estimate_response(), tuple()} | + {error, any()} | + {error, get_segment_estimate_errors(), tuple()}. +get_segment_estimate(Client, DomainName, EstimateId, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + get_segment_estimate(Client, DomainName, EstimateId, QueryMap, HeadersMap, []). + +-spec get_segment_estimate(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, get_segment_estimate_response(), tuple()} | + {error, any()} | + {error, get_segment_estimate_errors(), tuple()}. +get_segment_estimate(Client, DomainName, EstimateId, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/domains/", aws_util:encode_uri(DomainName), "/segment-estimates/", aws_util:encode_uri(EstimateId), ""], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query_ = [], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + +%% @doc Determines if the given profiles are within a segment. +-spec get_segment_membership(aws_client:aws_client(), binary() | list(), binary() | list(), get_segment_membership_request()) -> + {ok, get_segment_membership_response(), tuple()} | + {error, any()} | + {error, get_segment_membership_errors(), tuple()}. +get_segment_membership(Client, DomainName, SegmentDefinitionName, Input) -> + get_segment_membership(Client, DomainName, SegmentDefinitionName, Input, []). + +-spec get_segment_membership(aws_client:aws_client(), binary() | list(), binary() | list(), get_segment_membership_request(), proplists:proplist()) -> + {ok, get_segment_membership_response(), tuple()} | + {error, any()} | + {error, get_segment_membership_errors(), tuple()}. +get_segment_membership(Client, DomainName, SegmentDefinitionName, Input0, Options0) -> + Method = post, + Path = ["/domains/", aws_util:encode_uri(DomainName), "/segments/", aws_util:encode_uri(SegmentDefinitionName), "/membership"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Retrieve the latest status of a segment snapshot. +-spec get_segment_snapshot(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list()) -> + {ok, get_segment_snapshot_response(), tuple()} | + {error, any()} | + {error, get_segment_snapshot_errors(), tuple()}. +get_segment_snapshot(Client, DomainName, SegmentDefinitionName, SnapshotId) + when is_map(Client) -> + get_segment_snapshot(Client, DomainName, SegmentDefinitionName, SnapshotId, #{}, #{}). + +-spec get_segment_snapshot(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), map(), map()) -> + {ok, get_segment_snapshot_response(), tuple()} | + {error, any()} | + {error, get_segment_snapshot_errors(), tuple()}. +get_segment_snapshot(Client, DomainName, SegmentDefinitionName, SnapshotId, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + get_segment_snapshot(Client, DomainName, SegmentDefinitionName, SnapshotId, QueryMap, HeadersMap, []). + +-spec get_segment_snapshot(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, get_segment_snapshot_response(), tuple()} | + {error, any()} | + {error, get_segment_snapshot_errors(), tuple()}. +get_segment_snapshot(Client, DomainName, SegmentDefinitionName, SnapshotId, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/domains/", aws_util:encode_uri(DomainName), "/segments/", aws_util:encode_uri(SegmentDefinitionName), "/snapshots/", aws_util:encode_uri(SnapshotId), ""], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query_ = [], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + %% @doc Returns a set of profiles that belong to the same matching group %% using the %% `matchId' or `profileId'. @@ -3679,6 +4598,85 @@ list_integrations(Client, DomainName, QueryMap, HeadersMap, Options0) request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). +%% @doc Fetch the possible attribute values given the attribute name. +-spec list_object_type_attributes(aws_client:aws_client(), binary() | list(), binary() | list()) -> + {ok, list_object_type_attributes_response(), tuple()} | + {error, any()} | + {error, list_object_type_attributes_errors(), tuple()}. +list_object_type_attributes(Client, DomainName, ObjectTypeName) + when is_map(Client) -> + list_object_type_attributes(Client, DomainName, ObjectTypeName, #{}, #{}). + +-spec list_object_type_attributes(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> + {ok, list_object_type_attributes_response(), tuple()} | + {error, any()} | + {error, list_object_type_attributes_errors(), tuple()}. +list_object_type_attributes(Client, DomainName, ObjectTypeName, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + list_object_type_attributes(Client, DomainName, ObjectTypeName, QueryMap, HeadersMap, []). + +-spec list_object_type_attributes(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, list_object_type_attributes_response(), tuple()} | + {error, any()} | + {error, list_object_type_attributes_errors(), tuple()}. +list_object_type_attributes(Client, DomainName, ObjectTypeName, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/domains/", aws_util:encode_uri(DomainName), "/object-types/", aws_util:encode_uri(ObjectTypeName), "/attributes"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query0_ = + [ + {<<"max-results">>, maps:get(<<"max-results">>, QueryMap, undefined)}, + {<<"next-token">>, maps:get(<<"next-token">>, QueryMap, undefined)} + ], + Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + +%% @doc Fetch the possible attribute values given the attribute name. +-spec list_profile_attribute_values(aws_client:aws_client(), binary() | list(), binary() | list()) -> + {ok, profile_attribute_values_response(), tuple()} | + {error, any()} | + {error, list_profile_attribute_values_errors(), tuple()}. +list_profile_attribute_values(Client, AttributeName, DomainName) + when is_map(Client) -> + list_profile_attribute_values(Client, AttributeName, DomainName, #{}, #{}). + +-spec list_profile_attribute_values(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> + {ok, profile_attribute_values_response(), tuple()} | + {error, any()} | + {error, list_profile_attribute_values_errors(), tuple()}. +list_profile_attribute_values(Client, AttributeName, DomainName, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + list_profile_attribute_values(Client, AttributeName, DomainName, QueryMap, HeadersMap, []). + +-spec list_profile_attribute_values(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, profile_attribute_values_response(), tuple()} | + {error, any()} | + {error, list_profile_attribute_values_errors(), tuple()}. +list_profile_attribute_values(Client, AttributeName, DomainName, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/domains/", aws_util:encode_uri(DomainName), "/profile-attributes/", aws_util:encode_uri(AttributeName), "/values"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query_ = [], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + %% @doc Lists all of the template information for object types. -spec list_profile_object_type_templates(aws_client:aws_client()) -> {ok, list_profile_object_type_templates_response(), tuple()} | @@ -3842,6 +4840,48 @@ list_rule_based_matches(Client, DomainName, QueryMap, HeadersMap, Options0) request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). +%% @doc Lists all segment definitions under a domain. +-spec list_segment_definitions(aws_client:aws_client(), binary() | list()) -> + {ok, list_segment_definitions_response(), tuple()} | + {error, any()} | + {error, list_segment_definitions_errors(), tuple()}. +list_segment_definitions(Client, DomainName) + when is_map(Client) -> + list_segment_definitions(Client, DomainName, #{}, #{}). + +-spec list_segment_definitions(aws_client:aws_client(), binary() | list(), map(), map()) -> + {ok, list_segment_definitions_response(), tuple()} | + {error, any()} | + {error, list_segment_definitions_errors(), tuple()}. +list_segment_definitions(Client, DomainName, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + list_segment_definitions(Client, DomainName, QueryMap, HeadersMap, []). + +-spec list_segment_definitions(aws_client:aws_client(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, list_segment_definitions_response(), tuple()} | + {error, any()} | + {error, list_segment_definitions_errors(), tuple()}. +list_segment_definitions(Client, DomainName, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/domains/", aws_util:encode_uri(DomainName), "/segment-definitions"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query0_ = + [ + {<<"max-results">>, maps:get(<<"max-results">>, QueryMap, undefined)}, + {<<"next-token">>, maps:get(<<"next-token">>, QueryMap, undefined)} + ], + Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + %% @doc Displays the tags associated with an Amazon Connect Customer Profiles %% resource. %% diff --git a/src/aws_ec2.erl b/src/aws_ec2.erl index 91c329d5..c796373d 100644 --- a/src/aws_ec2.erl +++ b/src/aws_ec2.erl @@ -1802,6 +1802,7 @@ %% <<"Ipv6Prefixes">> => list(instance_ipv6_prefix()()), %% <<"MacAddress">> => string(), %% <<"NetworkInterfaceId">> => string(), +%% <<"Operator">> => operator_response(), %% <<"OwnerId">> => string(), %% <<"PrivateDnsName">> => string(), %% <<"PrivateIpAddress">> => string(), @@ -4624,6 +4625,7 @@ %% <<"Ipv6Prefixes">> => list(ipv6_prefix_specification()()), %% <<"MacAddress">> => string(), %% <<"NetworkInterfaceId">> => string(), +%% <<"Operator">> => operator_response(), %% <<"OutpostArn">> => string(), %% <<"OwnerId">> => string(), %% <<"PrivateDnsName">> => string(), @@ -6076,6 +6078,7 @@ %% <<"DisableApiTermination">> => boolean(), %% <<"SecurityGroupIds">> => list(string()()), %% <<"Ipv6AddressCount">> => integer(), +%% <<"Operator">> => operator_request(), %% <<"ImageId">> => string(), %% <<"InstanceMarketOptions">> => instance_market_options_request() %% } @@ -10055,6 +10058,12 @@ %% } -type describe_client_vpn_routes_request() :: #{binary() => any()}. +%% Example: +%% operator_request() :: #{ +%% <<"Principal">> => string() +%% } +-type operator_request() :: #{binary() => any()}. + %% Example: %% delete_traffic_mirror_filter_rule_result() :: #{ %% <<"TrafficMirrorFilterRuleId">> => string() @@ -10082,6 +10091,7 @@ %% <<"LaunchTemplateData">> => response_launch_template_data(), %% <<"LaunchTemplateId">> => string(), %% <<"LaunchTemplateName">> => string(), +%% <<"Operator">> => operator_response(), %% <<"VersionDescription">> => string(), %% <<"VersionNumber">> => float() %% } @@ -10369,6 +10379,7 @@ %% <<"MetadataOptions">> => launch_template_instance_metadata_options(), %% <<"Monitoring">> => launch_templates_monitoring(), %% <<"NetworkInterfaces">> => list(launch_template_instance_network_interface_specification()()), +%% <<"Operator">> => operator_response(), %% <<"Placement">> => launch_template_placement(), %% <<"PrivateDnsNameOptions">> => launch_template_private_dns_name_options(), %% <<"RamDiskId">> => string(), @@ -12538,6 +12549,7 @@ %% <<"MetadataOptions">> => launch_template_instance_metadata_options_request(), %% <<"Monitoring">> => launch_templates_monitoring_request(), %% <<"NetworkInterfaces">> => list(launch_template_instance_network_interface_specification_request()()), +%% <<"Operator">> => operator_request(), %% <<"Placement">> => launch_template_placement_request(), %% <<"PrivateDnsNameOptions">> => launch_template_private_dns_name_options_request(), %% <<"RamDiskId">> => string(), @@ -13327,6 +13339,7 @@ %% <<"PrivateIpAddress">> => string(), %% <<"RootDeviceType">> => list(any()), %% <<"BootMode">> => list(any()), +%% <<"Operator">> => operator_response(), %% <<"ImageId">> => string(), %% <<"InstanceLifecycle">> => list(any()), %% <<"LaunchTime">> => non_neg_integer(), @@ -13367,6 +13380,7 @@ %% <<"Iops">> => integer(), %% <<"KmsKeyId">> => string(), %% <<"MultiAttachEnabled">> => boolean(), +%% <<"Operator">> => operator_response(), %% <<"OutpostArn">> => string(), %% <<"Size">> => integer(), %% <<"SnapshotId">> => string(), @@ -13914,6 +13928,7 @@ %% <<"Iops">> => integer(), %% <<"KmsKeyId">> => string(), %% <<"MultiAttachEnabled">> => boolean(), +%% <<"Operator">> => operator_request(), %% <<"OutpostArn">> => string(), %% <<"Size">> => integer(), %% <<"SnapshotId">> => string(), @@ -14530,6 +14545,7 @@ %% <<"AssociatedResource">> => string(), %% <<"AttachTime">> => non_neg_integer(), %% <<"DeleteOnTermination">> => boolean(), +%% <<"Operator">> => operator_response(), %% <<"Status">> => list(any()), %% <<"VolumeId">> => string(), %% <<"VolumeOwnerId">> => string() @@ -15032,6 +15048,7 @@ %% <<"LatestVersionNumber">> => float(), %% <<"LaunchTemplateId">> => string(), %% <<"LaunchTemplateName">> => string(), +%% <<"Operator">> => operator_response(), %% <<"Tags">> => list(tag()()) %% } -type launch_template() :: #{binary() => any()}. @@ -15085,6 +15102,7 @@ %% <<"Ipv6Addresses">> => list(instance_ipv6_address()()), %% <<"Ipv6PrefixCount">> => integer(), %% <<"Ipv6Prefixes">> => list(ipv6_prefix_specification_request()()), +%% <<"Operator">> => operator_request(), %% <<"PrivateIpAddress">> => string(), %% <<"PrivateIpAddresses">> => list(private_ip_address_specification()()), %% <<"SecondaryPrivateIpAddressCount">> => integer(), @@ -16269,6 +16287,7 @@ %% <<"InstanceId">> => string(), %% <<"InstanceState">> => instance_state(), %% <<"InstanceStatus">> => instance_status_summary(), +%% <<"Operator">> => operator_response(), %% <<"OutpostArn">> => string(), %% <<"SystemStatus">> => instance_status_summary() %% } @@ -16941,6 +16960,7 @@ %% <<"InstanceId">> => string(), %% <<"InstanceType">> => list(any()), %% <<"LaunchTime">> => non_neg_integer(), +%% <<"Operator">> => operator_response(), %% <<"OwnerId">> => string(), %% <<"State">> => instance_state(), %% <<"Tags">> => list(tag()()), @@ -17562,6 +17582,7 @@ %% <<"DryRun">> => boolean(), %% <<"LaunchTemplateData">> := request_launch_template_data(), %% <<"LaunchTemplateName">> := string(), +%% <<"Operator">> => operator_request(), %% <<"TagSpecifications">> => list(tag_specification()()), %% <<"VersionDescription">> => string() %% } @@ -18530,6 +18551,13 @@ %% } -type modify_traffic_mirror_session_request() :: #{binary() => any()}. +%% Example: +%% operator_response() :: #{ +%% <<"Managed">> => boolean(), +%% <<"Principal">> => string() +%% } +-type operator_response() :: #{binary() => any()}. + %% Example: %% delete_placement_group_request() :: #{ %% <<"DryRun">> => boolean(), diff --git a/src/aws_ecs.erl b/src/aws_ecs.erl index 58049044..f29ac4f7 100644 --- a/src/aws_ecs.erl +++ b/src/aws_ecs.erl @@ -6,29 +6,27 @@ %% Amazon Elastic Container Service (Amazon ECS) is a highly scalable, fast, %% container management service. %% -%% It makes -%% it easy to run, stop, and manage Docker containers. You can host your -%% cluster on a -%% serverless infrastructure that's managed by Amazon ECS by launching -%% your services or tasks on -%% Fargate. For more control, you can host your tasks on a cluster of Amazon -%% Elastic Compute Cloud (Amazon EC2) -%% or External (on-premises) instances that you manage. +%% It makes it easy to run, +%% stop, and manage Docker containers. You can host your cluster on a +%% serverless infrastructure that's +%% managed by Amazon ECS by launching your services or tasks on Fargate. For +%% more control, you can host your +%% tasks on a cluster of Amazon Elastic Compute Cloud (Amazon EC2) or +%% External (on-premises) instances that you manage. %% %% Amazon ECS makes it easy to launch and stop container-based applications -%% with simple API -%% calls. This makes it easy to get the state of your cluster from a -%% centralized service, -%% and gives you access to many familiar Amazon EC2 features. +%% with simple API calls. This makes +%% it easy to get the state of your cluster from a centralized service, and +%% gives you access to many +%% familiar Amazon EC2 features. %% %% You can use Amazon ECS to schedule the placement of containers across your -%% cluster based on -%% your resource needs, isolation policies, and availability requirements. -%% With Amazon ECS, you -%% don't need to operate your own cluster management and configuration -%% management systems. -%% You also don't need to worry about scaling your management -%% infrastructure. +%% cluster based on your resource +%% needs, isolation policies, and availability requirements. With Amazon ECS, +%% you don't need to operate your +%% own cluster management and configuration management systems. You also +%% don't need to worry about scaling +%% your management infrastructure. -module(aws_ecs). -export([create_capacity_provider/2, @@ -402,7 +400,8 @@ %% <<"status">> => string(), %% <<"taskDefinition">> => string(), %% <<"updatedAt">> => non_neg_integer(), -%% <<"volumeConfigurations">> => list(service_volume_configuration()()) +%% <<"volumeConfigurations">> => list(service_volume_configuration()()), +%% <<"vpcLatticeConfigurations">> => list(vpc_lattice_configuration()()) %% } -type deployment() :: #{binary() => any()}. @@ -1013,6 +1012,14 @@ %% } -type managed_storage_configuration() :: #{binary() => any()}. +%% Example: +%% vpc_lattice_configuration() :: #{ +%% <<"portName">> => string(), +%% <<"roleArn">> => string(), +%% <<"targetGroupArn">> => string() +%% } +-type vpc_lattice_configuration() :: #{binary() => any()}. + %% Example: %% get_task_protection_request() :: #{ %% <<"cluster">> := string(), @@ -1187,7 +1194,8 @@ %% <<"serviceRegistries">> => list(service_registry()()), %% <<"tags">> => list(tag()()), %% <<"taskDefinition">> => string(), -%% <<"volumeConfigurations">> => list(service_volume_configuration()()) +%% <<"volumeConfigurations">> => list(service_volume_configuration()()), +%% <<"vpcLatticeConfigurations">> => list(vpc_lattice_configuration()()) %% } -type create_service_request() :: #{binary() => any()}. @@ -1505,7 +1513,8 @@ %% <<"serviceConnectConfiguration">> => service_connect_configuration(), %% <<"serviceRegistries">> => list(service_registry()()), %% <<"taskDefinition">> => string(), -%% <<"volumeConfigurations">> => list(service_volume_configuration()()) +%% <<"volumeConfigurations">> => list(service_volume_configuration()()), +%% <<"vpcLatticeConfigurations">> => list(vpc_lattice_configuration()()) %% } -type update_service_request() :: #{binary() => any()}. @@ -2101,7 +2110,8 @@ %% <<"serviceRegistries">> => list(service_registry()()), %% <<"serviceRevisionArn">> => string(), %% <<"taskDefinition">> => string(), -%% <<"volumeConfigurations">> => list(service_volume_configuration()()) +%% <<"volumeConfigurations">> => list(service_volume_configuration()()), +%% <<"vpcLatticeConfigurations">> => list(vpc_lattice_configuration()()) %% } -type service_revision() :: #{binary() => any()}. @@ -2829,16 +2839,14 @@ %% @doc Creates a new capacity provider. %% -%% Capacity providers are associated with an Amazon ECS -%% cluster and are used in capacity provider strategies to facilitate cluster -%% auto -%% scaling. +%% Capacity providers are associated with an Amazon ECS cluster and are used +%% in capacity provider strategies to facilitate cluster auto scaling. %% %% Only capacity providers that use an Auto Scaling group can be created. -%% Amazon ECS tasks on -%% Fargate use the `FARGATE' and `FARGATE_SPOT' capacity providers. -%% These providers are available to all accounts in the Amazon Web Services -%% Regions that Fargate +%% Amazon ECS tasks on Fargate use +%% the `FARGATE' and `FARGATE_SPOT' capacity providers. These +%% providers are +%% available to all accounts in the Amazon Web Services Regions that Fargate %% supports. -spec create_capacity_provider(aws_client:aws_client(), create_capacity_provider_request()) -> {ok, create_capacity_provider_response(), tuple()} | @@ -2858,21 +2866,22 @@ create_capacity_provider(Client, Input, Options) %% @doc Creates a new Amazon ECS cluster. %% -%% By default, your account receives a `default' -%% cluster when you launch your first container instance. However, you can -%% create your own -%% cluster with a unique name. -%% -%% When you call the `CreateCluster' API operation, Amazon ECS attempts -%% to -%% create the Amazon ECS service-linked role for your account. This is so -%% that it can manage -%% required resources in other Amazon Web Services services on your behalf. -%% However, if the user that -%% makes the call doesn't have permissions to create the service-linked -%% role, it isn't -%% created. For more information, see Using -%% service-linked roles for Amazon ECS: +%% By default, your account receives a `default' cluster when +%% you launch your first container instance. However, you can create your own +%% cluster with a unique +%% name. +%% +%% When you call the CreateCluster: +%% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateCluster.html +%% API operation, +%% Amazon ECS attempts to create the Amazon ECS service-linked role for your +%% account. This is so that it can +%% manage required resources in other Amazon Web Services services on your +%% behalf. However, if the user that makes +%% the call doesn't have permissions to create the service-linked role, +%% it isn't created. For more +%% information, see Using service-linked +%% roles for Amazon ECS: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html %% in the Amazon Elastic Container Service Developer Guide. -spec create_cluster(aws_client:aws_client(), create_cluster_request()) -> @@ -2894,12 +2903,12 @@ create_cluster(Client, Input, Options) %% @doc Runs and maintains your desired number of tasks from a specified task %% definition. %% -%% If -%% the number of tasks running in a service drops below the -%% `desiredCount', -%% Amazon ECS runs another copy of the task in the specified cluster. To -%% update an existing -%% service, see the `UpdateService' action. +%% If the number of +%% tasks running in a service drops below the `desiredCount', Amazon ECS +%% runs another copy of the +%% task in the specified cluster. To update an existing service, use +%% UpdateService: +%% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateService.html. %% %% On March 21, 2024, a change was made to resolve the task definition %% revision before authorization. When a task definition revision is not @@ -2909,145 +2918,140 @@ create_cluster(Client, Input, Options) %% Amazon Elastic Inference (EI) is no longer available to customers. %% %% In addition to maintaining the desired count of tasks in your service, you -%% can -%% optionally run your service behind one or more load balancers. The load -%% balancers -%% distribute traffic across the tasks that are associated with the service. -%% For more -%% information, see Service load balancing: +%% can optionally run your +%% service behind one or more load balancers. The load balancers distribute +%% traffic across the tasks that +%% are associated with the service. For more information, see Service load +%% balancing: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html %% in the Amazon Elastic Container Service Developer Guide. %% %% You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the -%% volume when creating or -%% updating a service. `volumeConfigurations' is only supported for -%% REPLICA -%% service and not DAEMON service. For more infomation, see Amazon EBS +%% volume when creating or updating a +%% service. `volumeConfigurations' is only supported for REPLICA service +%% and not DAEMON +%% service. For more infomation, see Amazon EBS %% volumes: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types %% in the Amazon Elastic Container Service Developer Guide. %% %% Tasks for services that don't use a load balancer are considered -%% healthy if they're in -%% the `RUNNING' state. Tasks for services that use a load balancer are -%% considered healthy if they're in the `RUNNING' state and are -%% reported as -%% healthy by the load balancer. +%% healthy if they're in the +%% `RUNNING' state. Tasks for services that use a load balancer are +%% considered healthy if +%% they're in the `RUNNING' state and are reported as healthy by the +%% load balancer. %% %% There are two service scheduler strategies available: %% -%% `REPLICA' - The replica scheduling strategy places and -%% maintains your desired number of tasks across your cluster. By default, -%% the -%% service scheduler spreads tasks across Availability Zones. You can use -%% task -%% placement strategies and constraints to customize task placement -%% decisions. For -%% more information, see Service scheduler concepts: +%% `REPLICA' - The replica scheduling strategy places and maintains your +%% desired number of tasks across your cluster. By default, the service +%% scheduler spreads tasks +%% across Availability Zones. You can use task placement strategies and +%% constraints to customize +%% task placement decisions. For more information, see Service +%% scheduler concepts: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html %% in the Amazon Elastic Container Service Developer Guide. %% -%% `DAEMON' - The daemon scheduling strategy deploys exactly one -%% task on each active container instance that meets all of the task -%% placement -%% constraints that you specify in your cluster. The service scheduler also -%% evaluates the task placement constraints for running tasks. It also stops -%% tasks -%% that don't meet the placement constraints. When using this strategy, -%% you don't -%% need to specify a desired number of tasks, a task placement strategy, or -%% use -%% Service Auto Scaling policies. For more information, see Service scheduler -%% concepts: +%% `DAEMON' - The daemon scheduling strategy deploys exactly one task on +%% each +%% active container instance that meets all of the task placement constraints +%% that you specify in +%% your cluster. The service scheduler also evaluates the task placement +%% constraints for running +%% tasks. It also stops tasks that don't meet the placement constraints. +%% When using this strategy, +%% you don't need to specify a desired number of tasks, a task placement +%% strategy, or use Service +%% Auto Scaling policies. For more information, see Service +%% scheduler concepts: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html %% in the Amazon Elastic Container Service Developer Guide. %% %% You can optionally specify a deployment configuration for your service. -%% The deployment -%% is initiated by changing properties. For example, the deployment might be -%% initiated by -%% the task definition or by your desired count of a service. You can use -%% UpdateService: +%% The deployment is initiated +%% by changing properties. For example, the deployment might be initiated by +%% the task definition or by +%% your desired count of a service. You can use UpdateService: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateService.html. %% The default value for a replica service for %% `minimumHealthyPercent' is 100%. The default value for a daemon -%% service -%% for `minimumHealthyPercent' is 0%. +%% service for +%% `minimumHealthyPercent' is 0%. %% %% If a service uses the `ECS' deployment controller, the minimum healthy -%% percent represents a lower limit on the number of tasks in a service that -%% must remain in -%% the `RUNNING' state during a deployment. Specifically, it represents -%% it as a -%% percentage of your desired number of tasks (rounded up to the nearest -%% integer). This -%% happens when any of your container instances are in the `DRAINING' -%% state if -%% the service contains tasks using the EC2 launch type. Using this -%% parameter, you can deploy without using additional cluster capacity. For -%% example, if you -%% set your service to have desired number of four tasks and a minimum -%% healthy percent of -%% 50%, the scheduler might stop two existing tasks to free up cluster -%% capacity before -%% starting two new tasks. If they're in the `RUNNING' state, tasks -%% for services -%% that don't use a load balancer are considered healthy . If they're -%% in the -%% `RUNNING' state and reported as healthy by the load balancer, tasks -%% for -%% services that do use a load balancer are considered healthy . The +%% percent represents +%% a lower limit on the number of tasks in a service that must remain in the +%% `RUNNING' state +%% during a deployment. Specifically, it represents it as a percentage of +%% your desired number of tasks +%% (rounded up to the nearest integer). This happens when any of your +%% container instances are in the +%% `DRAINING' state if the service contains tasks using the EC2 launch +%% type. +%% Using this parameter, you can deploy without using additional cluster +%% capacity. For example, if you set +%% your service to have desired number of four tasks and a minimum healthy +%% percent of 50%, the scheduler +%% might stop two existing tasks to free up cluster capacity before starting +%% two new tasks. If they're in +%% the `RUNNING' state, tasks for services that don't use a load +%% balancer are considered +%% healthy . If they're in the `RUNNING' state and reported as +%% healthy by the load balancer, +%% tasks for services that do use a load balancer are considered healthy . +%% The %% default value for minimum healthy percent is 100%. %% -%% If a service uses the `ECS' deployment controller, the maximum percent -%% parameter represents an upper limit on the -%% number of tasks in a service that are allowed in the `RUNNING' or -%% `PENDING' state during a deployment. Specifically, it represents it as -%% a -%% percentage of the desired number of tasks (rounded down to the nearest -%% integer). This -%% happens when any of your container instances are in the `DRAINING' -%% state if -%% the service contains tasks using the EC2 launch type. Using this -%% parameter, you can define the deployment batch size. For example, if your -%% service has a -%% desired number of four tasks and a maximum percent value of 200%, the -%% scheduler may -%% start four new tasks before stopping the four older tasks (provided that -%% the cluster -%% resources required to do this are available). The default value for -%% maximum percent is -%% 200%. +%% If a service uses the `ECS' deployment controller, the maximum +%% percent parameter represents an upper limit on the number of tasks in a +%% service that are +%% allowed in the `RUNNING' or `PENDING' state during a deployment. +%% Specifically, it +%% represents it as a percentage of the desired number of tasks (rounded down +%% to the nearest integer). +%% This happens when any of your container instances are in the +%% `DRAINING' state if the service +%% contains tasks using the EC2 launch type. Using this parameter, you can +%% define the +%% deployment batch size. For example, if your service has a desired number +%% of four tasks and a maximum +%% percent value of 200%, the scheduler may start four new tasks before +%% stopping the four older tasks +%% (provided that the cluster resources required to do this are available). +%% The default value for maximum +%% percent is 200%. %% %% If a service uses either the `CODE_DEPLOY' or `EXTERNAL' -%% deployment controller types and tasks that use the EC2 launch type, the -%% minimum healthy percent and maximum percent values are used only to define -%% the lower and upper limit -%% on the number of the tasks in the service that remain in the `RUNNING' -%% state. -%% This is while the container instances are in the `DRAINING' state. If -%% the -%% tasks in the service use the Fargate launch type, the minimum healthy +%% deployment controller +%% types and tasks that use the EC2 launch type, the minimum healthy +%% percent and maximum percent values are used only to +%% define the lower and upper limit on the number of the tasks in the service +%% that remain in the +%% `RUNNING' state. This is while the container instances are in the +%% `DRAINING' +%% state. If the tasks in the service use the Fargate launch type, the +%% minimum healthy %% percent and maximum percent values aren't used. This is the case even -%% if they're -%% currently visible when describing your service. +%% if they're currently visible when +%% describing your service. %% %% When creating a service that uses the `EXTERNAL' deployment -%% controller, you -%% can specify only parameters that aren't controlled at the task set -%% level. The only -%% required parameter is the service name. You control your services using -%% the CreateTaskSet: +%% controller, you can specify +%% only parameters that aren't controlled at the task set level. The only +%% required parameter is the +%% service name. You control your services using the CreateTaskSet: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateTaskSet.html. -%% For more information, see Amazon ECS deployment types: +%% For more information, see Amazon ECS deployment +%% types: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html %% in the Amazon Elastic Container Service Developer Guide. %% %% When the service scheduler launches new tasks, it determines task -%% placement. For -%% information about task placement and task placement strategies, see Amazon -%% ECS -%% task placement: +%% placement. For information about +%% task placement and task placement strategies, see Amazon ECS task +%% placement: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement.html %% in the Amazon Elastic Container Service Developer Guide -spec create_service(aws_client:aws_client(), create_service_request()) -> @@ -3068,9 +3072,8 @@ create_service(Client, Input, Options) %% @doc Create a task set in the specified cluster and service. %% -%% This is used when a service -%% uses the `EXTERNAL' deployment controller type. For more information, -%% see +%% This is used when a service uses the +%% `EXTERNAL' deployment controller type. For more information, see %% Amazon ECS deployment %% types: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html @@ -3082,8 +3085,8 @@ create_service(Client, Input, Options) %% definition. %% %% For information about the maximum number of task sets and other quotas, -%% see Amazon ECS -%% service quotas: +%% see Amazon ECS service +%% quotas: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-quotas.html %% in the Amazon Elastic Container Service Developer Guide. -spec create_task_set(aws_client:aws_client(), create_task_set_request()) -> @@ -3103,8 +3106,7 @@ create_task_set(Client, Input, Options) request(Client, <<"CreateTaskSet">>, Input, Options). %% @doc Disables an account setting for a specified user, role, or the root -%% user for an -%% account. +%% user for an account. -spec delete_account_setting(aws_client:aws_client(), delete_account_setting_request()) -> {ok, delete_account_setting_response(), tuple()} | {error, any()} | @@ -3140,28 +3142,27 @@ delete_attributes(Client, Input, Options) %% @doc Deletes the specified capacity provider. %% -%% The `FARGATE' and `FARGATE_SPOT' capacity providers are -%% reserved and can't be deleted. You can disassociate them from a -%% cluster using either PutCapacityProviderProviders: +%% The `FARGATE' and `FARGATE_SPOT' capacity providers are reserved +%% and can't +%% be deleted. You can disassociate them from a cluster using either +%% PutCapacityProviderProviders: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutCapacityProviderProviders.html -%% or by deleting the -%% cluster. +%% or by deleting the cluster. %% %% Prior to a capacity provider being deleted, the capacity provider must be -%% removed from -%% the capacity provider strategy from all services. The UpdateService: +%% removed from the capacity +%% provider strategy from all services. The UpdateService: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateService.html -%% API can be used to remove a capacity provider from a service's -%% capacity provider -%% strategy. When updating a service, the `forceNewDeployment' option can -%% be -%% used to ensure that any tasks using the Amazon EC2 instance capacity -%% provided by the capacity -%% provider are transitioned to use the capacity from the remaining capacity -%% providers. -%% Only capacity providers that aren't associated with a cluster can be -%% deleted. To remove -%% a capacity provider from a cluster, you can either use +%% API can be used to +%% remove a capacity provider from a service's capacity provider +%% strategy. When updating a service, the +%% `forceNewDeployment' option can be used to ensure that any tasks using +%% the Amazon EC2 +%% instance capacity provided by the capacity provider are transitioned to +%% use the capacity from the +%% remaining capacity providers. Only capacity providers that aren't +%% associated with a cluster can be +%% deleted. To remove a capacity provider from a cluster, you can either use %% PutCapacityProviderProviders: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutCapacityProviderProviders.html %% or delete the cluster. @@ -3183,18 +3184,16 @@ delete_capacity_provider(Client, Input, Options) %% @doc Deletes the specified cluster. %% -%% The cluster transitions to the `INACTIVE' -%% state. Clusters with an `INACTIVE' status might remain discoverable in -%% your -%% account for a period of time. However, this behavior is subject to change -%% in the future. -%% We don't recommend that you rely on `INACTIVE' clusters -%% persisting. +%% The cluster transitions to the `INACTIVE' state. Clusters +%% with an `INACTIVE' status might remain discoverable in your account +%% for a period of time. +%% However, this behavior is subject to change in the future. We don't +%% recommend that you rely on +%% `INACTIVE' clusters persisting. %% %% You must deregister all container instances from this cluster before you -%% may delete -%% it. You can list the container instances in a cluster with -%% ListContainerInstances: +%% may delete it. You can list +%% the container instances in a cluster with ListContainerInstances: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListContainerInstances.html %% and deregister them with DeregisterContainerInstance: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeregisterContainerInstance.html. @@ -3216,37 +3215,38 @@ delete_cluster(Client, Input, Options) %% @doc Deletes a specified service within a cluster. %% -%% You can delete a service if you have no -%% running tasks in it and the desired task count is zero. If the service is -%% actively -%% maintaining tasks, you can't delete it, and you must update the -%% service to a desired -%% task count of zero. For more information, see UpdateService: +%% You can delete a service if you have no running tasks +%% in it and the desired task count is zero. If the service is actively +%% maintaining tasks, you can't +%% delete it, and you must update the service to a desired task count of +%% zero. For more information, see +%% UpdateService: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateService.html. %% %% When you delete a service, if there are still running tasks that require -%% cleanup, -%% the service status moves from `ACTIVE' to `DRAINING', and the -%% service is no longer visible in the console or in the ListServices: +%% cleanup, the service +%% status moves from `ACTIVE' to `DRAINING', and the service is no +%% longer +%% visible in the console or in the ListServices: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListServices.html -%% API operation. After all tasks have transitioned to either `STOPPING' -%% or -%% `STOPPED' status, the service status moves from `DRAINING' -%% to `INACTIVE'. Services in the `DRAINING' or -%% `INACTIVE' status can still be viewed with the DescribeServices: +%% API operation. +%% After all tasks have transitioned to either `STOPPING' or +%% `STOPPED' status, +%% the service status moves from `DRAINING' to `INACTIVE'. Services +%% in the +%% `DRAINING' or `INACTIVE' status can still be viewed with the +%% DescribeServices: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeServices.html -%% API operation. However, in the future, -%% `INACTIVE' services may be cleaned up and purged from Amazon ECS -%% record -%% keeping, and DescribeServices: +%% API operation. However, in the future, `INACTIVE' services +%% may be cleaned up and purged from Amazon ECS record keeping, and +%% DescribeServices: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeServices.html -%% calls on those services return a -%% `ServiceNotFoundException' error. +%% calls on +%% those services return a `ServiceNotFoundException' error. %% %% If you attempt to create a new service with the same name as an existing -%% service -%% in either `ACTIVE' or `DRAINING' status, you receive an -%% error. +%% service in either +%% `ACTIVE' or `DRAINING' status, you receive an error. -spec delete_service(aws_client:aws_client(), delete_service_request()) -> {ok, delete_service_response(), tuple()} | {error, any()} | @@ -3266,39 +3266,38 @@ delete_service(Client, Input, Options) %% @doc Deletes one or more task definitions. %% %% You must deregister a task definition revision before you delete it. For -%% more -%% information, see DeregisterTaskDefinition: +%% more information, see DeregisterTaskDefinition: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeregisterTaskDefinition.html. %% %% When you delete a task definition revision, it is immediately transitions %% from the -%% `INACTIVE' to `DELETE_IN_PROGRESS'. Existing tasks and -%% services that reference a `DELETE_IN_PROGRESS' task definition -%% revision -%% continue to run without disruption. Existing services that reference a -%% `DELETE_IN_PROGRESS' task definition revision can still scale up or -%% down -%% by modifying the service's desired count. +%% `INACTIVE' to `DELETE_IN_PROGRESS'. Existing tasks and services +%% that +%% reference a `DELETE_IN_PROGRESS' task definition revision continue to +%% run without +%% disruption. Existing services that reference a `DELETE_IN_PROGRESS' +%% task definition revision +%% can still scale up or down by modifying the service's desired count. %% %% You can't use a `DELETE_IN_PROGRESS' task definition revision to -%% run new -%% tasks or create new services. You also can't update an existing -%% service to reference a -%% `DELETE_IN_PROGRESS' task definition revision. +%% run new tasks or create +%% new services. You also can't update an existing service to reference a +%% `DELETE_IN_PROGRESS' +%% task definition revision. %% %% A task definition revision will stay in `DELETE_IN_PROGRESS' status -%% until -%% all the associated tasks and services have been terminated. +%% until all the +%% associated tasks and services have been terminated. %% %% When you delete all `INACTIVE' task definition revisions, the task -%% definition name is not displayed in the console and not returned in the -%% API. If a task -%% definition revisions are in the `DELETE_IN_PROGRESS' state, the task -%% definition name is displayed in the console and returned in the API. The -%% task definition -%% name is retained by Amazon ECS and the revision is incremented the next -%% time you create a -%% task definition with that name. +%% definition name is not +%% displayed in the console and not returned in the API. If a task definition +%% revisions are in the +%% `DELETE_IN_PROGRESS' state, the task definition name is displayed in +%% the console and +%% returned in the API. The task definition name is retained by Amazon ECS +%% and the revision is incremented the +%% next time you create a task definition with that name. -spec delete_task_definitions(aws_client:aws_client(), delete_task_definitions_request()) -> {ok, delete_task_definitions_response(), tuple()} | {error, any()} | @@ -3319,7 +3318,8 @@ delete_task_definitions(Client, Input, Options) %% %% This is used when a service uses the %% `EXTERNAL' deployment controller type. For more information, see -%% Amazon ECS deployment types: +%% Amazon ECS deployment +%% types: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html %% in the Amazon Elastic Container Service Developer Guide. -spec delete_task_set(aws_client:aws_client(), delete_task_set_request()) -> @@ -3341,27 +3341,26 @@ delete_task_set(Client, Input, Options) %% @doc Deregisters an Amazon ECS container instance from the specified %% cluster. %% -%% This instance is -%% no longer available to run tasks. +%% This instance is no longer +%% available to run tasks. %% %% If you intend to use the container instance for some other purpose after -%% deregistration, we recommend that you stop all of the tasks running on the -%% container -%% instance before deregistration. That prevents any orphaned tasks from -%% consuming -%% resources. +%% deregistration, we recommend +%% that you stop all of the tasks running on the container instance before +%% deregistration. That prevents +%% any orphaned tasks from consuming resources. %% %% Deregistering a container instance removes the instance from a cluster, -%% but it doesn't -%% terminate the EC2 instance. If you are finished using the instance, be -%% sure to terminate -%% it in the Amazon EC2 console to stop billing. +%% but it doesn't terminate the +%% EC2 instance. If you are finished using the instance, be sure to terminate +%% it in the Amazon EC2 console to +%% stop billing. %% %% If you terminate a running container instance, Amazon ECS automatically -%% deregisters the -%% instance from your cluster (stopped container instances or instances with -%% disconnected agents aren't automatically deregistered when -%% terminated). +%% deregisters the instance from +%% your cluster (stopped container instances or instances with disconnected +%% agents aren't +%% automatically deregistered when terminated). -spec deregister_container_instance(aws_client:aws_client(), deregister_container_instance_request()) -> {ok, deregister_container_instance_response(), tuple()} | {error, any()} | @@ -3380,36 +3379,35 @@ deregister_container_instance(Client, Input, Options) %% @doc Deregisters the specified task definition by family and revision. %% -%% Upon deregistration, -%% the task definition is marked as `INACTIVE'. Existing tasks and -%% services that -%% reference an `INACTIVE' task definition continue to run without -%% disruption. -%% Existing services that reference an `INACTIVE' task definition can -%% still -%% scale up or down by modifying the service's desired count. If you want -%% to delete a task -%% definition revision, you must first deregister the task definition -%% revision. +%% Upon deregistration, the task +%% definition is marked as `INACTIVE'. Existing tasks and services that +%% reference an +%% `INACTIVE' task definition continue to run without disruption. +%% Existing services that +%% reference an `INACTIVE' task definition can still scale up or down by +%% modifying the +%% service's desired count. If you want to delete a task definition +%% revision, you must first deregister +%% the task definition revision. %% %% You can't use an `INACTIVE' task definition to run new tasks or -%% create new -%% services, and you can't update an existing service to reference an -%% `INACTIVE' -%% task definition. However, there may be up to a 10-minute window following -%% deregistration -%% where these restrictions have not yet taken effect. +%% create new services, and +%% you can't update an existing service to reference an `INACTIVE' +%% task definition. However, +%% there may be up to a 10-minute window following deregistration where these +%% restrictions have not yet +%% taken effect. %% %% At this time, `INACTIVE' task definitions remain discoverable in your -%% account indefinitely. However, this behavior is subject to change in the -%% future. We -%% don't recommend that you rely on `INACTIVE' task definitions -%% persisting -%% beyond the lifecycle of any associated tasks and services. +%% account +%% indefinitely. However, this behavior is subject to change in the future. +%% We don't recommend that +%% you rely on `INACTIVE' task definitions persisting beyond the +%% lifecycle of any +%% associated tasks and services. %% %% You must deregister a task definition revision before you delete it. For -%% more -%% information, see DeleteTaskDefinitions: +%% more information, see DeleteTaskDefinitions: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeleteTaskDefinitions.html. -spec deregister_task_definition(aws_client:aws_client(), deregister_task_definition_request()) -> {ok, deregister_task_definition_response(), tuple()} | @@ -3463,8 +3461,8 @@ describe_clusters(Client, Input, Options) %% @doc Describes one or more container instances. %% -%% Returns metadata about each container -%% instance requested. +%% Returns metadata about each container instance +%% requested. -spec describe_container_instances(aws_client:aws_client(), describe_container_instances_request()) -> {ok, describe_container_instances_response(), tuple()} | {error, any()} | @@ -3549,15 +3547,14 @@ describe_services(Client, Input, Options) %% @doc Describes a task definition. %% -%% You can specify a `family' and -%% `revision' to find information about a specific task definition, or -%% you -%% can simply specify the family to find the latest `ACTIVE' revision in -%% that -%% family. +%% You can specify a `family' and `revision' to find +%% information about a specific task definition, or you can simply specify +%% the family to find the latest +%% `ACTIVE' revision in that family. %% %% You can only describe `INACTIVE' task definitions while an active task -%% or service references them. +%% or service +%% references them. -spec describe_task_definition(aws_client:aws_client(), describe_task_definition_request()) -> {ok, describe_task_definition_response(), tuple()} | {error, any()} | @@ -3576,10 +3573,9 @@ describe_task_definition(Client, Input, Options) %% @doc Describes the task sets in the specified cluster and service. %% -%% This is used when a -%% service uses the `EXTERNAL' deployment controller type. For more -%% information, -%% see Amazon ECS Deployment +%% This is used when a service uses the +%% `EXTERNAL' deployment controller type. For more information, see +%% Amazon ECS Deployment %% Types: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html %% in the Amazon Elastic Container Service Developer Guide. @@ -3605,10 +3601,10 @@ describe_task_sets(Client, Input, Options) %% hour. %% %% If you have tasks with tags, and then delete the cluster, the tagged tasks -%% are -%% returned in the response. If you create a new cluster with the same name -%% as the deleted -%% cluster, the tagged tasks are not included in the response. +%% are returned in the +%% response. If you create a new cluster with the same name as the deleted +%% cluster, the tagged tasks are +%% not included in the response. -spec describe_tasks(aws_client:aws_client(), describe_tasks_request()) -> {ok, describe_tasks_response(), tuple()} | {error, any()} | @@ -3649,17 +3645,17 @@ discover_poll_endpoint(Client, Input, Options) %% @doc Runs a command remotely on a container within a task. %% %% If you use a condition key in your IAM policy to refine the conditions for -%% the -%% policy statement, for example limit the actions to a specific cluster, you -%% receive an -%% `AccessDeniedException' when there is a mismatch between the condition -%% key value and the corresponding parameter value. +%% the policy statement, +%% for example limit the actions to a specific cluster, you receive an +%% `AccessDeniedException' +%% when there is a mismatch between the condition key value and the +%% corresponding parameter value. %% %% For information about required permissions and considerations, see Using -%% Amazon ECS -%% Exec for debugging: +%% Amazon ECS Exec for debugging: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html -%% in the Amazon ECS Developer Guide. +%% in the +%% Amazon ECS Developer Guide. -spec execute_command(aws_client:aws_client(), execute_command_request()) -> {ok, execute_command_response(), tuple()} | {error, any()} | @@ -3713,15 +3709,15 @@ list_account_settings(Client, Input, Options) %% @doc Lists the attributes for Amazon ECS resources within a specified %% target type and cluster. %% -%% When you specify a target type and cluster, `ListAttributes' returns a -%% list -%% of attribute objects, one for each attribute on each resource. You can -%% filter the list -%% of results to a single attribute name to only return results that have -%% that name. You -%% can also filter the results by attribute name and value. You can do this, -%% for example, -%% to see which container instances in a cluster are running a Linux AMI +%% When you specify +%% a target type and cluster, `ListAttributes' returns a list of +%% attribute objects, one for +%% each attribute on each resource. You can filter the list of results to a +%% single attribute name to only +%% return results that have that name. You can also filter the results by +%% attribute name and value. You +%% can do this, for example, to see which container instances in a cluster +%% are running a Linux AMI %% (`ecs.os-type=linux'). -spec list_attributes(aws_client:aws_client(), list_attributes_request()) -> {ok, list_attributes_response(), tuple()} | @@ -3758,11 +3754,11 @@ list_clusters(Client, Input, Options) %% @doc Returns a list of container instances in a specified cluster. %% -%% You can filter the -%% results of a `ListContainerInstances' operation with cluster query -%% language -%% statements inside the `filter' parameter. For more information, see -%% Cluster Query Language: +%% You can filter the results of a +%% `ListContainerInstances' operation with cluster query language +%% statements inside the +%% `filter' parameter. For more information, see Cluster +%% Query Language: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html %% in the Amazon Elastic Container Service Developer Guide. -spec list_container_instances(aws_client:aws_client(), list_container_instances_request()) -> @@ -3811,8 +3807,8 @@ list_service_deployments(Client, Input, Options) %% @doc Returns a list of services. %% -%% You can filter the results by cluster, launch type, and -%% scheduling strategy. +%% You can filter the results by cluster, launch type, and scheduling +%% strategy. -spec list_services(aws_client:aws_client(), list_services_request()) -> {ok, list_services_response(), tuple()} | {error, any()} | @@ -3830,14 +3826,15 @@ list_services(Client, Input, Options) request(Client, <<"ListServices">>, Input, Options). %% @doc This operation lists all of the services that are associated with a -%% Cloud Map -%% namespace. -%% -%% This list might include services in different clusters. In contrast, -%% `ListServices' can only list services in one cluster at a time. If you -%% need to filter the list of services in a single cluster by various -%% parameters, use -%% `ListServices'. For more information, see Service Connect: +%% Cloud Map namespace. +%% +%% This list +%% might include services in different clusters. In contrast, +%% `ListServices' can only list +%% services in one cluster at a time. If you need to filter the list of +%% services in a single cluster by +%% various parameters, use `ListServices'. For more information, see +%% Service Connect: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html %% in the Amazon Elastic Container Service Developer Guide. -spec list_services_by_namespace(aws_client:aws_client(), list_services_by_namespace_request()) -> @@ -3876,16 +3873,15 @@ list_tags_for_resource(Client, Input, Options) %% @doc Returns a list of task definition families that are registered to %% your account. %% -%% This -%% list includes task definition families that no longer have any -%% `ACTIVE' task +%% This list includes +%% task definition families that no longer have any `ACTIVE' task %% definition revisions. %% %% You can filter out task definition families that don't contain any -%% `ACTIVE' -%% task definition revisions by setting the `status' parameter to -%% `ACTIVE'. You can also filter the results with the -%% `familyPrefix' parameter. +%% `ACTIVE' task +%% definition revisions by setting the `status' parameter to +%% `ACTIVE'. You can also +%% filter the results with the `familyPrefix' parameter. -spec list_task_definition_families(aws_client:aws_client(), list_task_definition_families_request()) -> {ok, list_task_definition_families_response(), tuple()} | {error, any()} | @@ -3905,10 +3901,10 @@ list_task_definition_families(Client, Input, Options) %% @doc Returns a list of task definitions that are registered to your %% account. %% -%% You can filter -%% the results by family name with the `familyPrefix' parameter or by -%% status -%% with the `status' parameter. +%% You can filter the results by +%% family name with the `familyPrefix' parameter or by status with the +%% `status' +%% parameter. -spec list_task_definitions(aws_client:aws_client(), list_task_definitions_request()) -> {ok, list_task_definitions_response(), tuple()} | {error, any()} | @@ -3927,10 +3923,10 @@ list_task_definitions(Client, Input, Options) %% @doc Returns a list of tasks. %% -%% You can filter the results by cluster, task definition -%% family, container instance, launch type, what IAM principal started the -%% task, or by -%% the desired status of the task. +%% You can filter the results by cluster, task definition family, container +%% instance, launch type, what IAM principal started the task, or by the +%% desired status of the +%% task. %% %% Recently stopped tasks might appear in the returned results. -spec list_tasks(aws_client:aws_client(), list_tasks_request()) -> @@ -3954,13 +3950,12 @@ list_tasks(Client, Input, Options) %% Account settings are set on a per-Region basis. %% %% If you change the root user account setting, the default settings are -%% reset for users and -%% roles that do not have specified individual account settings. For more -%% information, see -%% Account -%% Settings: +%% reset for users and roles that do +%% not have specified individual account settings. For more information, see +%% Account Settings: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html -%% in the Amazon Elastic Container Service Developer Guide. +%% in the +%% Amazon Elastic Container Service Developer Guide. -spec put_account_setting(aws_client:aws_client(), put_account_setting_request()) -> {ok, put_account_setting_response(), tuple()} | {error, any()} | @@ -3978,8 +3973,8 @@ put_account_setting(Client, Input, Options) request(Client, <<"PutAccountSetting">>, Input, Options). %% @doc Modifies an account setting for all users on an account for whom no -%% individual account -%% setting has been specified. +%% individual account setting has +%% been specified. %% %% Account settings are set on a per-Region basis. -spec put_account_setting_default(aws_client:aws_client(), put_account_setting_default_request()) -> @@ -4000,13 +3995,12 @@ put_account_setting_default(Client, Input, Options) %% @doc Create or update an attribute on an Amazon ECS resource. %% -%% If the attribute doesn't exist, -%% it's created. If the attribute exists, its value is replaced with the -%% specified value. -%% To delete an attribute, use DeleteAttributes: +%% If the attribute doesn't exist, it's created. If +%% the attribute exists, its value is replaced with the specified value. To +%% delete an attribute, use +%% DeleteAttributes: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeleteAttributes.html. -%% For more information, -%% see Attributes: +%% For more information, see Attributes: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes %% in the Amazon Elastic Container Service Developer Guide. -spec put_attributes(aws_client:aws_client(), put_attributes_request()) -> @@ -4026,33 +4020,30 @@ put_attributes(Client, Input, Options) request(Client, <<"PutAttributes">>, Input, Options). %% @doc Modifies the available capacity providers and the default capacity -%% provider strategy -%% for a cluster. +%% provider strategy for a +%% cluster. %% %% You must specify both the available capacity providers and a default -%% capacity provider -%% strategy for the cluster. If the specified cluster has existing capacity -%% providers -%% associated with it, you must specify all existing capacity providers in -%% addition to any -%% new ones you want to add. Any existing capacity providers that are -%% associated with a -%% cluster that are omitted from a PutClusterCapacityProviders: +%% capacity provider strategy for +%% the cluster. If the specified cluster has existing capacity providers +%% associated with it, you must +%% specify all existing capacity providers in addition to any new ones you +%% want to add. Any existing +%% capacity providers that are associated with a cluster that are omitted +%% from a PutClusterCapacityProviders: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutClusterCapacityProviders.html -%% API call -%% will be disassociated with the cluster. You can only disassociate an -%% existing capacity -%% provider from a cluster if it's not being used by any existing tasks. +%% API call will be disassociated with the cluster. You can only +%% disassociate an existing capacity provider from a cluster if it's not +%% being used by any existing +%% tasks. %% %% When creating a service or running a task on a cluster, if no capacity -%% provider or -%% launch type is specified, then the cluster's default capacity provider -%% strategy is used. -%% We recommend that you define a default capacity provider strategy for your -%% cluster. -%% However, you must specify an empty array (`[]') to bypass defining a -%% default -%% strategy. +%% provider or launch type is +%% specified, then the cluster's default capacity provider strategy is +%% used. We recommend that you define +%% a default capacity provider strategy for your cluster. However, you must +%% specify an empty array +%% (`[]') to bypass defining a default strategy. -spec put_cluster_capacity_providers(aws_client:aws_client(), put_cluster_capacity_providers_request()) -> {ok, put_cluster_capacity_providers_response(), tuple()} | {error, any()} | @@ -4074,8 +4065,8 @@ put_cluster_capacity_providers(Client, Input, Options) %% for use outside of the agent. %% %% Registers an EC2 instance into the specified cluster. This instance -%% becomes available -%% to place containers on. +%% becomes available to place +%% containers on. -spec register_container_instance(aws_client:aws_client(), register_container_instance_request()) -> {ok, register_container_instance_response(), tuple()} | {error, any()} | @@ -4095,33 +4086,36 @@ register_container_instance(Client, Input, Options) %% @doc Registers a new task definition from the supplied `family' and %% `containerDefinitions'. %% -%% Optionally, you can add data volumes to your -%% containers with the `volumes' parameter. For more information about -%% task -%% definition parameters and defaults, see Amazon ECS Task +%% Optionally, you can add data volumes to your containers with the +%% `volumes' parameter. For more information about task definition +%% parameters and defaults, +%% see Amazon ECS Task %% Definitions: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html %% in the Amazon Elastic Container Service Developer Guide. %% %% You can specify a role for your task with the `taskRoleArn' parameter. -%% When -%% you specify a role for a task, its containers can then use the latest -%% versions of the -%% CLI or SDKs to make API requests to the Amazon Web Services services that -%% are specified in the -%% policy that's associated with the role. For more information, see IAM -%% Roles for Tasks: +%% When you specify a +%% role for a task, its containers can then use the latest versions of the +%% CLI or SDKs to make API +%% requests to the Amazon Web Services services that are specified in the +%% policy that's associated with the role. For +%% more information, see IAM Roles for Tasks: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html -%% in the Amazon Elastic Container Service Developer Guide. +%% in the +%% Amazon Elastic Container Service Developer Guide. %% %% You can specify a Docker networking mode for the containers in your task -%% definition -%% with the `networkMode' parameter. If you specify the `awsvpc' -%% network mode, the task is allocated an elastic network interface, and you -%% must specify a NetworkConfiguration: +%% definition with the +%% `networkMode' parameter. If you specify the `awsvpc' network mode, +%% the task +%% is allocated an elastic network interface, and you must specify a +%% NetworkConfiguration: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_NetworkConfiguration.html -%% when you create a service or run a task with -%% the task definition. For more information, see Task Networking: +%% when +%% you create a service or run a task with the task definition. For more +%% information, see Task +%% Networking: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html %% in the Amazon Elastic Container Service Developer Guide. -spec register_task_definition(aws_client:aws_client(), register_task_definition_request()) -> @@ -4150,52 +4144,50 @@ register_task_definition(Client, Input, Options) %% Amazon Elastic Inference (EI) is no longer available to customers. %% %% You can allow Amazon ECS to place tasks for you, or you can customize how -%% Amazon ECS places -%% tasks using placement constraints and placement strategies. For more -%% information, see -%% Scheduling Tasks: +%% Amazon ECS places tasks using +%% placement constraints and placement strategies. For more information, see +%% Scheduling +%% Tasks: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html %% in the Amazon Elastic Container Service Developer Guide. %% %% Alternatively, you can use `StartTask' to use your own scheduler or -%% place tasks manually on specific container instances. +%% place tasks manually +%% on specific container instances. %% %% You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the -%% volume when creating or -%% updating a service. For more infomation, see Amazon EBS volumes: +%% volume when creating or updating a +%% service. For more infomation, see Amazon EBS +%% volumes: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types %% in the Amazon Elastic Container Service Developer Guide. %% %% The Amazon ECS API follows an eventual consistency model. This is because -%% of the -%% distributed nature of the system supporting the API. This means that the -%% result of an -%% API command you run that affects your Amazon ECS resources might not be -%% immediately visible -%% to all subsequent commands you run. Keep this in mind when you carry out -%% an API command -%% that immediately follows a previous API command. +%% of the distributed nature of the +%% system supporting the API. This means that the result of an API command +%% you run that affects your Amazon ECS +%% resources might not be immediately visible to all subsequent commands you +%% run. Keep this in mind when +%% you carry out an API command that immediately follows a previous API +%% command. %% %% To manage eventual consistency, you can do the following: %% %% Confirm the state of the resource before you run a command to modify it. -%% Run -%% the DescribeTasks command using an exponential backoff algorithm to ensure -%% that -%% you allow enough time for the previous command to propagate through the -%% system. -%% To do this, run the DescribeTasks command repeatedly, starting with a -%% couple of -%% seconds of wait time and increasing gradually up to five minutes of wait -%% time. +%% Run the +%% DescribeTasks command using an exponential backoff algorithm to ensure +%% that you allow enough +%% time for the previous command to propagate through the system. To do this, +%% run the +%% DescribeTasks command repeatedly, starting with a couple of seconds of +%% wait time and increasing +%% gradually up to five minutes of wait time. %% %% Add wait time between subsequent commands, even if the DescribeTasks -%% command -%% returns an accurate response. Apply an exponential backoff algorithm -%% starting -%% with a couple of seconds of wait time, and increase gradually up to about -%% five -%% minutes of wait time. +%% command returns an +%% accurate response. Apply an exponential backoff algorithm starting with a +%% couple of seconds of +%% wait time, and increase gradually up to about five minutes of wait time. -spec run_task(aws_client:aws_client(), run_task_request()) -> {ok, run_task_response(), tuple()} | {error, any()} | @@ -4213,8 +4205,8 @@ run_task(Client, Input, Options) request(Client, <<"RunTask">>, Input, Options). %% @doc Starts a new task from the specified task definition on the specified -%% container -%% instance or instances. +%% container instance or +%% instances. %% %% On March 21, 2024, a change was made to resolve the task definition %% revision before authorization. When a task definition revision is not @@ -4224,13 +4216,16 @@ run_task(Client, Input, Options) %% Amazon Elastic Inference (EI) is no longer available to customers. %% %% Alternatively, you can use`RunTask' to place tasks for you. For more -%% information, see Scheduling Tasks: +%% information, see +%% Scheduling +%% Tasks: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html %% in the Amazon Elastic Container Service Developer Guide. %% %% You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the -%% volume when creating or -%% updating a service. For more infomation, see Amazon EBS volumes: +%% volume when creating or updating a +%% service. For more infomation, see Amazon EBS +%% volumes: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types %% in the Amazon Elastic Container Service Developer Guide. -spec start_task(aws_client:aws_client(), start_task_request()) -> @@ -4253,31 +4248,29 @@ start_task(Client, Input, Options) %% %% Any tags associated with the task will be deleted. %% -%% When you call `StopTask' on a task, the equivalent of -%% ``` -%% docker stop''' is issued to the containers running in the -%% task. This results in a -%% `SIGTERM' value and a default 30-second timeout, after which the -%% `SIGKILL' value is sent and the containers are forcibly stopped. If -%% the -%% container handles the `SIGTERM' value gracefully and exits within 30 -%% seconds +%% When you call `StopTask' on a task, the equivalent of `docker +%% stop' is issued +%% to the containers running in the task. This results in a `SIGTERM' +%% value and a default +%% 30-second timeout, after which the `SIGKILL' value is sent and the +%% containers are forcibly +%% stopped. If the container handles the `SIGTERM' value gracefully and +%% exits within 30 seconds %% from receiving it, no `SIGKILL' value is sent. %% %% For Windows containers, POSIX signals do not work and runtime stops the -%% container by -%% sending a `CTRL_SHUTDOWN_EVENT'. For more information, see Unable to -%% react to graceful shutdown -%% of (Windows) container #25982: https://github.com/moby/moby/issues/25982 -%% on GitHub. +%% container by sending a +%% `CTRL_SHUTDOWN_EVENT'. For more information, see Unable to react to +%% graceful shutdown of (Windows) +%% container #25982: https://github.com/moby/moby/issues/25982 on GitHub. %% %% The default 30-second timeout can be configured on the Amazon ECS -%% container agent with -%% the `ECS_CONTAINER_STOP_TIMEOUT' variable. For more information, see -%% Amazon ECS Container Agent Configuration: +%% container agent with the +%% `ECS_CONTAINER_STOP_TIMEOUT' variable. For more information, see +%% Amazon ECS +%% Container Agent Configuration: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html -%% in the -%% Amazon Elastic Container Service Developer Guide. +%% in the Amazon Elastic Container Service Developer Guide. -spec stop_task(aws_client:aws_client(), stop_task_request()) -> {ok, stop_task_response(), tuple()} | {error, any()} | @@ -4360,10 +4353,11 @@ submit_task_state_change(Client, Input, Options) %% @doc Associates the specified tags to a resource with the specified %% `resourceArn'. %% -%% If existing tags on a resource aren't specified in the -%% request parameters, they aren't changed. When a resource is deleted, -%% the tags that are -%% associated with that resource are deleted as well. +%% If existing +%% tags on a resource aren't specified in the request parameters, they +%% aren't changed. When a resource is +%% deleted, the tags that are associated with that resource are deleted as +%% well. -spec tag_resource(aws_client:aws_client(), tag_resource_request()) -> {ok, tag_resource_response(), tuple()} | {error, any()} | @@ -4451,35 +4445,35 @@ update_cluster_settings(Client, Input, Options) %% @doc Updates the Amazon ECS container agent on a specified container %% instance. %% -%% Updating the -%% Amazon ECS container agent doesn't interrupt running tasks or services -%% on the container -%% instance. The process for updating the agent differs depending on whether -%% your container -%% instance was launched with the Amazon ECS-optimized AMI or another -%% operating system. +%% Updating the Amazon ECS container +%% agent doesn't interrupt running tasks or services on the container +%% instance. The process for updating +%% the agent differs depending on whether your container instance was +%% launched with the Amazon ECS-optimized +%% AMI or another operating system. %% %% The `UpdateContainerAgent' API isn't supported for container -%% instances -%% using the Amazon ECS-optimized Amazon Linux 2 (arm64) AMI. To update the -%% container agent, -%% you can update the `ecs-init' package. This updates the agent. For -%% more -%% information, see Updating the -%% Amazon ECS container agent: +%% instances using the +%% Amazon ECS-optimized Amazon Linux 2 (arm64) AMI. To update the container +%% agent, you can update the +%% `ecs-init' package. This updates the agent. For more information, see +%% Updating +%% the Amazon ECS container agent: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/agent-update-ecs-ami.html %% in the Amazon Elastic Container Service Developer Guide. %% %% Agent updates with the `UpdateContainerAgent' API operation do not -%% apply to Windows container instances. We recommend that you launch new -%% container -%% instances to update the agent version in your Windows clusters. +%% apply to Windows +%% container instances. We recommend that you launch new container instances +%% to update the agent +%% version in your Windows clusters. %% %% The `UpdateContainerAgent' API requires an Amazon ECS-optimized AMI or -%% Amazon -%% Linux AMI with the `ecs-init' service installed and running. For help -%% updating the Amazon ECS container agent on other operating systems, see -%% Manually updating the Amazon ECS container agent: +%% Amazon Linux AMI with +%% the `ecs-init' service installed and running. For help updating the +%% Amazon ECS container agent on +%% other operating systems, see Manually updating +%% the Amazon ECS container agent: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html#manually_update_agent %% in the Amazon Elastic Container Service Developer Guide. -spec update_container_agent(aws_client:aws_client(), update_container_agent_request()) -> @@ -4501,75 +4495,77 @@ update_container_agent(Client, Input, Options) %% @doc Modifies the status of an Amazon ECS container instance. %% %% Once a container instance has reached an `ACTIVE' state, you can -%% change the -%% status of a container instance to `DRAINING' to manually remove an -%% instance -%% from a cluster, for example to perform system updates, update the Docker -%% daemon, or -%% scale down the cluster size. +%% change the status of a +%% container instance to `DRAINING' to manually remove an instance from a +%% cluster, for example +%% to perform system updates, update the Docker daemon, or scale down the +%% cluster size. %% %% A container instance can't be changed to `DRAINING' until it has -%% reached an `ACTIVE' status. If the instance is in any other status, an -%% error will be received. +%% reached an +%% `ACTIVE' status. If the instance is in any other status, an error will +%% be +%% received. %% %% When you set a container instance to `DRAINING', Amazon ECS prevents -%% new tasks -%% from being scheduled for placement on the container instance and -%% replacement service -%% tasks are started on other container instances in the cluster if the -%% resources are -%% available. Service tasks on the container instance that are in the -%% `PENDING' -%% state are stopped immediately. +%% new tasks from being +%% scheduled for placement on the container instance and replacement service +%% tasks are started on other +%% container instances in the cluster if the resources are available. Service +%% tasks on the container +%% instance that are in the `PENDING' state are stopped immediately. %% %% Service tasks on the container instance that are in the `RUNNING' -%% state are -%% stopped and replaced according to the service's deployment -%% configuration parameters, -%% `minimumHealthyPercent' and `maximumPercent'. You can change -%% the deployment configuration of your service using UpdateService: +%% state are stopped and +%% replaced according to the service's deployment configuration +%% parameters, +%% `minimumHealthyPercent' and `maximumPercent'. You can change the +%% deployment +%% configuration of your service using UpdateService: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateService.html. %% %% If `minimumHealthyPercent' is below 100%, the scheduler can ignore %% `desiredCount' temporarily during task replacement. For example, -%% `desiredCount' is four tasks, a minimum of 50% allows the -%% scheduler to stop two existing tasks before starting two new tasks. If the -%% minimum is 100%, the service scheduler can't remove existing tasks -%% until the -%% replacement tasks are considered healthy. Tasks for services that do not -%% use a -%% load balancer are considered healthy if they're in the `RUNNING' -%% state. Tasks for services that use a load balancer are considered healthy -%% if -%% they're in the `RUNNING' state and are reported as healthy by the -%% load balancer. -%% -%% The `maximumPercent' parameter represents an upper limit on the -%% number of running tasks during task replacement. You can use this to -%% define the -%% replacement batch size. For example, if `desiredCount' is four tasks, -%% a maximum of 200% starts four new tasks before stopping the four tasks to -%% be -%% drained, provided that the cluster resources required to do this are -%% available. -%% If the maximum is 100%, then replacement tasks can't start until the -%% draining -%% tasks have stopped. +%% `desiredCount' is four tasks, a minimum of 50% allows the scheduler to +%% stop two +%% existing tasks before starting two new tasks. If the minimum is 100%, the +%% service scheduler +%% can't remove existing tasks until the replacement tasks are considered +%% healthy. Tasks for +%% services that do not use a load balancer are considered healthy if +%% they're in the +%% `RUNNING' state. Tasks for services that use a load balancer are +%% considered +%% healthy if they're in the `RUNNING' state and are reported as +%% healthy by the load +%% balancer. +%% +%% The `maximumPercent' parameter represents an upper limit on the number +%% of running +%% tasks during task replacement. You can use this to define the replacement +%% batch size. For +%% example, if `desiredCount' is four tasks, a maximum of 200% starts +%% four new tasks +%% before stopping the four tasks to be drained, provided that the cluster +%% resources required to +%% do this are available. If the maximum is 100%, then replacement tasks +%% can't start until the +%% draining tasks have stopped. %% %% Any `PENDING' or `RUNNING' tasks that do not belong to a service -%% aren't affected. You must wait for them to finish or stop them -%% manually. +%% aren't +%% affected. You must wait for them to finish or stop them manually. %% %% A container instance has completed draining when it has no more -%% `RUNNING' -%% tasks. You can verify this using ListTasks: +%% `RUNNING' tasks. You can +%% verify this using ListTasks: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListTasks.html. %% %% When a container instance has been drained, you can set a container -%% instance to -%% `ACTIVE' status and once it has reached that status the Amazon ECS -%% scheduler -%% can begin scheduling tasks on the instance again. +%% instance to `ACTIVE' +%% status and once it has reached that status the Amazon ECS scheduler can +%% begin scheduling tasks on the +%% instance again. -spec update_container_instances_state(aws_client:aws_client(), update_container_instances_state_request()) -> {ok, update_container_instances_state_response(), tuple()} | {error, any()} | @@ -4594,163 +4590,173 @@ update_container_instances_state(Client, Input, Options) %% definition. %% %% For services using the rolling update (`ECS') you can update the -%% desired -%% count, deployment configuration, network configuration, load balancers, -%% service -%% registries, enable ECS managed tags option, propagate tags option, task -%% placement -%% constraints and strategies, and task definition. When you update any of -%% these -%% parameters, Amazon ECS starts new tasks with the new configuration. +%% desired count, deployment +%% configuration, network configuration, load balancers, service registries, +%% enable ECS managed tags +%% option, propagate tags option, task placement constraints and strategies, +%% and task definition. When you +%% update any of these parameters, Amazon ECS starts new tasks with the new +%% configuration. %% %% You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the -%% volume when starting or -%% running a task, or when creating or updating a service. For more -%% infomation, see Amazon EBS volumes: +%% volume when starting or running a +%% task, or when creating or updating a service. For more infomation, see +%% Amazon EBS +%% volumes: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types %% in the Amazon Elastic Container Service Developer Guide. You can update -%% your volume configurations and trigger a new deployment. -%% `volumeConfigurations' is only supported for REPLICA service and not -%% DAEMON service. If you leave `volumeConfigurations' +%% your volume configurations and trigger a new +%% deployment. `volumeConfigurations' is only supported for REPLICA +%% service and not DAEMON +%% service. If you leave `volumeConfigurations' %% `null', it doesn't trigger a new deployment. For more infomation -%% on volumes, -%% see Amazon EBS volumes: +%% on volumes, see Amazon EBS +%% volumes: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types %% in the Amazon Elastic Container Service Developer Guide. %% %% For services using the blue/green (`CODE_DEPLOY') deployment -%% controller, -%% only the desired count, deployment configuration, health check grace -%% period, task -%% placement constraints and strategies, enable ECS managed tags option, and -%% propagate tags -%% can be updated using this API. If the network configuration, platform -%% version, task -%% definition, or load balancer need to be updated, create a new CodeDeploy -%% deployment. For more -%% information, see CreateDeployment: +%% controller, only the desired +%% count, deployment configuration, health check grace period, task placement +%% constraints and strategies, +%% enable ECS managed tags option, and propagate tags can be updated using +%% this API. If the network +%% configuration, platform version, task definition, or load balancer need to +%% be updated, create a new +%% CodeDeploy deployment. For more information, see CreateDeployment: %% https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html -%% in the CodeDeploy API Reference. +%% in the +%% CodeDeploy API Reference. %% %% For services using an external deployment controller, you can update only -%% the desired -%% count, task placement constraints and strategies, health check grace -%% period, enable ECS -%% managed tags option, and propagate tags option, using this API. If the -%% launch type, load -%% balancer, network configuration, platform version, or task definition need -%% to be -%% updated, create a new task set For more information, see CreateTaskSet: +%% the desired count, task +%% placement constraints and strategies, health check grace period, enable +%% ECS managed tags option, and +%% propagate tags option, using this API. If the launch type, load balancer, +%% network configuration, +%% platform version, or task definition need to be updated, create a new task +%% set For more information, +%% see CreateTaskSet: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateTaskSet.html. %% %% You can add to or subtract from the number of instantiations of a task -%% definition in a -%% service by specifying the cluster that the service is running in and a new -%% `desiredCount' parameter. +%% definition in a service by +%% specifying the cluster that the service is running in and a new +%% `desiredCount' +%% parameter. %% %% You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the -%% volume when starting or -%% running a task, or when creating or updating a service. For more -%% infomation, see Amazon EBS volumes: +%% volume when starting or running a +%% task, or when creating or updating a service. For more infomation, see +%% Amazon EBS +%% volumes: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types %% in the Amazon Elastic Container Service Developer Guide. %% %% If you have updated the container image of your application, you can -%% create a new task -%% definition with that image and deploy it to your service. The service -%% scheduler uses the -%% minimum healthy percent and maximum percent parameters (in the -%% service's deployment -%% configuration) to determine the deployment strategy. +%% create a new task definition +%% with that image and deploy it to your service. The service scheduler uses +%% the minimum healthy percent +%% and maximum percent parameters (in the service's deployment +%% configuration) to determine the deployment +%% strategy. %% %% If your updated Docker image uses the same tag as what is in the existing -%% task -%% definition for your service (for example, `my_image:latest'), you -%% don't -%% need to create a new revision of your task definition. You can update the -%% service -%% using the `forceNewDeployment' option. The new tasks launched by the -%% deployment pull the current image/tag combination from your repository -%% when they -%% start. +%% task definition for +%% your service (for example, `my_image:latest'), you don't need to +%% create a new revision +%% of your task definition. You can update the service using the +%% `forceNewDeployment' +%% option. The new tasks launched by the deployment pull the current +%% image/tag combination from your +%% repository when they start. %% %% You can also update the deployment configuration of a service. When a -%% deployment is -%% triggered by updating the task definition of a service, the service -%% scheduler uses the -%% deployment configuration parameters, `minimumHealthyPercent' and -%% `maximumPercent', to determine the deployment strategy. +%% deployment is triggered by +%% updating the task definition of a service, the service scheduler uses the +%% deployment configuration +%% parameters, `minimumHealthyPercent' and `maximumPercent', to +%% determine the +%% deployment strategy. %% %% If `minimumHealthyPercent' is below 100%, the scheduler can ignore %% `desiredCount' temporarily during a deployment. For example, if -%% `desiredCount' is four tasks, a minimum of 50% allows the -%% scheduler to stop two existing tasks before starting two new tasks. Tasks -%% for -%% services that don't use a load balancer are considered healthy if -%% they're in the -%% `RUNNING' state. Tasks for services that use a load balancer are -%% considered healthy if they're in the `RUNNING' state and are -%% reported -%% as healthy by the load balancer. -%% -%% The `maximumPercent' parameter represents an upper limit on the -%% number of running tasks during a deployment. You can use it to define the -%% deployment batch size. For example, if `desiredCount' is four tasks, -%% a maximum of 200% starts four new tasks before stopping the four older -%% tasks -%% (provided that the cluster resources required to do this are available). +%% `desiredCount' is four tasks, a minimum of 50% allows the scheduler to +%% stop two +%% existing tasks before starting two new tasks. Tasks for services that +%% don't use a load balancer +%% are considered healthy if they're in the `RUNNING' state. Tasks +%% for services that +%% use a load balancer are considered healthy if they're in the +%% `RUNNING' state and are +%% reported as healthy by the load balancer. +%% +%% The `maximumPercent' parameter represents an upper limit on the number +%% of running +%% tasks during a deployment. You can use it to define the deployment batch +%% size. For example, if +%% `desiredCount' is four tasks, a maximum of 200% starts four new tasks +%% before +%% stopping the four older tasks (provided that the cluster resources +%% required to do this are +%% available). %% %% When UpdateService: %% https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateService.html -%% stops a task during a deployment, the equivalent -%% of `docker stop' is issued to the containers running in the task. This -%% results in a `SIGTERM' and a 30-second timeout. After this, -%% `SIGKILL' is sent and the containers are forcibly stopped. If the +%% stops a task during a deployment, the equivalent of `docker stop' +%% is issued to the containers running in the task. This results in a +%% `SIGTERM' and a 30-second +%% timeout. After this, `SIGKILL' is sent and the containers are forcibly +%% stopped. If the %% container handles the `SIGTERM' gracefully and exits within 30 seconds -%% from -%% receiving it, no `SIGKILL' is sent. +%% from receiving it, no +%% `SIGKILL' is sent. %% %% When the service scheduler launches new tasks, it determines task -%% placement in your -%% cluster with the following logic. +%% placement in your cluster with the +%% following logic. %% %% Determine which of the container instances in your cluster can support -%% your -%% service's task definition. For example, they have the required CPU, -%% memory, -%% ports, and container instance attributes. +%% your service's task +%% definition. For example, they have the required CPU, memory, ports, and +%% container instance +%% attributes. %% %% By default, the service scheduler attempts to balance tasks across -%% Availability Zones in this manner even though you can choose a different -%% placement strategy. +%% Availability Zones in this +%% manner even though you can choose a different placement strategy. %% -%% Sort the valid container instances by the fewest number of running -%% tasks for this service in the same Availability Zone as the instance. -%% For example, if zone A has one running service task and zones B and C -%% each have zero, valid container instances in either zone B or C are -%% considered optimal for placement. +%% Sort the valid container instances by the fewest number of running tasks +%% for this +%% service in the same Availability Zone as the instance. For example, if +%% zone A has one +%% running service task and zones B and C each have zero, valid container +%% instances in +%% either zone B or C are considered optimal for placement. %% %% Place the new service task on a valid container instance in an optimal -%% Availability Zone (based on the previous steps), favoring container -%% instances with the fewest number of running tasks for this -%% service. +%% Availability +%% Zone (based on the previous steps), favoring container instances with the +%% fewest number +%% of running tasks for this service. %% %% When the service scheduler stops running tasks, it attempts to maintain -%% balance across -%% the Availability Zones in your cluster using the following logic: +%% balance across the +%% Availability Zones in your cluster using the following logic: %% %% Sort the container instances by the largest number of running tasks for -%% this -%% service in the same Availability Zone as the instance. For example, if -%% zone A -%% has one running service task and zones B and C each have two, container -%% instances in either zone B or C are considered optimal for termination. +%% this service in the +%% same Availability Zone as the instance. For example, if zone A has one +%% running service task and +%% zones B and C each have two, container instances in either zone B or C are +%% considered optimal +%% for termination. %% %% Stop the task on a container instance in an optimal Availability Zone -%% (based -%% on the previous steps), favoring container instances with the largest -%% number of -%% running tasks for this service. +%% (based on the previous +%% steps), favoring container instances with the largest number of running +%% tasks for this +%% service. %% %% You must have a service-linked role when you update any of the following %% service @@ -4783,12 +4789,11 @@ update_service(Client, Input, Options) %% @doc Modifies which task set in a service is the primary task set. %% -%% Any parameters that are -%% updated on the primary task set in a service will transition to the -%% service. This is -%% used when a service uses the `EXTERNAL' deployment controller type. -%% For more -%% information, see Amazon ECS Deployment +%% Any parameters that are updated on the +%% primary task set in a service will transition to the service. This is used +%% when a service uses the +%% `EXTERNAL' deployment controller type. For more information, see +%% Amazon ECS Deployment %% Types: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html %% in the Amazon Elastic Container Service Developer Guide. @@ -4812,8 +4817,7 @@ update_service_primary_task_set(Client, Input, Options) %% %% You can set `protectionEnabled' to %% `true' to protect your task from termination during scale-in events -%% from -%% Service +%% from Service %% Autoscaling: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html %% or deployments: @@ -4822,15 +4826,17 @@ update_service_primary_task_set(Client, Input, Options) %% Task-protection, by default, expires after 2 hours at which point Amazon %% ECS clears the %% `protectionEnabled' property making the task eligible for termination -%% by -%% a subsequent scale-in event. +%% by a subsequent +%% scale-in event. %% %% You can specify a custom expiration period for task protection from 1 -%% minute to up to -%% 2,880 minutes (48 hours). To specify the custom expiration period, set the -%% `expiresInMinutes' property. The `expiresInMinutes' property -%% is always reset when you invoke this operation for a task that already has -%% `protectionEnabled' set to `true'. You can keep extending the +%% minute to up to 2,880 minutes +%% (48 hours). To specify the custom expiration period, set the +%% `expiresInMinutes' property. +%% The `expiresInMinutes' property is always reset when you invoke this +%% operation for a task +%% that already has `protectionEnabled' set to `true'. You can keep +%% extending the %% protection expiration period of a task by invoking this operation %% repeatedly. %% @@ -4842,16 +4848,15 @@ update_service_primary_task_set(Client, Input, Options) %% . %% %% This operation is only supported for tasks belonging to an Amazon ECS -%% service. Invoking -%% this operation for a standalone task will result in an -%% `TASK_NOT_VALID' -%% failure. For more information, see API failure -%% reasons: +%% service. Invoking this operation +%% for a standalone task will result in an `TASK_NOT_VALID' failure. For +%% more information, +%% see API failure reasons: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/api_failures_messages.html. %% %% If you prefer to set task protection from within the container, we -%% recommend using -%% the Task scale-in protection endpoint: +%% recommend using the Task scale-in +%% protection endpoint: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-scale-in-protection-endpoint.html. -spec update_task_protection(aws_client:aws_client(), update_task_protection_request()) -> {ok, update_task_protection_response(), tuple()} | @@ -4871,12 +4876,11 @@ update_task_protection(Client, Input, Options) %% @doc Modifies a task set. %% -%% This is used when a service uses the `EXTERNAL' -%% deployment controller type. For more information, see Amazon ECS -%% Deployment -%% Types: +%% This is used when a service uses the `EXTERNAL' deployment controller +%% type. For more information, see Amazon ECS Deployment Types: %% https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html -%% in the Amazon Elastic Container Service Developer Guide. +%% in the +%% Amazon Elastic Container Service Developer Guide. -spec update_task_set(aws_client:aws_client(), update_task_set_request()) -> {ok, update_task_set_response(), tuple()} | {error, any()} | diff --git a/src/aws_iotsitewise.erl b/src/aws_iotsitewise.erl index f8e90a6c..83cea01a 100644 --- a/src/aws_iotsitewise.erl +++ b/src/aws_iotsitewise.erl @@ -43,6 +43,8 @@ create_bulk_import_job/3, create_dashboard/2, create_dashboard/3, + create_dataset/2, + create_dataset/3, create_gateway/2, create_gateway/3, create_portal/2, @@ -59,6 +61,8 @@ delete_asset_model_composite_model/5, delete_dashboard/3, delete_dashboard/4, + delete_dataset/3, + delete_dataset/4, delete_gateway/3, delete_gateway/4, delete_portal/3, @@ -94,6 +98,9 @@ describe_dashboard/2, describe_dashboard/4, describe_dashboard/5, + describe_dataset/2, + describe_dataset/4, + describe_dataset/5, describe_default_encryption_configuration/1, describe_default_encryption_configuration/3, describe_default_encryption_configuration/4, @@ -138,6 +145,8 @@ get_interpolated_asset_property_values/6, get_interpolated_asset_property_values/8, get_interpolated_asset_property_values/9, + invoke_assistant/2, + invoke_assistant/3, list_access_policies/1, list_access_policies/3, list_access_policies/4, @@ -174,6 +183,9 @@ list_dashboards/2, list_dashboards/4, list_dashboards/5, + list_datasets/2, + list_datasets/4, + list_datasets/5, list_gateways/1, list_gateways/3, list_gateways/4, @@ -214,6 +226,8 @@ update_asset_property/5, update_dashboard/3, update_dashboard/4, + update_dataset/3, + update_dataset/4, update_gateway/3, update_gateway/4, update_gateway_capability_configuration/3, @@ -250,6 +264,7 @@ %% Example: %% execute_query_request() :: #{ +%% <<"clientToken">> => string(), %% <<"maxResults">> => integer(), %% <<"nextToken">> => string(), %% <<"queryStatement">> := string() @@ -422,6 +437,13 @@ -type get_asset_property_aggregates_response() :: #{binary() => any()}. +%% Example: +%% delete_dataset_response() :: #{ +%% <<"datasetStatus">> => dataset_status() +%% } +-type delete_dataset_response() :: #{binary() => any()}. + + %% Example: %% unauthorized_exception() :: #{ %% <<"message">> => string() @@ -437,6 +459,24 @@ -type list_project_assets_response() :: #{binary() => any()}. +%% Example: +%% dataset_source() :: #{ +%% <<"sourceDetail">> => source_detail(), +%% <<"sourceFormat">> => list(any()), +%% <<"sourceType">> => list(any()) +%% } +-type dataset_source() :: #{binary() => any()}. + + +%% Example: +%% update_dataset_response() :: #{ +%% <<"datasetArn">> => string(), +%% <<"datasetId">> => string(), +%% <<"datasetStatus">> => dataset_status() +%% } +-type update_dataset_response() :: #{binary() => any()}. + + %% Example: %% interpolated_asset_property_value() :: #{ %% <<"timestamp">> => time_in_nanos(), @@ -697,6 +737,14 @@ -type datum() :: #{binary() => any()}. +%% Example: +%% citation() :: #{ +%% <<"content">> => content(), +%% <<"reference">> => iotsitewise_reference() +%% } +-type citation() :: #{binary() => any()}. + + %% Example: %% project_resource() :: #{ %% <<"id">> => string() @@ -736,6 +784,15 @@ -type get_asset_property_value_request() :: #{binary() => any()}. +%% Example: +%% list_datasets_request() :: #{ +%% <<"maxResults">> => integer(), +%% <<"nextToken">> => string(), +%% <<"sourceType">> := list(any()) +%% } +-type list_datasets_request() :: #{binary() => any()}. + + %% Example: %% asset_model_composite_model() :: #{ %% <<"description">> => string(), @@ -842,6 +899,22 @@ -type user_identity() :: #{binary() => any()}. +%% Example: +%% kendra_source_detail() :: #{ +%% <<"knowledgeBaseArn">> => string(), +%% <<"roleArn">> => string() +%% } +-type kendra_source_detail() :: #{binary() => any()}. + + +%% Example: +%% invocation_output() :: #{ +%% <<"citations">> => list(citation()()), +%% <<"message">> => string() +%% } +-type invocation_output() :: #{binary() => any()}. + + %% Example: %% metric_processing_config() :: #{ %% <<"computeLocation">> => list(any()) @@ -963,6 +1036,13 @@ -type describe_time_series_request() :: #{binary() => any()}. +%% Example: +%% iotsitewise_reference() :: #{ +%% <<"dataset">> => data_set_reference() +%% } +-type iotsitewise_reference() :: #{binary() => any()}. + + %% Example: %% alarms() :: #{ %% <<"alarmRoleArn">> => string(), @@ -1114,6 +1194,15 @@ -type list_portals_request() :: #{binary() => any()}. +%% Example: +%% create_dataset_response() :: #{ +%% <<"datasetArn">> => string(), +%% <<"datasetId">> => string(), +%% <<"datasetStatus">> => dataset_status() +%% } +-type create_dataset_response() :: #{binary() => any()}. + + %% Example: %% job_summary() :: #{ %% <<"id">> => string(), @@ -1228,6 +1317,15 @@ -type batch_get_asset_property_aggregates_error_entry() :: #{binary() => any()}. +%% Example: +%% invoke_assistant_request() :: #{ +%% <<"conversationId">> => string(), +%% <<"enableTrace">> => [boolean()], +%% <<"message">> := string() +%% } +-type invoke_assistant_request() :: #{binary() => any()}. + + %% Example: %% warm_tier_retention_period() :: #{ %% <<"numberOfDays">> => integer(), @@ -1244,6 +1342,19 @@ -type batch_get_asset_property_value_error_info() :: #{binary() => any()}. +%% Example: +%% dataset_summary() :: #{ +%% <<"arn">> => string(), +%% <<"creationDate">> => non_neg_integer(), +%% <<"description">> => string(), +%% <<"id">> => string(), +%% <<"lastUpdateDate">> => non_neg_integer(), +%% <<"name">> => string(), +%% <<"status">> => dataset_status() +%% } +-type dataset_summary() :: #{binary() => any()}. + + %% Example: %% asset_composite_model_path_segment() :: #{ %% <<"id">> => string(), @@ -1268,6 +1379,13 @@ -type aggregated_value() :: #{binary() => any()}. +%% Example: +%% source_detail() :: #{ +%% <<"kendra">> => kendra_source_detail() +%% } +-type source_detail() :: #{binary() => any()}. + + %% Example: %% row() :: #{ %% <<"data">> => list(datum()()) @@ -1318,6 +1436,8 @@ %% <<"portalDescription">> => string(), %% <<"portalLogoImageFile">> => image_file(), %% <<"portalName">> := string(), +%% <<"portalType">> => list(any()), +%% <<"portalTypeConfiguration">> => map(), %% <<"roleArn">> := string(), %% <<"tags">> => map() %% } @@ -1448,6 +1568,8 @@ %% <<"portalName">> => string(), %% <<"portalStartUrl">> => string(), %% <<"portalStatus">> => portal_status(), +%% <<"portalType">> => list(any()), +%% <<"portalTypeConfiguration">> => map(), %% <<"roleArn">> => string() %% } -type describe_portal_response() :: #{binary() => any()}. @@ -1582,6 +1704,13 @@ -type list_actions_request() :: #{binary() => any()}. +%% Example: +%% location() :: #{ +%% <<"uri">> => string() +%% } +-type location() :: #{binary() => any()}. + + %% Example: %% iam_role_identity() :: #{ %% <<"arn">> => string() @@ -1597,6 +1726,16 @@ -type transform_processing_config() :: #{binary() => any()}. +%% Example: +%% update_dataset_request() :: #{ +%% <<"clientToken">> => string(), +%% <<"datasetDescription">> => string(), +%% <<"datasetName">> := string(), +%% <<"datasetSource">> := dataset_source() +%% } +-type update_dataset_request() :: #{binary() => any()}. + + %% Example: %% create_asset_model_composite_model_request() :: #{ %% <<"assetModelCompositeModelDescription">> => string(), @@ -1757,6 +1896,13 @@ -type asset_model_hierarchy_definition() :: #{binary() => any()}. +%% Example: +%% trace() :: #{ +%% <<"text">> => string() +%% } +-type trace() :: #{binary() => any()}. + + %% Example: %% describe_asset_model_response() :: #{ %% <<"assetModelArn">> => string(), @@ -1778,6 +1924,14 @@ -type describe_asset_model_response() :: #{binary() => any()}. +%% Example: +%% source() :: #{ +%% <<"arn">> => string(), +%% <<"location">> => location() +%% } +-type source() :: #{binary() => any()}. + + %% Example: %% batch_get_asset_property_value_success_entry() :: #{ %% <<"assetPropertyValue">> => asset_property_value(), @@ -2107,11 +2261,28 @@ %% <<"portalDescription">> => string(), %% <<"portalLogoImage">> => image(), %% <<"portalName">> := string(), +%% <<"portalType">> => list(any()), +%% <<"portalTypeConfiguration">> => map(), %% <<"roleArn">> := string() %% } -type update_portal_request() :: #{binary() => any()}. +%% Example: +%% describe_dataset_response() :: #{ +%% <<"datasetArn">> => string(), +%% <<"datasetCreationDate">> => non_neg_integer(), +%% <<"datasetDescription">> => string(), +%% <<"datasetId">> => string(), +%% <<"datasetLastUpdateDate">> => non_neg_integer(), +%% <<"datasetName">> => string(), +%% <<"datasetSource">> => dataset_source(), +%% <<"datasetStatus">> => dataset_status(), +%% <<"datasetVersion">> => string() +%% } +-type describe_dataset_response() :: #{binary() => any()}. + + %% Example: %% describe_storage_configuration_response() :: #{ %% <<"configurationStatus">> => configuration_status(), @@ -2187,6 +2358,18 @@ -type delete_asset_model_composite_model_response() :: #{binary() => any()}. +%% Example: +%% create_dataset_request() :: #{ +%% <<"clientToken">> => string(), +%% <<"datasetDescription">> => string(), +%% <<"datasetId">> => string(), +%% <<"datasetName">> := string(), +%% <<"datasetSource">> := dataset_source(), +%% <<"tags">> => map() +%% } +-type create_dataset_request() :: #{binary() => any()}. + + %% Example: %% property() :: #{ %% <<"alias">> => string(), @@ -2405,6 +2588,7 @@ %% <<"id">> => string(), %% <<"lastUpdateDate">> => non_neg_integer(), %% <<"name">> => string(), +%% <<"portalType">> => list(any()), %% <<"roleArn">> => string(), %% <<"startUrl">> => string(), %% <<"status">> => portal_status() @@ -2486,6 +2670,13 @@ -type list_asset_properties_response() :: #{binary() => any()}. +%% Example: +%% content() :: #{ +%% <<"text">> => string() +%% } +-type content() :: #{binary() => any()}. + + %% Example: %% asset_hierarchy() :: #{ %% <<"externalId">> => string(), @@ -2523,6 +2714,25 @@ %% } -type batch_put_asset_property_error_entry() :: #{binary() => any()}. +%% Example: +%% describe_dataset_request() :: #{} +-type describe_dataset_request() :: #{}. + + +%% Example: +%% delete_dataset_request() :: #{ +%% <<"clientToken">> => string() +%% } +-type delete_dataset_request() :: #{binary() => any()}. + + +%% Example: +%% list_datasets_response() :: #{ +%% <<"datasetSummaries">> => list(dataset_summary()()), +%% <<"nextToken">> => string() +%% } +-type list_datasets_response() :: #{binary() => any()}. + %% Example: %% list_asset_properties_request() :: #{ @@ -2563,6 +2773,14 @@ -type column_info() :: #{binary() => any()}. +%% Example: +%% data_set_reference() :: #{ +%% <<"datasetArn">> => string(), +%% <<"source">> => source() +%% } +-type data_set_reference() :: #{binary() => any()}. + + %% Example: %% time_series_summary() :: #{ %% <<"alias">> => string(), @@ -2578,6 +2796,13 @@ -type time_series_summary() :: #{binary() => any()}. +%% Example: +%% portal_type_entry() :: #{ +%% <<"portalTools">> => list(string()()) +%% } +-type portal_type_entry() :: #{binary() => any()}. + + %% Example: %% delete_project_request() :: #{ %% <<"clientToken">> => string() @@ -2660,6 +2885,14 @@ -type batch_get_asset_property_value_entry() :: #{binary() => any()}. +%% Example: +%% dataset_status() :: #{ +%% <<"error">> => error_details(), +%% <<"state">> => list(any()) +%% } +-type dataset_status() :: #{binary() => any()}. + + %% Example: %% list_gateways_response() :: #{ %% <<"gatewaySummaries">> => list(gateway_summary()()), @@ -2790,6 +3023,14 @@ -type update_asset_model_composite_model_response() :: #{binary() => any()}. +%% Example: +%% invoke_assistant_response() :: #{ +%% <<"body">> => list(), +%% <<"conversationId">> => string() +%% } +-type invoke_assistant_response() :: #{binary() => any()}. + + %% Example: %% action_definition() :: #{ %% <<"actionDefinitionId">> => string(), @@ -2953,6 +3194,15 @@ resource_not_found_exception() | internal_failure_exception(). +-type create_dataset_errors() :: + resource_already_exists_exception() | + limit_exceeded_exception() | + throttling_exception() | + invalid_request_exception() | + resource_not_found_exception() | + conflicting_operation_exception() | + internal_failure_exception(). + -type create_gateway_errors() :: resource_already_exists_exception() | limit_exceeded_exception() | @@ -3009,6 +3259,13 @@ resource_not_found_exception() | internal_failure_exception(). +-type delete_dataset_errors() :: + throttling_exception() | + invalid_request_exception() | + resource_not_found_exception() | + conflicting_operation_exception() | + internal_failure_exception(). + -type delete_gateway_errors() :: throttling_exception() | invalid_request_exception() | @@ -3090,6 +3347,12 @@ resource_not_found_exception() | internal_failure_exception(). +-type describe_dataset_errors() :: + throttling_exception() | + invalid_request_exception() | + resource_not_found_exception() | + internal_failure_exception(). + -type describe_default_encryption_configuration_errors() :: throttling_exception() | invalid_request_exception() | @@ -3198,6 +3461,15 @@ resource_not_found_exception() | internal_failure_exception(). +-type invoke_assistant_errors() :: + limit_exceeded_exception() | + throttling_exception() | + access_denied_exception() | + invalid_request_exception() | + resource_not_found_exception() | + conflicting_operation_exception() | + internal_failure_exception(). + -type list_access_policies_errors() :: throttling_exception() | invalid_request_exception() | @@ -3267,6 +3539,11 @@ invalid_request_exception() | internal_failure_exception(). +-type list_datasets_errors() :: + throttling_exception() | + invalid_request_exception() | + internal_failure_exception(). + -type list_gateways_errors() :: throttling_exception() | invalid_request_exception() | @@ -3391,6 +3668,14 @@ resource_not_found_exception() | internal_failure_exception(). +-type update_dataset_errors() :: + limit_exceeded_exception() | + throttling_exception() | + invalid_request_exception() | + resource_not_found_exception() | + conflicting_operation_exception() | + internal_failure_exception(). + -type update_gateway_errors() :: throttling_exception() | invalid_request_exception() | @@ -4048,6 +4333,40 @@ create_dashboard(Client, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Creates a dataset to connect an external datasource. +-spec create_dataset(aws_client:aws_client(), create_dataset_request()) -> + {ok, create_dataset_response(), tuple()} | + {error, any()} | + {error, create_dataset_errors(), tuple()}. +create_dataset(Client, Input) -> + create_dataset(Client, Input, []). + +-spec create_dataset(aws_client:aws_client(), create_dataset_request(), proplists:proplist()) -> + {ok, create_dataset_response(), tuple()} | + {error, any()} | + {error, create_dataset_errors(), tuple()}. +create_dataset(Client, Input0, Options0) -> + Method = post, + Path = ["/datasets"], + SuccessStatusCode = 202, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Creates a gateway, which is a virtual or edge device that delivers %% industrial data streams %% from local servers to IoT SiteWise. @@ -4392,6 +4711,43 @@ delete_dashboard(Client, DashboardId, Input0, Options0) -> {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Deletes a dataset. +%% +%% This cannot be undone. +-spec delete_dataset(aws_client:aws_client(), binary() | list(), delete_dataset_request()) -> + {ok, delete_dataset_response(), tuple()} | + {error, any()} | + {error, delete_dataset_errors(), tuple()}. +delete_dataset(Client, DatasetId, Input) -> + delete_dataset(Client, DatasetId, Input, []). + +-spec delete_dataset(aws_client:aws_client(), binary() | list(), delete_dataset_request(), proplists:proplist()) -> + {ok, delete_dataset_response(), tuple()} | + {error, any()} | + {error, delete_dataset_errors(), tuple()}. +delete_dataset(Client, DatasetId, Input0, Options0) -> + Method = delete, + Path = ["/datasets/", aws_util:encode_uri(DatasetId), ""], + SuccessStatusCode = 202, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + QueryMapping = [ + {<<"clientToken">>, <<"clientToken">>} + ], + {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Deletes a gateway from IoT SiteWise. %% %% When you delete a gateway, some of the gateway's files remain @@ -4948,6 +5304,43 @@ describe_dashboard(Client, DashboardId, QueryMap, HeadersMap, Options0) request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). +%% @doc Retrieves information about a dataset. +-spec describe_dataset(aws_client:aws_client(), binary() | list()) -> + {ok, describe_dataset_response(), tuple()} | + {error, any()} | + {error, describe_dataset_errors(), tuple()}. +describe_dataset(Client, DatasetId) + when is_map(Client) -> + describe_dataset(Client, DatasetId, #{}, #{}). + +-spec describe_dataset(aws_client:aws_client(), binary() | list(), map(), map()) -> + {ok, describe_dataset_response(), tuple()} | + {error, any()} | + {error, describe_dataset_errors(), tuple()}. +describe_dataset(Client, DatasetId, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + describe_dataset(Client, DatasetId, QueryMap, HeadersMap, []). + +-spec describe_dataset(aws_client:aws_client(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, describe_dataset_response(), tuple()} | + {error, any()} | + {error, describe_dataset_errors(), tuple()}. +describe_dataset(Client, DatasetId, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/datasets/", aws_util:encode_uri(DatasetId), ""], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query_ = [], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + %% @doc Retrieves information about the default encryption configuration for %% the Amazon Web Services account in %% the default or specified Region. @@ -5679,6 +6072,56 @@ get_interpolated_asset_property_values(Client, EndTimeInSeconds, IntervalInSecon request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). +%% @doc Invokes SiteWise Assistant to start or continue a conversation. +-spec invoke_assistant(aws_client:aws_client(), invoke_assistant_request()) -> + {ok, invoke_assistant_response(), tuple()} | + {error, any()} | + {error, invoke_assistant_errors(), tuple()}. +invoke_assistant(Client, Input) -> + invoke_assistant(Client, Input, []). + +-spec invoke_assistant(aws_client:aws_client(), invoke_assistant_request(), proplists:proplist()) -> + {ok, invoke_assistant_response(), tuple()} | + {error, any()} | + {error, invoke_assistant_errors(), tuple()}. +invoke_assistant(Client, Input0, Options0) -> + Method = post, + Path = ["/assistant/invocation"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + case request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode) of + {ok, Body0, {_, ResponseHeaders, _} = Response} -> + ResponseHeadersParams = + [ + {<<"x-amz-iotsitewise-assistant-conversation-id">>, <<"conversationId">>} + ], + FoldFun = fun({Name_, Key_}, Acc_) -> + case lists:keyfind(Name_, 1, ResponseHeaders) of + false -> Acc_; + {_, Value_} -> Acc_#{Key_ => Value_} + end + end, + Body = lists:foldl(FoldFun, Body0, ResponseHeadersParams), + {ok, Body, Response}; + Result -> + Result + end. + %% @doc Retrieves a paginated list of access policies for an identity (an IAM %% Identity Center user, an IAM Identity Center %% group, or an IAM user) or an IoT SiteWise Monitor resource (a portal or @@ -6248,6 +6691,50 @@ list_dashboards(Client, ProjectId, QueryMap, HeadersMap, Options0) request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). +%% @doc Retrieves a paginated list of datasets for a specific target +%% resource. +-spec list_datasets(aws_client:aws_client(), binary() | list()) -> + {ok, list_datasets_response(), tuple()} | + {error, any()} | + {error, list_datasets_errors(), tuple()}. +list_datasets(Client, SourceType) + when is_map(Client) -> + list_datasets(Client, SourceType, #{}, #{}). + +-spec list_datasets(aws_client:aws_client(), binary() | list(), map(), map()) -> + {ok, list_datasets_response(), tuple()} | + {error, any()} | + {error, list_datasets_errors(), tuple()}. +list_datasets(Client, SourceType, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + list_datasets(Client, SourceType, QueryMap, HeadersMap, []). + +-spec list_datasets(aws_client:aws_client(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, list_datasets_response(), tuple()} | + {error, any()} | + {error, list_datasets_errors(), tuple()}. +list_datasets(Client, SourceType, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/datasets"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query0_ = + [ + {<<"maxResults">>, maps:get(<<"maxResults">>, QueryMap, undefined)}, + {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)}, + {<<"sourceType">>, SourceType} + ], + Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + %% @doc Retrieves a paginated list of gateways. -spec list_gateways(aws_client:aws_client()) -> {ok, list_gateways_response(), tuple()} | @@ -6965,6 +7452,40 @@ update_dashboard(Client, DashboardId, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Updates a dataset. +-spec update_dataset(aws_client:aws_client(), binary() | list(), update_dataset_request()) -> + {ok, update_dataset_response(), tuple()} | + {error, any()} | + {error, update_dataset_errors(), tuple()}. +update_dataset(Client, DatasetId, Input) -> + update_dataset(Client, DatasetId, Input, []). + +-spec update_dataset(aws_client:aws_client(), binary() | list(), update_dataset_request(), proplists:proplist()) -> + {ok, update_dataset_response(), tuple()} | + {error, any()} | + {error, update_dataset_errors(), tuple()}. +update_dataset(Client, DatasetId, Input0, Options0) -> + Method = put, + Path = ["/datasets/", aws_util:encode_uri(DatasetId), ""], + SuccessStatusCode = 202, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Updates a gateway's name. -spec update_gateway(aws_client:aws_client(), binary() | list(), update_gateway_request()) -> {ok, undefined, tuple()} | diff --git a/src/aws_qconnect.erl b/src/aws_qconnect.erl index c4a5a0a8..7dbc817f 100644 --- a/src/aws_qconnect.erl +++ b/src/aws_qconnect.erl @@ -48,7 +48,9 @@ %% Administrator Guide. -module(aws_qconnect). --export([create_a_i_agent/3, +-export([activate_message_template/4, + activate_message_template/5, + create_a_i_agent/3, create_a_i_agent/4, create_a_i_agent_version/4, create_a_i_agent_version/5, @@ -66,10 +68,18 @@ create_content_association/5, create_knowledge_base/2, create_knowledge_base/3, + create_message_template/3, + create_message_template/4, + create_message_template_attachment/4, + create_message_template_attachment/5, + create_message_template_version/4, + create_message_template_version/5, create_quick_response/3, create_quick_response/4, create_session/3, create_session/4, + deactivate_message_template/4, + deactivate_message_template/5, delete_a_i_agent/4, delete_a_i_agent/5, delete_a_i_agent_version/5, @@ -90,6 +100,10 @@ delete_import_job/5, delete_knowledge_base/3, delete_knowledge_base/4, + delete_message_template/4, + delete_message_template/5, + delete_message_template_attachment/5, + delete_message_template_attachment/6, delete_quick_response/4, delete_quick_response/5, get_a_i_agent/3, @@ -119,6 +133,9 @@ get_knowledge_base/2, get_knowledge_base/4, get_knowledge_base/5, + get_message_template/3, + get_message_template/5, + get_message_template/6, get_quick_response/3, get_quick_response/5, get_quick_response/6, @@ -158,6 +175,12 @@ list_knowledge_bases/1, list_knowledge_bases/3, list_knowledge_bases/4, + list_message_template_versions/3, + list_message_template_versions/5, + list_message_template_versions/6, + list_message_templates/2, + list_message_templates/4, + list_message_templates/5, list_quick_responses/2, list_quick_responses/4, list_quick_responses/5, @@ -174,8 +197,12 @@ remove_assistant_a_i_agent/4, remove_knowledge_base_template_uri/3, remove_knowledge_base_template_uri/4, + render_message_template/4, + render_message_template/5, search_content/3, search_content/4, + search_message_templates/3, + search_message_templates/4, search_quick_responses/3, search_quick_responses/4, search_sessions/3, @@ -198,6 +225,10 @@ update_content/5, update_knowledge_base_template_uri/3, update_knowledge_base_template_uri/4, + update_message_template/4, + update_message_template/5, + update_message_template_metadata/4, + update_message_template_metadata/5, update_quick_response/4, update_quick_response/5, update_session/4, @@ -219,6 +250,14 @@ -type start_content_upload_response() :: #{binary() => any()}. +%% Example: +%% list_message_template_versions_request() :: #{ +%% <<"maxResults">> => integer(), +%% <<"nextToken">> => string() +%% } +-type list_message_template_versions_request() :: #{binary() => any()}. + + %% Example: %% update_knowledge_base_template_uri_request() :: #{ %% <<"templateUri">> := string() @@ -263,6 +302,18 @@ -type tag_resource_request() :: #{binary() => any()}. +%% Example: +%% message_template_order_field() :: #{ +%% <<"name">> => string(), +%% <<"order">> => string() +%% } +-type message_template_order_field() :: #{binary() => any()}. + +%% Example: +%% delete_message_template_attachment_response() :: #{} +-type delete_message_template_attachment_response() :: #{}. + + %% Example: %% session_summary() :: #{ %% <<"assistantArn">> => string(), @@ -346,6 +397,15 @@ -type get_content_association_request() :: #{}. +%% Example: +%% deactivate_message_template_response() :: #{ +%% <<"messageTemplateArn">> => string(), +%% <<"messageTemplateId">> => string(), +%% <<"versionNumber">> => float() +%% } +-type deactivate_message_template_response() :: #{binary() => any()}. + + %% Example: %% fixed_size_chunking_configuration() :: #{ %% <<"maxTokens">> => [integer()], @@ -462,6 +522,13 @@ -type content_association_data() :: #{binary() => any()}. +%% Example: +%% activate_message_template_request() :: #{ +%% <<"versionNumber">> := float() +%% } +-type activate_message_template_request() :: #{binary() => any()}. + + %% Example: %% external_source_configuration() :: #{ %% <<"configuration">> => list(), @@ -470,6 +537,14 @@ -type external_source_configuration() :: #{binary() => any()}. +%% Example: +%% agent_attributes() :: #{ +%% <<"firstName">> => string(), +%% <<"lastName">> => string() +%% } +-type agent_attributes() :: #{binary() => any()}. + + %% Example: %% create_content_association_response() :: #{ %% <<"contentAssociation">> => content_association_data() @@ -607,6 +682,16 @@ -type update_a_iprompt_request() :: #{binary() => any()}. +%% Example: +%% message_template_attributes() :: #{ +%% <<"agentAttributes">> => agent_attributes(), +%% <<"customAttributes">> => map(), +%% <<"customerProfileAttributes">> => customer_profile_attributes(), +%% <<"systemAttributes">> => system_attributes() +%% } +-type message_template_attributes() :: #{binary() => any()}. + + %% Example: %% put_feedback_response() :: #{ %% <<"assistantArn">> => string(), @@ -725,6 +810,26 @@ -type delete_a_i_agent_request() :: #{}. +%% Example: +%% message_template_filter_field() :: #{ +%% <<"includeNoExistence">> => [boolean()], +%% <<"name">> => string(), +%% <<"operator">> => string(), +%% <<"values">> => list(string()()) +%% } +-type message_template_filter_field() :: #{binary() => any()}. + + +%% Example: +%% create_message_template_attachment_request() :: #{ +%% <<"body">> := string(), +%% <<"clientToken">> => string(), +%% <<"contentDisposition">> := string(), +%% <<"name">> := string() +%% } +-type create_message_template_attachment_request() :: #{binary() => any()}. + + %% Example: %% assistant_capability_configuration() :: #{ %% <<"type">> => string() @@ -747,6 +852,15 @@ -type list_a_i_agents_response() :: #{binary() => any()}. +%% Example: +%% message_template_search_expression() :: #{ +%% <<"filters">> => list(message_template_filter_field()()), +%% <<"orderOnField">> => message_template_order_field(), +%% <<"queries">> => list(message_template_query_field()()) +%% } +-type message_template_search_expression() :: #{binary() => any()}. + + %% Example: %% list_quick_responses_request() :: #{ %% <<"maxResults">> => integer(), @@ -755,6 +869,13 @@ -type list_quick_responses_request() :: #{binary() => any()}. +%% Example: +%% system_endpoint_attributes() :: #{ +%% <<"address">> => string() +%% } +-type system_endpoint_attributes() :: #{binary() => any()}. + + %% Example: %% generative_reference() :: #{ %% <<"generationId">> => string(), @@ -770,6 +891,25 @@ %% } -type start_content_upload_request() :: #{binary() => any()}. +%% Example: +%% delete_message_template_response() :: #{} +-type delete_message_template_response() :: #{}. + + +%% Example: +%% create_message_template_request() :: #{ +%% <<"channelSubtype">> := string(), +%% <<"clientToken">> => string(), +%% <<"content">> := list(), +%% <<"defaultAttributes">> => message_template_attributes(), +%% <<"description">> => string(), +%% <<"groupingConfiguration">> => grouping_configuration(), +%% <<"language">> => string(), +%% <<"name">> := string(), +%% <<"tags">> => map() +%% } +-type create_message_template_request() :: #{binary() => any()}. + %% Example: %% delete_assistant_request() :: #{} -type delete_assistant_request() :: #{}. @@ -821,6 +961,70 @@ -type create_session_request() :: #{binary() => any()}. +%% Example: +%% customer_profile_attributes() :: #{ +%% <<"shippingCounty">> => string(), +%% <<"accountNumber">> => string(), +%% <<"shippingCity">> => string(), +%% <<"emailAddress">> => string(), +%% <<"additionalInformation">> => string(), +%% <<"firstName">> => string(), +%% <<"businessEmailAddress">> => string(), +%% <<"billingState">> => string(), +%% <<"birthDate">> => string(), +%% <<"postalCode">> => string(), +%% <<"address3">> => string(), +%% <<"businessPhoneNumber">> => string(), +%% <<"mailingAddress1">> => string(), +%% <<"mailingCountry">> => string(), +%% <<"mailingAddress3">> => string(), +%% <<"shippingState">> => string(), +%% <<"billingCountry">> => string(), +%% <<"shippingAddress2">> => string(), +%% <<"billingPostalCode">> => string(), +%% <<"shippingAddress3">> => string(), +%% <<"state">> => string(), +%% <<"country">> => string(), +%% <<"homePhoneNumber">> => string(), +%% <<"address1">> => string(), +%% <<"mailingState">> => string(), +%% <<"city">> => string(), +%% <<"businessName">> => string(), +%% <<"county">> => string(), +%% <<"mailingPostalCode">> => string(), +%% <<"billingCounty">> => string(), +%% <<"partyType">> => string(), +%% <<"shippingPostalCode">> => string(), +%% <<"mailingCity">> => string(), +%% <<"custom">> => map(), +%% <<"shippingAddress4">> => string(), +%% <<"lastName">> => string(), +%% <<"gender">> => string(), +%% <<"mailingCounty">> => string(), +%% <<"billingProvince">> => string(), +%% <<"mailingAddress2">> => string(), +%% <<"shippingAddress1">> => string(), +%% <<"mailingAddress4">> => string(), +%% <<"mailingProvince">> => string(), +%% <<"shippingProvince">> => string(), +%% <<"phoneNumber">> => string(), +%% <<"billingAddress4">> => string(), +%% <<"mobilePhoneNumber">> => string(), +%% <<"address4">> => string(), +%% <<"address2">> => string(), +%% <<"billingAddress3">> => string(), +%% <<"profileId">> => string(), +%% <<"profileARN">> => string(), +%% <<"billingCity">> => string(), +%% <<"billingAddress2">> => string(), +%% <<"billingAddress1">> => string(), +%% <<"shippingCountry">> => string(), +%% <<"province">> => string(), +%% <<"middleName">> => string() +%% } +-type customer_profile_attributes() :: #{binary() => any()}. + + %% Example: %% update_knowledge_base_template_uri_response() :: #{ %% <<"knowledgeBase">> => knowledge_base_data() @@ -858,6 +1062,13 @@ -type get_a_i_agent_request() :: #{}. +%% Example: +%% create_message_template_attachment_response() :: #{ +%% <<"attachment">> => message_template_attachment() +%% } +-type create_message_template_attachment_response() :: #{binary() => any()}. + + %% Example: %% create_knowledge_base_request() :: #{ %% <<"clientToken">> => string(), @@ -881,6 +1092,14 @@ -type list_import_jobs_request() :: #{binary() => any()}. +%% Example: +%% list_message_template_versions_response() :: #{ +%% <<"messageTemplateVersionSummaries">> => list(message_template_version_summary()()), +%% <<"nextToken">> => string() +%% } +-type list_message_template_versions_response() :: #{binary() => any()}. + + %% Example: %% knowledge_base_summary() :: #{ %% <<"description">> => string(), @@ -1018,6 +1237,68 @@ -type delete_assistant_response() :: #{}. +%% Example: +%% message_template_query_field() :: #{ +%% <<"allowFuzziness">> => [boolean()], +%% <<"name">> => string(), +%% <<"operator">> => string(), +%% <<"priority">> => string(), +%% <<"values">> => list(string()()) +%% } +-type message_template_query_field() :: #{binary() => any()}. + + +%% Example: +%% deactivate_message_template_request() :: #{ +%% <<"versionNumber">> := float() +%% } +-type deactivate_message_template_request() :: #{binary() => any()}. + + +%% Example: +%% update_message_template_request() :: #{ +%% <<"content">> => list(), +%% <<"defaultAttributes">> => message_template_attributes(), +%% <<"language">> => string() +%% } +-type update_message_template_request() :: #{binary() => any()}. + + +%% Example: +%% extended_message_template_data() :: #{ +%% <<"attachments">> => list(message_template_attachment()()), +%% <<"attributeTypes">> => list(string()()), +%% <<"channelSubtype">> => string(), +%% <<"content">> => list(), +%% <<"createdTime">> => [non_neg_integer()], +%% <<"defaultAttributes">> => message_template_attributes(), +%% <<"description">> => string(), +%% <<"groupingConfiguration">> => grouping_configuration(), +%% <<"isActive">> => [boolean()], +%% <<"knowledgeBaseArn">> => string(), +%% <<"knowledgeBaseId">> => string(), +%% <<"language">> => string(), +%% <<"lastModifiedBy">> => string(), +%% <<"lastModifiedTime">> => [non_neg_integer()], +%% <<"messageTemplateArn">> => string(), +%% <<"messageTemplateContentSha256">> => string(), +%% <<"messageTemplateId">> => string(), +%% <<"name">> => string(), +%% <<"tags">> => map(), +%% <<"versionNumber">> => float() +%% } +-type extended_message_template_data() :: #{binary() => any()}. + + +%% Example: +%% update_message_template_metadata_request() :: #{ +%% <<"description">> => string(), +%% <<"groupingConfiguration">> => grouping_configuration(), +%% <<"name">> => string() +%% } +-type update_message_template_metadata_request() :: #{binary() => any()}. + + %% Example: %% quick_response_contents() :: #{ %% <<"markdown">> => list(), @@ -1039,6 +1320,13 @@ %% } -type amazon_connect_guide_association_data() :: #{binary() => any()}. + +%% Example: +%% create_message_template_response() :: #{ +%% <<"messageTemplate">> => message_template_data() +%% } +-type create_message_template_response() :: #{binary() => any()}. + %% Example: %% delete_import_job_request() :: #{} -type delete_import_job_request() :: #{}. @@ -1147,6 +1435,22 @@ -type query_recommendation_trigger_data() :: #{binary() => any()}. +%% Example: +%% sms_message_template_content_body() :: #{ +%% <<"plainText">> => list() +%% } +-type sms_message_template_content_body() :: #{binary() => any()}. + + +%% Example: +%% search_message_templates_request() :: #{ +%% <<"maxResults">> => integer(), +%% <<"nextToken">> => string(), +%% <<"searchExpression">> := message_template_search_expression() +%% } +-type search_message_templates_request() :: #{binary() => any()}. + + %% Example: %% a_i_agent_summary() :: #{ %% <<"aiAgentArn">> => string(), @@ -1420,6 +1724,42 @@ -type semantic_chunking_configuration() :: #{binary() => any()}. +%% Example: +%% create_message_template_version_response() :: #{ +%% <<"messageTemplate">> => extended_message_template_data() +%% } +-type create_message_template_version_response() :: #{binary() => any()}. + + +%% Example: +%% message_template_search_result_data() :: #{ +%% <<"channelSubtype">> => string(), +%% <<"createdTime">> => [non_neg_integer()], +%% <<"description">> => string(), +%% <<"groupingConfiguration">> => grouping_configuration(), +%% <<"isActive">> => [boolean()], +%% <<"knowledgeBaseArn">> => string(), +%% <<"knowledgeBaseId">> => string(), +%% <<"language">> => string(), +%% <<"lastModifiedBy">> => string(), +%% <<"lastModifiedTime">> => [non_neg_integer()], +%% <<"messageTemplateArn">> => string(), +%% <<"messageTemplateId">> => string(), +%% <<"name">> => string(), +%% <<"tags">> => map(), +%% <<"versionNumber">> => float() +%% } +-type message_template_search_result_data() :: #{binary() => any()}. + + +%% Example: +%% email_header() :: #{ +%% <<"name">> => string(), +%% <<"value">> => string() +%% } +-type email_header() :: #{binary() => any()}. + + %% Example: %% web_crawler_configuration() :: #{ %% <<"crawlerLimits">> => web_crawler_limits(), @@ -1438,6 +1778,10 @@ %% } -type list_import_jobs_response() :: #{binary() => any()}. +%% Example: +%% delete_message_template_request() :: #{} +-type delete_message_template_request() :: #{}. + %% Example: %% bedrock_foundation_model_configuration_for_parsing() :: #{ @@ -1497,6 +1841,14 @@ -type get_a_iprompt_request() :: #{}. +%% Example: +%% list_message_templates_response() :: #{ +%% <<"messageTemplateSummaries">> => list(message_template_summary()()), +%% <<"nextToken">> => string() +%% } +-type list_message_templates_response() :: #{binary() => any()}. + + %% Example: %% get_a_iprompt_response() :: #{ %% <<"aiPrompt">> => a_iprompt_data(), @@ -1550,6 +1902,17 @@ %% } -type update_content_response() :: #{binary() => any()}. +%% Example: +%% delete_message_template_attachment_request() :: #{} +-type delete_message_template_attachment_request() :: #{}. + + +%% Example: +%% get_message_template_response() :: #{ +%% <<"messageTemplate">> => extended_message_template_data() +%% } +-type get_message_template_response() :: #{binary() => any()}. + %% Example: %% get_quick_response_request() :: #{} -type get_quick_response_request() :: #{}. @@ -1581,6 +1944,24 @@ %% } -type create_content_request() :: #{binary() => any()}. + +%% Example: +%% message_template_summary() :: #{ +%% <<"activeVersionNumber">> => float(), +%% <<"channelSubtype">> => string(), +%% <<"createdTime">> => [non_neg_integer()], +%% <<"description">> => string(), +%% <<"knowledgeBaseArn">> => string(), +%% <<"knowledgeBaseId">> => string(), +%% <<"lastModifiedBy">> => string(), +%% <<"lastModifiedTime">> => [non_neg_integer()], +%% <<"messageTemplateArn">> => string(), +%% <<"messageTemplateId">> => string(), +%% <<"name">> => string(), +%% <<"tags">> => map() +%% } +-type message_template_summary() :: #{binary() => any()}. + %% Example: %% tag_resource_response() :: #{} -type tag_resource_response() :: #{}. @@ -1614,6 +1995,10 @@ %% } -type query_assistant_request() :: #{binary() => any()}. +%% Example: +%% get_message_template_request() :: #{} +-type get_message_template_request() :: #{}. + %% Example: %% quick_response_search_result_data() :: #{ @@ -1654,6 +2039,15 @@ %% } -type get_content_association_response() :: #{binary() => any()}. + +%% Example: +%% system_attributes() :: #{ +%% <<"customerEndpoint">> => system_endpoint_attributes(), +%% <<"name">> => string(), +%% <<"systemEndpoint">> => system_endpoint_attributes() +%% } +-type system_attributes() :: #{binary() => any()}. + %% Example: %% delete_content_request() :: #{} -type delete_content_request() :: #{}. @@ -1667,6 +2061,13 @@ -type delete_quick_response_request() :: #{}. +%% Example: +%% create_message_template_version_request() :: #{ +%% <<"messageTemplateContentSha256">> => string() +%% } +-type create_message_template_version_request() :: #{binary() => any()}. + + %% Example: %% validation_exception() :: #{ %% <<"message">> => [string()] @@ -1698,6 +2099,14 @@ -type content_reference() :: #{binary() => any()}. +%% Example: +%% search_message_templates_response() :: #{ +%% <<"nextToken">> => string(), +%% <<"results">> => list(message_template_search_result_data()()) +%% } +-type search_message_templates_response() :: #{binary() => any()}. + + %% Example: %% citation_span() :: #{ %% <<"beginOffsetInclusive">> => integer(), @@ -1824,6 +2233,29 @@ -type delete_a_i_agent_response() :: #{}. +%% Example: +%% message_template_data() :: #{ +%% <<"attributeTypes">> => list(string()()), +%% <<"channelSubtype">> => string(), +%% <<"content">> => list(), +%% <<"createdTime">> => [non_neg_integer()], +%% <<"defaultAttributes">> => message_template_attributes(), +%% <<"description">> => string(), +%% <<"groupingConfiguration">> => grouping_configuration(), +%% <<"knowledgeBaseArn">> => string(), +%% <<"knowledgeBaseId">> => string(), +%% <<"language">> => string(), +%% <<"lastModifiedBy">> => string(), +%% <<"lastModifiedTime">> => [non_neg_integer()], +%% <<"messageTemplateArn">> => string(), +%% <<"messageTemplateContentSha256">> => string(), +%% <<"messageTemplateId">> => string(), +%% <<"name">> => string(), +%% <<"tags">> => map() +%% } +-type message_template_data() :: #{binary() => any()}. + + %% Example: %% list_knowledge_bases_response() :: #{ %% <<"knowledgeBaseSummaries">> := list(knowledge_base_summary()()), @@ -1839,6 +2271,13 @@ -type get_knowledge_base_response() :: #{binary() => any()}. +%% Example: +%% sms_message_template_content() :: #{ +%% <<"body">> => sms_message_template_content_body() +%% } +-type sms_message_template_content() :: #{binary() => any()}. + + %% Example: %% list_assistant_associations_response() :: #{ %% <<"assistantAssociationSummaries">> := list(assistant_association_summary()()), @@ -1858,6 +2297,52 @@ -type result_data() :: #{binary() => any()}. +%% Example: +%% update_message_template_metadata_response() :: #{ +%% <<"messageTemplate">> => message_template_data() +%% } +-type update_message_template_metadata_response() :: #{binary() => any()}. + + +%% Example: +%% render_message_template_response() :: #{ +%% <<"attachments">> => list(message_template_attachment()()), +%% <<"attributesNotInterpolated">> => list(string()()), +%% <<"content">> => list() +%% } +-type render_message_template_response() :: #{binary() => any()}. + + +%% Example: +%% email_message_template_content_body() :: #{ +%% <<"html">> => list(), +%% <<"plainText">> => list() +%% } +-type email_message_template_content_body() :: #{binary() => any()}. + + +%% Example: +%% message_template_version_summary() :: #{ +%% <<"channelSubtype">> => string(), +%% <<"isActive">> => [boolean()], +%% <<"knowledgeBaseArn">> => string(), +%% <<"knowledgeBaseId">> => string(), +%% <<"messageTemplateArn">> => string(), +%% <<"messageTemplateId">> => string(), +%% <<"name">> => string(), +%% <<"versionNumber">> => float() +%% } +-type message_template_version_summary() :: #{binary() => any()}. + + +%% Example: +%% list_message_templates_request() :: #{ +%% <<"maxResults">> => integer(), +%% <<"nextToken">> => string() +%% } +-type list_message_templates_request() :: #{binary() => any()}. + + %% Example: %% update_a_i_agent_request() :: #{ %% <<"clientToken">> => string(), @@ -1970,6 +2455,18 @@ -type delete_quick_response_response() :: #{}. +%% Example: +%% message_template_attachment() :: #{ +%% <<"attachmentId">> => string(), +%% <<"contentDisposition">> => string(), +%% <<"name">> => string(), +%% <<"uploadedTime">> => [non_neg_integer()], +%% <<"url">> => string(), +%% <<"urlExpiry">> => [non_neg_integer()] +%% } +-type message_template_attachment() :: #{binary() => any()}. + + %% Example: %% search_content_request() :: #{ %% <<"maxResults">> => integer(), @@ -2023,6 +2520,15 @@ -type answer_recommendation_a_i_agent_configuration() :: #{binary() => any()}. +%% Example: +%% email_message_template_content() :: #{ +%% <<"body">> => email_message_template_content_body(), +%% <<"headers">> => list(email_header()()), +%% <<"subject">> => string() +%% } +-type email_message_template_content() :: #{binary() => any()}. + + %% Example: %% create_session_response() :: #{ %% <<"session">> => session_data() @@ -2073,6 +2579,13 @@ -type document() :: #{binary() => any()}. +%% Example: +%% render_message_template_request() :: #{ +%% <<"attributes">> := message_template_attributes() +%% } +-type render_message_template_request() :: #{binary() => any()}. + + %% Example: %% list_assistants_request() :: #{ %% <<"maxResults">> => integer(), @@ -2093,6 +2606,13 @@ -type delete_content_association_request() :: #{}. +%% Example: +%% update_message_template_response() :: #{ +%% <<"messageTemplate">> => message_template_data() +%% } +-type update_message_template_response() :: #{binary() => any()}. + + %% Example: %% session_integration_configuration() :: #{ %% <<"topicIntegrationArn">> => string() @@ -2126,6 +2646,22 @@ %% } -type create_a_iprompt_version_response() :: #{binary() => any()}. + +%% Example: +%% activate_message_template_response() :: #{ +%% <<"messageTemplateArn">> => string(), +%% <<"messageTemplateId">> => string(), +%% <<"versionNumber">> => float() +%% } +-type activate_message_template_response() :: #{binary() => any()}. + +-type activate_message_template_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception() | + conflict_exception(). + -type create_a_i_agent_errors() :: throttling_exception() | validation_exception() | @@ -2192,6 +2728,30 @@ service_quota_exceeded_exception() | conflict_exception(). +-type create_message_template_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + service_quota_exceeded_exception() | + resource_not_found_exception() | + conflict_exception(). + +-type create_message_template_attachment_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + service_quota_exceeded_exception() | + resource_not_found_exception() | + conflict_exception(). + +-type create_message_template_version_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + service_quota_exceeded_exception() | + resource_not_found_exception() | + conflict_exception(). + -type create_quick_response_errors() :: validation_exception() | access_denied_exception() | @@ -2205,6 +2765,13 @@ resource_not_found_exception() | conflict_exception(). +-type deactivate_message_template_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception() | + conflict_exception(). + -type delete_a_i_agent_errors() :: throttling_exception() | validation_exception() | @@ -2263,6 +2830,20 @@ resource_not_found_exception() | conflict_exception(). +-type delete_message_template_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception() | + conflict_exception(). + +-type delete_message_template_attachment_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception() | + conflict_exception(). + -type delete_quick_response_errors() :: validation_exception() | access_denied_exception() | @@ -2315,6 +2896,12 @@ access_denied_exception() | resource_not_found_exception(). +-type get_message_template_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + -type get_quick_response_errors() :: validation_exception() | access_denied_exception() | @@ -2381,6 +2968,18 @@ validation_exception() | access_denied_exception(). +-type list_message_template_versions_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + +-type list_message_templates_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + -type list_quick_responses_errors() :: validation_exception() | access_denied_exception() | @@ -2416,11 +3015,23 @@ access_denied_exception() | resource_not_found_exception(). +-type render_message_template_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + -type search_content_errors() :: validation_exception() | access_denied_exception() | resource_not_found_exception(). +-type search_message_templates_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception(). + -type search_quick_responses_errors() :: validation_exception() | access_denied_exception() | @@ -2482,6 +3093,20 @@ access_denied_exception() | resource_not_found_exception(). +-type update_message_template_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception() | + conflict_exception(). + +-type update_message_template_metadata_errors() :: + throttling_exception() | + validation_exception() | + access_denied_exception() | + resource_not_found_exception() | + conflict_exception(). + -type update_quick_response_errors() :: precondition_failed_exception() | validation_exception() | @@ -2503,6 +3128,48 @@ %% API %%==================================================================== +%% @doc Activates a specific version of the Amazon Q in Connect message +%% template. +%% +%% After the +%% version is activated, the previous active version will be deactivated +%% automatically. You can +%% use the `$ACTIVE_VERSION' qualifier later to reference the version +%% that is in +%% active status. +-spec activate_message_template(aws_client:aws_client(), binary() | list(), binary() | list(), activate_message_template_request()) -> + {ok, activate_message_template_response(), tuple()} | + {error, any()} | + {error, activate_message_template_errors(), tuple()}. +activate_message_template(Client, KnowledgeBaseId, MessageTemplateId, Input) -> + activate_message_template(Client, KnowledgeBaseId, MessageTemplateId, Input, []). + +-spec activate_message_template(aws_client:aws_client(), binary() | list(), binary() | list(), activate_message_template_request(), proplists:proplist()) -> + {ok, activate_message_template_response(), tuple()} | + {error, any()} | + {error, activate_message_template_errors(), tuple()}. +activate_message_template(Client, KnowledgeBaseId, MessageTemplateId, Input0, Options0) -> + Method = post, + Path = ["/knowledgeBases/", aws_util:encode_uri(KnowledgeBaseId), "/messageTemplates/", aws_util:encode_uri(MessageTemplateId), "/activate"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Creates an Amazon Q in Connect AI Agent. -spec create_a_i_agent(aws_client:aws_client(), binary() | list(), create_a_i_agent_request()) -> {ok, create_a_i_agent_response(), tuple()} | @@ -2846,13 +3513,150 @@ create_content_association(Client, ContentId, KnowledgeBaseId, Input0, Options0) create_knowledge_base(Client, Input) -> create_knowledge_base(Client, Input, []). --spec create_knowledge_base(aws_client:aws_client(), create_knowledge_base_request(), proplists:proplist()) -> - {ok, create_knowledge_base_response(), tuple()} | - {error, any()} | - {error, create_knowledge_base_errors(), tuple()}. -create_knowledge_base(Client, Input0, Options0) -> +-spec create_knowledge_base(aws_client:aws_client(), create_knowledge_base_request(), proplists:proplist()) -> + {ok, create_knowledge_base_response(), tuple()} | + {error, any()} | + {error, create_knowledge_base_errors(), tuple()}. +create_knowledge_base(Client, Input0, Options0) -> + Method = post, + Path = ["/knowledgeBases"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Creates an Amazon Q in Connect message template. +%% +%% The name of the message template has to +%% be unique for each knowledge base. The channel subtype of the message +%% template is immutable +%% and cannot be modified after creation. After the message template is +%% created, you can use the +%% `$LATEST' qualifier to reference the created message template. +-spec create_message_template(aws_client:aws_client(), binary() | list(), create_message_template_request()) -> + {ok, create_message_template_response(), tuple()} | + {error, any()} | + {error, create_message_template_errors(), tuple()}. +create_message_template(Client, KnowledgeBaseId, Input) -> + create_message_template(Client, KnowledgeBaseId, Input, []). + +-spec create_message_template(aws_client:aws_client(), binary() | list(), create_message_template_request(), proplists:proplist()) -> + {ok, create_message_template_response(), tuple()} | + {error, any()} | + {error, create_message_template_errors(), tuple()}. +create_message_template(Client, KnowledgeBaseId, Input0, Options0) -> + Method = post, + Path = ["/knowledgeBases/", aws_util:encode_uri(KnowledgeBaseId), "/messageTemplates"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Uploads an attachment file to the specified Amazon Q in Connect +%% message template. +%% +%% The name +%% of the message template attachment has to be unique for each message +%% template referenced by +%% the `$LATEST' qualifier. The body of the attachment file should be +%% encoded using +%% base64 encoding. After the file is uploaded, you can use the pre-signed +%% Amazon S3 URL returned +%% in response to download the uploaded file. +-spec create_message_template_attachment(aws_client:aws_client(), binary() | list(), binary() | list(), create_message_template_attachment_request()) -> + {ok, create_message_template_attachment_response(), tuple()} | + {error, any()} | + {error, create_message_template_attachment_errors(), tuple()}. +create_message_template_attachment(Client, KnowledgeBaseId, MessageTemplateId, Input) -> + create_message_template_attachment(Client, KnowledgeBaseId, MessageTemplateId, Input, []). + +-spec create_message_template_attachment(aws_client:aws_client(), binary() | list(), binary() | list(), create_message_template_attachment_request(), proplists:proplist()) -> + {ok, create_message_template_attachment_response(), tuple()} | + {error, any()} | + {error, create_message_template_attachment_errors(), tuple()}. +create_message_template_attachment(Client, KnowledgeBaseId, MessageTemplateId, Input0, Options0) -> Method = post, - Path = ["/knowledgeBases"], + Path = ["/knowledgeBases/", aws_util:encode_uri(KnowledgeBaseId), "/messageTemplates/", aws_util:encode_uri(MessageTemplateId), "/attachments"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Creates a new Amazon Q in Connect message template version from the +%% current content and +%% configuration of a message template. +%% +%% Versions are immutable and monotonically increasing. Once +%% a version is created, you can reference a specific version of the message +%% template by passing +%% in `<message-template-id>:<versionNumber>' as the message +%% template +%% identifier. An error is displayed if the supplied +%% `messageTemplateContentSha256' is +%% different from the `messageTemplateContentSha256' of the message +%% template with +%% `$LATEST' qualifier. If multiple `CreateMessageTemplateVersion' +%% requests are made while the message template remains the same, only the +%% first invocation +%% creates a new version and the succeeding requests will return the same +%% response as the first +%% invocation. +-spec create_message_template_version(aws_client:aws_client(), binary() | list(), binary() | list(), create_message_template_version_request()) -> + {ok, create_message_template_version_response(), tuple()} | + {error, any()} | + {error, create_message_template_version_errors(), tuple()}. +create_message_template_version(Client, KnowledgeBaseId, MessageTemplateId, Input) -> + create_message_template_version(Client, KnowledgeBaseId, MessageTemplateId, Input, []). + +-spec create_message_template_version(aws_client:aws_client(), binary() | list(), binary() | list(), create_message_template_version_request(), proplists:proplist()) -> + {ok, create_message_template_version_response(), tuple()} | + {error, any()} | + {error, create_message_template_version_errors(), tuple()}. +create_message_template_version(Client, KnowledgeBaseId, MessageTemplateId, Input0, Options0) -> + Method = post, + Path = ["/knowledgeBases/", aws_util:encode_uri(KnowledgeBaseId), "/messageTemplates/", aws_util:encode_uri(MessageTemplateId), "/versions"], SuccessStatusCode = 200, {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), @@ -2945,6 +3749,46 @@ create_session(Client, AssistantId, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Deactivates a specific version of the Amazon Q in Connect message +%% template . +%% +%% After the +%% version is deactivated, you can no longer use the `$ACTIVE_VERSION' +%% qualifier to +%% reference the version in active status. +-spec deactivate_message_template(aws_client:aws_client(), binary() | list(), binary() | list(), deactivate_message_template_request()) -> + {ok, deactivate_message_template_response(), tuple()} | + {error, any()} | + {error, deactivate_message_template_errors(), tuple()}. +deactivate_message_template(Client, KnowledgeBaseId, MessageTemplateId, Input) -> + deactivate_message_template(Client, KnowledgeBaseId, MessageTemplateId, Input, []). + +-spec deactivate_message_template(aws_client:aws_client(), binary() | list(), binary() | list(), deactivate_message_template_request(), proplists:proplist()) -> + {ok, deactivate_message_template_response(), tuple()} | + {error, any()} | + {error, deactivate_message_template_errors(), tuple()}. +deactivate_message_template(Client, KnowledgeBaseId, MessageTemplateId, Input0, Options0) -> + Method = post, + Path = ["/knowledgeBases/", aws_util:encode_uri(KnowledgeBaseId), "/messageTemplates/", aws_util:encode_uri(MessageTemplateId), "/deactivate"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Deletes an Amazon Q in Connect AI Agent. -spec delete_a_i_agent(aws_client:aws_client(), binary() | list(), binary() | list(), delete_a_i_agent_request()) -> {ok, delete_a_i_agent_response(), tuple()} | @@ -3307,6 +4151,88 @@ delete_knowledge_base(Client, KnowledgeBaseId, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Deletes an Amazon Q in Connect message template entirely or a +%% specific version of the +%% message template if version is supplied in the request. +%% +%% You can provide the message template +%% identifier as `<message-template-id>:<versionNumber>' to +%% delete a +%% specific version of the message template. If it is not supplied, the +%% message template and all +%% available versions will be deleted. +-spec delete_message_template(aws_client:aws_client(), binary() | list(), binary() | list(), delete_message_template_request()) -> + {ok, delete_message_template_response(), tuple()} | + {error, any()} | + {error, delete_message_template_errors(), tuple()}. +delete_message_template(Client, KnowledgeBaseId, MessageTemplateId, Input) -> + delete_message_template(Client, KnowledgeBaseId, MessageTemplateId, Input, []). + +-spec delete_message_template(aws_client:aws_client(), binary() | list(), binary() | list(), delete_message_template_request(), proplists:proplist()) -> + {ok, delete_message_template_response(), tuple()} | + {error, any()} | + {error, delete_message_template_errors(), tuple()}. +delete_message_template(Client, KnowledgeBaseId, MessageTemplateId, Input0, Options0) -> + Method = delete, + Path = ["/knowledgeBases/", aws_util:encode_uri(KnowledgeBaseId), "/messageTemplates/", aws_util:encode_uri(MessageTemplateId), ""], + SuccessStatusCode = 204, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Deletes the attachment file from the Amazon Q in Connect message +%% template that is +%% referenced by `$LATEST' qualifier. +%% +%% Attachments on available message template +%% versions will remain unchanged. +-spec delete_message_template_attachment(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), delete_message_template_attachment_request()) -> + {ok, delete_message_template_attachment_response(), tuple()} | + {error, any()} | + {error, delete_message_template_attachment_errors(), tuple()}. +delete_message_template_attachment(Client, AttachmentId, KnowledgeBaseId, MessageTemplateId, Input) -> + delete_message_template_attachment(Client, AttachmentId, KnowledgeBaseId, MessageTemplateId, Input, []). + +-spec delete_message_template_attachment(aws_client:aws_client(), binary() | list(), binary() | list(), binary() | list(), delete_message_template_attachment_request(), proplists:proplist()) -> + {ok, delete_message_template_attachment_response(), tuple()} | + {error, any()} | + {error, delete_message_template_attachment_errors(), tuple()}. +delete_message_template_attachment(Client, AttachmentId, KnowledgeBaseId, MessageTemplateId, Input0, Options0) -> + Method = delete, + Path = ["/knowledgeBases/", aws_util:encode_uri(KnowledgeBaseId), "/messageTemplates/", aws_util:encode_uri(MessageTemplateId), "/attachments/", aws_util:encode_uri(AttachmentId), ""], + SuccessStatusCode = 204, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Deletes a quick response. -spec delete_quick_response(aws_client:aws_client(), binary() | list(), binary() | list(), delete_quick_response_request()) -> {ok, delete_quick_response_response(), tuple()} | @@ -3682,6 +4608,51 @@ get_knowledge_base(Client, KnowledgeBaseId, QueryMap, HeadersMap, Options0) request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). +%% @doc Retrieves the Amazon Q in Connect message template. +%% +%% The message template identifier can +%% contain an optional qualifier, for example, +%% `<message-template-id>:<qualifier>', which is either an +%% actual +%% version number or an Amazon Q Connect managed qualifier +%% `$ACTIVE_VERSION' | `$LATEST'. If it is +%% not supplied, then `$LATEST' is assumed implicitly. +-spec get_message_template(aws_client:aws_client(), binary() | list(), binary() | list()) -> + {ok, get_message_template_response(), tuple()} | + {error, any()} | + {error, get_message_template_errors(), tuple()}. +get_message_template(Client, KnowledgeBaseId, MessageTemplateId) + when is_map(Client) -> + get_message_template(Client, KnowledgeBaseId, MessageTemplateId, #{}, #{}). + +-spec get_message_template(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> + {ok, get_message_template_response(), tuple()} | + {error, any()} | + {error, get_message_template_errors(), tuple()}. +get_message_template(Client, KnowledgeBaseId, MessageTemplateId, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + get_message_template(Client, KnowledgeBaseId, MessageTemplateId, QueryMap, HeadersMap, []). + +-spec get_message_template(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, get_message_template_response(), tuple()} | + {error, any()} | + {error, get_message_template_errors(), tuple()}. +get_message_template(Client, KnowledgeBaseId, MessageTemplateId, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/knowledgeBases/", aws_util:encode_uri(KnowledgeBaseId), "/messageTemplates/", aws_util:encode_uri(MessageTemplateId), ""], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query_ = [], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + %% @doc Retrieves the quick response. -spec get_quick_response(aws_client:aws_client(), binary() | list(), binary() | list()) -> {ok, get_quick_response_response(), tuple()} | @@ -4248,6 +5219,94 @@ list_knowledge_bases(Client, QueryMap, HeadersMap, Options0) request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). +%% @doc Lists all the available versions for the specified Amazon Q in +%% Connect message +%% template. +-spec list_message_template_versions(aws_client:aws_client(), binary() | list(), binary() | list()) -> + {ok, list_message_template_versions_response(), tuple()} | + {error, any()} | + {error, list_message_template_versions_errors(), tuple()}. +list_message_template_versions(Client, KnowledgeBaseId, MessageTemplateId) + when is_map(Client) -> + list_message_template_versions(Client, KnowledgeBaseId, MessageTemplateId, #{}, #{}). + +-spec list_message_template_versions(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map()) -> + {ok, list_message_template_versions_response(), tuple()} | + {error, any()} | + {error, list_message_template_versions_errors(), tuple()}. +list_message_template_versions(Client, KnowledgeBaseId, MessageTemplateId, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + list_message_template_versions(Client, KnowledgeBaseId, MessageTemplateId, QueryMap, HeadersMap, []). + +-spec list_message_template_versions(aws_client:aws_client(), binary() | list(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, list_message_template_versions_response(), tuple()} | + {error, any()} | + {error, list_message_template_versions_errors(), tuple()}. +list_message_template_versions(Client, KnowledgeBaseId, MessageTemplateId, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/knowledgeBases/", aws_util:encode_uri(KnowledgeBaseId), "/messageTemplates/", aws_util:encode_uri(MessageTemplateId), "/versions"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query0_ = + [ + {<<"maxResults">>, maps:get(<<"maxResults">>, QueryMap, undefined)}, + {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)} + ], + Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + +%% @doc Lists all the available Amazon Q in Connect message templates for the +%% specified knowledge +%% base. +-spec list_message_templates(aws_client:aws_client(), binary() | list()) -> + {ok, list_message_templates_response(), tuple()} | + {error, any()} | + {error, list_message_templates_errors(), tuple()}. +list_message_templates(Client, KnowledgeBaseId) + when is_map(Client) -> + list_message_templates(Client, KnowledgeBaseId, #{}, #{}). + +-spec list_message_templates(aws_client:aws_client(), binary() | list(), map(), map()) -> + {ok, list_message_templates_response(), tuple()} | + {error, any()} | + {error, list_message_templates_errors(), tuple()}. +list_message_templates(Client, KnowledgeBaseId, QueryMap, HeadersMap) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> + list_message_templates(Client, KnowledgeBaseId, QueryMap, HeadersMap, []). + +-spec list_message_templates(aws_client:aws_client(), binary() | list(), map(), map(), proplists:proplist()) -> + {ok, list_message_templates_response(), tuple()} | + {error, any()} | + {error, list_message_templates_errors(), tuple()}. +list_message_templates(Client, KnowledgeBaseId, QueryMap, HeadersMap, Options0) + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> + Path = ["/knowledgeBases/", aws_util:encode_uri(KnowledgeBaseId), "/messageTemplates"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary} + | Options2], + + Headers = [], + + Query0_ = + [ + {<<"maxResults">>, maps:get(<<"maxResults">>, QueryMap, undefined)}, + {<<"nextToken">>, maps:get(<<"nextToken">>, QueryMap, undefined)} + ], + Query_ = [H || {_, V} = H <- Query0_, V =/= undefined], + + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). + %% @doc Lists information about quick response. -spec list_quick_responses(aws_client:aws_client(), binary() | list()) -> {ok, list_quick_responses_response(), tuple()} | @@ -4524,6 +5583,49 @@ remove_knowledge_base_template_uri(Client, KnowledgeBaseId, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Renders the Amazon Q in Connect message template based on the +%% attribute values provided +%% and generates the message content. +%% +%% For any variable present in the message template, if the +%% attribute value is neither provided in the attribute request parameter nor +%% the default +%% attribute of the message template, the rendered message content will keep +%% the variable +%% placeholder as it is and return the attribute keys that are missing. +-spec render_message_template(aws_client:aws_client(), binary() | list(), binary() | list(), render_message_template_request()) -> + {ok, render_message_template_response(), tuple()} | + {error, any()} | + {error, render_message_template_errors(), tuple()}. +render_message_template(Client, KnowledgeBaseId, MessageTemplateId, Input) -> + render_message_template(Client, KnowledgeBaseId, MessageTemplateId, Input, []). + +-spec render_message_template(aws_client:aws_client(), binary() | list(), binary() | list(), render_message_template_request(), proplists:proplist()) -> + {ok, render_message_template_response(), tuple()} | + {error, any()} | + {error, render_message_template_errors(), tuple()}. +render_message_template(Client, KnowledgeBaseId, MessageTemplateId, Input0, Options0) -> + Method = post, + Path = ["/knowledgeBases/", aws_util:encode_uri(KnowledgeBaseId), "/messageTemplates/", aws_util:encode_uri(MessageTemplateId), "/render"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Searches for content in a specified knowledge base. %% %% Can be used to get a specific content @@ -4563,6 +5665,43 @@ search_content(Client, KnowledgeBaseId, Input0, Options0) -> {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Searches for Amazon Q in Connect message templates in the specified +%% knowledge base. +-spec search_message_templates(aws_client:aws_client(), binary() | list(), search_message_templates_request()) -> + {ok, search_message_templates_response(), tuple()} | + {error, any()} | + {error, search_message_templates_errors(), tuple()}. +search_message_templates(Client, KnowledgeBaseId, Input) -> + search_message_templates(Client, KnowledgeBaseId, Input, []). + +-spec search_message_templates(aws_client:aws_client(), binary() | list(), search_message_templates_request(), proplists:proplist()) -> + {ok, search_message_templates_response(), tuple()} | + {error, any()} | + {error, search_message_templates_errors(), tuple()}. +search_message_templates(Client, KnowledgeBaseId, Input0, Options0) -> + Method = post, + Path = ["/knowledgeBases/", aws_util:encode_uri(KnowledgeBaseId), "/search/messageTemplates"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + QueryMapping = [ + {<<"maxResults">>, <<"maxResults">>}, + {<<"nextToken">>, <<"nextToken">>} + ], + {Query_, Input} = aws_request:build_headers(QueryMapping, Input2), + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Searches existing Amazon Q in Connect quick responses in an Amazon Q %% in Connect knowledge base. -spec search_quick_responses(aws_client:aws_client(), binary() | list(), search_quick_responses_request()) -> @@ -4979,6 +6118,92 @@ update_knowledge_base_template_uri(Client, KnowledgeBaseId, Input0, Options0) -> request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). +%% @doc Updates the Amazon Q in Connect message template. +%% +%% Partial update is supported. If any +%% field is not supplied, it will remain unchanged for the message template +%% that is referenced by +%% the `$LATEST' qualifier. Any modification will only apply to the +%% message template +%% that is referenced by the `$LATEST' qualifier. The fields for all +%% available +%% versions will remain unchanged. +-spec update_message_template(aws_client:aws_client(), binary() | list(), binary() | list(), update_message_template_request()) -> + {ok, update_message_template_response(), tuple()} | + {error, any()} | + {error, update_message_template_errors(), tuple()}. +update_message_template(Client, KnowledgeBaseId, MessageTemplateId, Input) -> + update_message_template(Client, KnowledgeBaseId, MessageTemplateId, Input, []). + +-spec update_message_template(aws_client:aws_client(), binary() | list(), binary() | list(), update_message_template_request(), proplists:proplist()) -> + {ok, update_message_template_response(), tuple()} | + {error, any()} | + {error, update_message_template_errors(), tuple()}. +update_message_template(Client, KnowledgeBaseId, MessageTemplateId, Input0, Options0) -> + Method = post, + Path = ["/knowledgeBases/", aws_util:encode_uri(KnowledgeBaseId), "/messageTemplates/", aws_util:encode_uri(MessageTemplateId), ""], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + +%% @doc Updates the Amazon Q in Connect message template metadata. +%% +%% Note that any modification to +%% the message template’s name, description and grouping configuration will +%% applied to the +%% message template pointed by the `$LATEST' qualifier and all available +%% versions. +%% Partial update is supported. If any field is not supplied, it will remain +%% unchanged for the +%% message template. +-spec update_message_template_metadata(aws_client:aws_client(), binary() | list(), binary() | list(), update_message_template_metadata_request()) -> + {ok, update_message_template_metadata_response(), tuple()} | + {error, any()} | + {error, update_message_template_metadata_errors(), tuple()}. +update_message_template_metadata(Client, KnowledgeBaseId, MessageTemplateId, Input) -> + update_message_template_metadata(Client, KnowledgeBaseId, MessageTemplateId, Input, []). + +-spec update_message_template_metadata(aws_client:aws_client(), binary() | list(), binary() | list(), update_message_template_metadata_request(), proplists:proplist()) -> + {ok, update_message_template_metadata_response(), tuple()} | + {error, any()} | + {error, update_message_template_metadata_errors(), tuple()}. +update_message_template_metadata(Client, KnowledgeBaseId, MessageTemplateId, Input0, Options0) -> + Method = post, + Path = ["/knowledgeBases/", aws_util:encode_uri(KnowledgeBaseId), "/messageTemplates/", aws_util:encode_uri(MessageTemplateId), "/metadata"], + SuccessStatusCode = 200, + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), + Options = [{send_body_as_binary, SendBodyAsBinary}, + {receive_body_as_binary, ReceiveBodyAsBinary}, + {append_sha256_content_hash, false} + | Options2], + + Headers = [], + Input1 = Input0, + + CustomHeaders = [], + Input2 = Input1, + + Query_ = [], + Input = Input2, + + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). + %% @doc Updates an existing Amazon Q in Connect quick response. -spec update_quick_response(aws_client:aws_client(), binary() | list(), binary() | list(), update_quick_response_request()) -> {ok, update_quick_response_response(), tuple()} | diff --git a/src/aws_rds.erl b/src/aws_rds.erl index c30772ad..347549e1 100644 --- a/src/aws_rds.erl +++ b/src/aws_rds.erl @@ -2542,6 +2542,12 @@ %% } -type option_group_option_setting() :: #{binary() => any()}. +%% Example: +%% db_instance_not_ready_fault() :: #{ +%% <<"message">> => string() +%% } +-type db_instance_not_ready_fault() :: #{binary() => any()}. + %% Example: %% db_cluster_parameter_groups_message() :: #{ %% <<"DBClusterParameterGroups">> => list(db_cluster_parameter_group()()), @@ -2729,6 +2735,13 @@ %% } -type certificate_message() :: #{binary() => any()}. +%% Example: +%% serverless_v2_features_support() :: #{ +%% <<"MaxCapacity">> => float(), +%% <<"MinCapacity">> => float() +%% } +-type serverless_v2_features_support() :: #{binary() => any()}. + %% Example: %% deregister_db_proxy_targets_request() :: #{ %% <<"DBClusterIdentifiers">> => list(string()()), @@ -2888,6 +2901,7 @@ %% <<"Engine">> => string(), %% <<"SupportedCACertificateIdentifiers">> => list(string()()), %% <<"SupportsLimitlessDatabase">> => boolean(), +%% <<"ServerlessV2FeaturesSupport">> => serverless_v2_features_support(), %% <<"DatabaseInstallationFilesS3BucketName">> => string(), %% <<"SupportsLogExportsToCloudwatchLogs">> => boolean(), %% <<"CreateTime">> => non_neg_integer(), @@ -4853,7 +4867,8 @@ %% Example: %% serverless_v2_scaling_configuration_info() :: #{ %% <<"MaxCapacity">> => float(), -%% <<"MinCapacity">> => float() +%% <<"MinCapacity">> => float(), +%% <<"SecondsUntilAutoPause">> => integer() %% } -type serverless_v2_scaling_configuration_info() :: #{binary() => any()}. @@ -5434,7 +5449,8 @@ %% Example: %% serverless_v2_scaling_configuration() :: #{ %% <<"MaxCapacity">> => float(), -%% <<"MinCapacity">> => float() +%% <<"MinCapacity">> => float(), +%% <<"SecondsUntilAutoPause">> => integer() %% } -type serverless_v2_scaling_configuration() :: #{binary() => any()}. @@ -5968,7 +5984,8 @@ db_instance_not_found_fault(). -type describe_db_log_files_errors() :: - db_instance_not_found_fault(). + db_instance_not_found_fault() | + db_instance_not_ready_fault(). -type describe_db_parameter_groups_errors() :: db_parameter_group_not_found_fault(). @@ -6050,7 +6067,8 @@ -type download_db_log_file_portion_errors() :: db_log_file_not_found_fault() | - db_instance_not_found_fault(). + db_instance_not_found_fault() | + db_instance_not_ready_fault(). -type enable_http_endpoint_errors() :: invalid_resource_state_fault() | diff --git a/src/aws_rds_data.erl b/src/aws_rds_data.erl index 1dd09b15..7d49fdea 100644 --- a/src/aws_rds_data.erl +++ b/src/aws_rds_data.erl @@ -61,6 +61,13 @@ -type result_set_metadata() :: #{binary() => any()}. +%% Example: +%% database_resuming_exception() :: #{ +%% <<"message">> => string() +%% } +-type database_resuming_exception() :: #{binary() => any()}. + + %% Example: %% unsupported_result_exception() :: #{ %% <<"message">> => string() @@ -344,6 +351,7 @@ service_unavailable_error() | forbidden_exception() | transaction_not_found_exception() | + database_resuming_exception() | statement_timeout_exception(). -type begin_transaction_errors() :: @@ -359,6 +367,7 @@ service_unavailable_error() | forbidden_exception() | transaction_not_found_exception() | + database_resuming_exception() | statement_timeout_exception(). -type commit_transaction_errors() :: @@ -398,6 +407,7 @@ forbidden_exception() | transaction_not_found_exception() | unsupported_result_exception() | + database_resuming_exception() | statement_timeout_exception(). -type rollback_transaction_errors() ::