|
71 | 71 | delete_prompt_router/4, |
72 | 72 | delete_provisioned_model_throughput/3, |
73 | 73 | delete_provisioned_model_throughput/4, |
| 74 | + delete_resource_policy/3, |
| 75 | + delete_resource_policy/4, |
74 | 76 | deregister_marketplace_model_endpoint/3, |
75 | 77 | deregister_marketplace_model_endpoint/4, |
76 | 78 | export_automated_reasoning_policy_version/2, |
|
145 | 147 | get_provisioned_model_throughput/2, |
146 | 148 | get_provisioned_model_throughput/4, |
147 | 149 | get_provisioned_model_throughput/5, |
| 150 | + get_resource_policy/2, |
| 151 | + get_resource_policy/4, |
| 152 | + get_resource_policy/5, |
148 | 153 | get_use_case_for_model_access/1, |
149 | 154 | get_use_case_for_model_access/3, |
150 | 155 | get_use_case_for_model_access/4, |
|
214 | 219 | put_enforced_guardrail_configuration/3, |
215 | 220 | put_model_invocation_logging_configuration/2, |
216 | 221 | put_model_invocation_logging_configuration/3, |
| 222 | + put_resource_policy/2, |
| 223 | + put_resource_policy/3, |
217 | 224 | put_use_case_for_model_access/2, |
218 | 225 | put_use_case_for_model_access/3, |
219 | 226 | register_marketplace_model_endpoint/3, |
|
452 | 459 | %% } |
453 | 460 | -type create_model_invocation_job_response() :: #{binary() => any()}. |
454 | 461 |
|
| 462 | +%% Example: |
| 463 | +%% delete_resource_policy_response() :: #{} |
| 464 | +-type delete_resource_policy_response() :: #{}. |
| 465 | + |
455 | 466 |
|
456 | 467 | %% Example: |
457 | 468 | %% list_inference_profiles_request() :: #{ |
|
1058 | 1069 | %% } |
1059 | 1070 | -type automated_evaluation_custom_metric_config() :: #{binary() => any()}. |
1060 | 1071 |
|
| 1072 | + |
| 1073 | +%% Example: |
| 1074 | +%% get_resource_policy_response() :: #{ |
| 1075 | +%% <<"resourcePolicy">> => string() |
| 1076 | +%% } |
| 1077 | +-type get_resource_policy_response() :: #{binary() => any()}. |
| 1078 | + |
1061 | 1079 | %% Example: |
1062 | 1080 | %% get_custom_model_deployment_request() :: #{} |
1063 | 1081 | -type get_custom_model_deployment_request() :: #{}. |
|
1145 | 1163 | %% <<"inputTags">> => list(any()), |
1146 | 1164 | %% <<"modelEnforcement">> => model_enforcement(), |
1147 | 1165 | %% <<"owner">> => string(), |
| 1166 | +%% <<"selectiveContentGuarding">> => selective_content_guarding(), |
1148 | 1167 | %% <<"updatedAt">> => non_neg_integer(), |
1149 | 1168 | %% <<"updatedBy">> => [string()] |
1150 | 1169 | %% } |
|
2469 | 2488 | %% } |
2470 | 2489 | -type delete_automated_reasoning_policy_request() :: #{binary() => any()}. |
2471 | 2490 |
|
| 2491 | +%% Example: |
| 2492 | +%% get_resource_policy_request() :: #{} |
| 2493 | +-type get_resource_policy_request() :: #{}. |
| 2494 | + |
2472 | 2495 |
|
2473 | 2496 | %% Example: |
2474 | 2497 | %% filter_attribute() :: #{ |
|
2757 | 2780 | -type update_custom_model_deployment_response() :: #{binary() => any()}. |
2758 | 2781 |
|
2759 | 2782 |
|
| 2783 | +%% Example: |
| 2784 | +%% put_resource_policy_request() :: #{ |
| 2785 | +%% <<"resourceArn">> := string(), |
| 2786 | +%% <<"resourcePolicy">> := string() |
| 2787 | +%% } |
| 2788 | +-type put_resource_policy_request() :: #{binary() => any()}. |
| 2789 | + |
| 2790 | + |
2760 | 2791 | %% Example: |
2761 | 2792 | %% custom_metric_evaluator_model_config() :: #{ |
2762 | 2793 | %% <<"bedrockEvaluatorModels">> => list(custom_metric_bedrock_evaluator_model()) |
|
3325 | 3356 | -type automated_reasoning_check_too_complex_finding() :: #{}. |
3326 | 3357 |
|
3327 | 3358 |
|
| 3359 | +%% Example: |
| 3360 | +%% selective_content_guarding() :: #{ |
| 3361 | +%% <<"messages">> => list(any()), |
| 3362 | +%% <<"system">> => list(any()) |
| 3363 | +%% } |
| 3364 | +-type selective_content_guarding() :: #{binary() => any()}. |
| 3365 | + |
| 3366 | + |
3328 | 3367 | %% Example: |
3329 | 3368 | %% list_prompt_routers_response() :: #{ |
3330 | 3369 | %% <<"nextToken">> => string(), |
|
3365 | 3404 | -type guardrail_topic_policy() :: #{binary() => any()}. |
3366 | 3405 |
|
3367 | 3406 |
|
| 3407 | +%% Example: |
| 3408 | +%% put_resource_policy_response() :: #{ |
| 3409 | +%% <<"resourceArn">> => string() |
| 3410 | +%% } |
| 3411 | +-type put_resource_policy_response() :: #{binary() => any()}. |
| 3412 | + |
| 3413 | + |
3368 | 3414 | %% Example: |
3369 | 3415 | %% output_data_config() :: #{ |
3370 | 3416 | %% <<"s3Uri">> => string() |
|
3510 | 3556 | %% } |
3511 | 3557 | -type automated_reasoning_policy_add_rule_from_natural_language_annotation() :: #{binary() => any()}. |
3512 | 3558 |
|
| 3559 | +%% Example: |
| 3560 | +%% delete_resource_policy_request() :: #{} |
| 3561 | +-type delete_resource_policy_request() :: #{}. |
| 3562 | + |
3513 | 3563 |
|
3514 | 3564 | %% Example: |
3515 | 3565 | %% automated_reasoning_policy_delete_rule_mutation() :: #{ |
|
3780 | 3830 | %% account_enforced_guardrail_inference_input_configuration() :: #{ |
3781 | 3831 | %% <<"guardrailIdentifier">> => string(), |
3782 | 3832 | %% <<"guardrailVersion">> => string(), |
3783 | | -%% <<"inputTags">> => list(any()), |
3784 | | -%% <<"modelEnforcement">> => model_enforcement() |
| 3833 | +%% <<"modelEnforcement">> => model_enforcement(), |
| 3834 | +%% <<"selectiveContentGuarding">> => selective_content_guarding() |
3785 | 3835 | %% } |
3786 | 3836 | -type account_enforced_guardrail_inference_input_configuration() :: #{binary() => any()}. |
3787 | 3837 |
|
|
4202 | 4252 | resource_not_found_exception() | |
4203 | 4253 | conflict_exception(). |
4204 | 4254 |
|
| 4255 | +-type delete_resource_policy_errors() :: |
| 4256 | + throttling_exception() | |
| 4257 | + validation_exception() | |
| 4258 | + access_denied_exception() | |
| 4259 | + internal_server_exception() | |
| 4260 | + resource_not_found_exception(). |
| 4261 | + |
4205 | 4262 | -type deregister_marketplace_model_endpoint_errors() :: |
4206 | 4263 | throttling_exception() | |
4207 | 4264 | validation_exception() | |
|
4376 | 4433 | internal_server_exception() | |
4377 | 4434 | resource_not_found_exception(). |
4378 | 4435 |
|
| 4436 | +-type get_resource_policy_errors() :: |
| 4437 | + throttling_exception() | |
| 4438 | + validation_exception() | |
| 4439 | + access_denied_exception() | |
| 4440 | + internal_server_exception() | |
| 4441 | + resource_not_found_exception(). |
| 4442 | + |
4379 | 4443 | -type get_use_case_for_model_access_errors() :: |
4380 | 4444 | throttling_exception() | |
4381 | 4445 | validation_exception() | |
|
4533 | 4597 | access_denied_exception() | |
4534 | 4598 | internal_server_exception(). |
4535 | 4599 |
|
| 4600 | +-type put_resource_policy_errors() :: |
| 4601 | + throttling_exception() | |
| 4602 | + validation_exception() | |
| 4603 | + access_denied_exception() | |
| 4604 | + internal_server_exception() | |
| 4605 | + conflict_exception(). |
| 4606 | + |
4536 | 4607 | -type put_use_case_for_model_access_errors() :: |
4537 | 4608 | throttling_exception() | |
4538 | 4609 | validation_exception() | |
@@ -6012,6 +6083,40 @@ delete_provisioned_model_throughput(Client, ProvisionedModelId, Input0, Options0 |
6012 | 6083 |
|
6013 | 6084 | request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). |
6014 | 6085 |
|
| 6086 | +%% @doc Deletes a previously created Bedrock resource policy. |
| 6087 | +-spec delete_resource_policy(aws_client:aws_client(), binary() | list(), delete_resource_policy_request()) -> |
| 6088 | + {ok, delete_resource_policy_response(), tuple()} | |
| 6089 | + {error, any()} | |
| 6090 | + {error, delete_resource_policy_errors(), tuple()}. |
| 6091 | +delete_resource_policy(Client, ResourceArn, Input) -> |
| 6092 | + delete_resource_policy(Client, ResourceArn, Input, []). |
| 6093 | + |
| 6094 | +-spec delete_resource_policy(aws_client:aws_client(), binary() | list(), delete_resource_policy_request(), proplists:proplist()) -> |
| 6095 | + {ok, delete_resource_policy_response(), tuple()} | |
| 6096 | + {error, any()} | |
| 6097 | + {error, delete_resource_policy_errors(), tuple()}. |
| 6098 | +delete_resource_policy(Client, ResourceArn, Input0, Options0) -> |
| 6099 | + Method = delete, |
| 6100 | + Path = ["/resource-policy/", aws_util:encode_uri(ResourceArn), ""], |
| 6101 | + SuccessStatusCode = 200, |
| 6102 | + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), |
| 6103 | + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), |
| 6104 | + Options = [{send_body_as_binary, SendBodyAsBinary}, |
| 6105 | + {receive_body_as_binary, ReceiveBodyAsBinary}, |
| 6106 | + {append_sha256_content_hash, false} |
| 6107 | + | Options2], |
| 6108 | + |
| 6109 | + Headers = [], |
| 6110 | + Input1 = Input0, |
| 6111 | + |
| 6112 | + CustomHeaders = [], |
| 6113 | + Input2 = Input1, |
| 6114 | + |
| 6115 | + Query_ = [], |
| 6116 | + Input = Input2, |
| 6117 | + |
| 6118 | + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). |
| 6119 | + |
6015 | 6120 | %% @doc Deregisters an endpoint for a model from Amazon Bedrock Marketplace. |
6016 | 6121 | %% |
6017 | 6122 | %% This operation removes the endpoint's association with Amazon Bedrock |
@@ -7025,6 +7130,43 @@ get_provisioned_model_throughput(Client, ProvisionedModelId, QueryMap, HeadersMa |
7025 | 7130 |
|
7026 | 7131 | request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). |
7027 | 7132 |
|
| 7133 | +%% @doc Gets the resource policy document for a Bedrock resource |
| 7134 | +-spec get_resource_policy(aws_client:aws_client(), binary() | list()) -> |
| 7135 | + {ok, get_resource_policy_response(), tuple()} | |
| 7136 | + {error, any()} | |
| 7137 | + {error, get_resource_policy_errors(), tuple()}. |
| 7138 | +get_resource_policy(Client, ResourceArn) |
| 7139 | + when is_map(Client) -> |
| 7140 | + get_resource_policy(Client, ResourceArn, #{}, #{}). |
| 7141 | + |
| 7142 | +-spec get_resource_policy(aws_client:aws_client(), binary() | list(), map(), map()) -> |
| 7143 | + {ok, get_resource_policy_response(), tuple()} | |
| 7144 | + {error, any()} | |
| 7145 | + {error, get_resource_policy_errors(), tuple()}. |
| 7146 | +get_resource_policy(Client, ResourceArn, QueryMap, HeadersMap) |
| 7147 | + when is_map(Client), is_map(QueryMap), is_map(HeadersMap) -> |
| 7148 | + get_resource_policy(Client, ResourceArn, QueryMap, HeadersMap, []). |
| 7149 | + |
| 7150 | +-spec get_resource_policy(aws_client:aws_client(), binary() | list(), map(), map(), proplists:proplist()) -> |
| 7151 | + {ok, get_resource_policy_response(), tuple()} | |
| 7152 | + {error, any()} | |
| 7153 | + {error, get_resource_policy_errors(), tuple()}. |
| 7154 | +get_resource_policy(Client, ResourceArn, QueryMap, HeadersMap, Options0) |
| 7155 | + when is_map(Client), is_map(QueryMap), is_map(HeadersMap), is_list(Options0) -> |
| 7156 | + Path = ["/resource-policy/", aws_util:encode_uri(ResourceArn), ""], |
| 7157 | + SuccessStatusCode = 200, |
| 7158 | + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), |
| 7159 | + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), |
| 7160 | + Options = [{send_body_as_binary, SendBodyAsBinary}, |
| 7161 | + {receive_body_as_binary, ReceiveBodyAsBinary} |
| 7162 | + | Options2], |
| 7163 | + |
| 7164 | + Headers = [], |
| 7165 | + |
| 7166 | + Query_ = [], |
| 7167 | + |
| 7168 | + request(Client, get, Path, Query_, Headers, undefined, Options, SuccessStatusCode). |
| 7169 | + |
7028 | 7170 | %% @doc Get usecase for model access. |
7029 | 7171 | -spec get_use_case_for_model_access(aws_client:aws_client()) -> |
7030 | 7172 | {ok, get_use_case_for_model_access_response(), tuple()} | |
@@ -8162,6 +8304,40 @@ put_model_invocation_logging_configuration(Client, Input0, Options0) -> |
8162 | 8304 |
|
8163 | 8305 | request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). |
8164 | 8306 |
|
| 8307 | +%% @doc Adds a resource policy for a Bedrock resource. |
| 8308 | +-spec put_resource_policy(aws_client:aws_client(), put_resource_policy_request()) -> |
| 8309 | + {ok, put_resource_policy_response(), tuple()} | |
| 8310 | + {error, any()} | |
| 8311 | + {error, put_resource_policy_errors(), tuple()}. |
| 8312 | +put_resource_policy(Client, Input) -> |
| 8313 | + put_resource_policy(Client, Input, []). |
| 8314 | + |
| 8315 | +-spec put_resource_policy(aws_client:aws_client(), put_resource_policy_request(), proplists:proplist()) -> |
| 8316 | + {ok, put_resource_policy_response(), tuple()} | |
| 8317 | + {error, any()} | |
| 8318 | + {error, put_resource_policy_errors(), tuple()}. |
| 8319 | +put_resource_policy(Client, Input0, Options0) -> |
| 8320 | + Method = post, |
| 8321 | + Path = ["/resource-policy"], |
| 8322 | + SuccessStatusCode = 201, |
| 8323 | + {SendBodyAsBinary, Options1} = proplists_take(send_body_as_binary, Options0, false), |
| 8324 | + {ReceiveBodyAsBinary, Options2} = proplists_take(receive_body_as_binary, Options1, false), |
| 8325 | + Options = [{send_body_as_binary, SendBodyAsBinary}, |
| 8326 | + {receive_body_as_binary, ReceiveBodyAsBinary}, |
| 8327 | + {append_sha256_content_hash, false} |
| 8328 | + | Options2], |
| 8329 | + |
| 8330 | + Headers = [], |
| 8331 | + Input1 = Input0, |
| 8332 | + |
| 8333 | + CustomHeaders = [], |
| 8334 | + Input2 = Input1, |
| 8335 | + |
| 8336 | + Query_ = [], |
| 8337 | + Input = Input2, |
| 8338 | + |
| 8339 | + request(Client, Method, Path, Query_, CustomHeaders ++ Headers, Input, Options, SuccessStatusCode). |
| 8340 | + |
8165 | 8341 | %% @doc Put usecase for model access. |
8166 | 8342 | -spec put_use_case_for_model_access(aws_client:aws_client(), put_use_case_for_model_access_request()) -> |
8167 | 8343 | {ok, put_use_case_for_model_access_response(), tuple()} | |
|
0 commit comments