create_automated_reasoning_policy

ArtificialIntelligenceApi.create_automated_reasoning_policy(role_id, automated_reasoning_policy_create_request, content_type=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Create an Automated Reasoning policy

Creates a Bedrock Automated Reasoning policy and Amorphic metadata. Name and Description are required. PolicyDefinition is optional and stored in S3 when provided. The creator receives owner access.

Parameters:
  • role_id (str) – The role ID of the requesting user. (required)

  • automated_reasoning_policy_create_request (AutomatedReasoningPolicyCreateRequest) – (required)

  • content_type (str)

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

AutomatedReasoningPolicyMutationResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: POST /ai/reasoning-policies

Request

Request / response example

{
  "Name": "hr-leave-policy",
  "Description": "Formal rules for employee leave eligibility"
}

Success (HTTP 200)

Policy created. Message includes the policy name.

Request / response example

{
  "Message": "Automated reasoning policy hr-leave-policy created successfully.",
  "PolicyId": "arn-policy-id-example"
}

Errors

Documented error codes: IPV-1001, AI-1004.

HTTP 400

Missing Name or Description (IPV-1001), invalid body, or AICore not enabled (AI-1004).

HTTP 500

Internal server error.