PutConfiguredAudienceModelPolicy
Create or update the resource policy for a configured audience model.
Request Syntax
PUT /configured-audience-model/configuredAudienceModelArn/policy HTTP/1.1
Content-type: application/json
{
   "configuredAudienceModelPolicy": "string",
   "policyExistenceCondition": "string",
   "previousPolicyHash": "string"
}URI Request Parameters
The request uses the following URI parameters.
- configuredAudienceModelArn
- 
               The Amazon Resource Name (ARN) of the configured audience model that the resource policy will govern. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: arn:aws[-a-z]*:cleanrooms-ml:[-a-z0-9]+:[0-9]{12}:configured-audience-model/[-a-zA-Z0-9_/.]+Required: Yes 
Request Body
The request accepts the following data in JSON format.
- configuredAudienceModelPolicy
- 
               The IAM resource policy. Type: String Length Constraints: Minimum length of 1. Maximum length of 20480. Required: Yes 
- policyExistenceCondition
- 
               Use this to prevent unexpected concurrent modification of the policy. Type: String Valid Values: POLICY_MUST_EXIST | POLICY_MUST_NOT_EXISTRequired: No 
- previousPolicyHash
- 
               A cryptographic hash of the contents of the policy used to prevent unexpected concurrent modification of the policy. Type: String Length Constraints: Minimum length of 64. Maximum length of 128. Pattern: [0-9a-f]+Required: No 
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
   "configuredAudienceModelPolicy": "string",
   "policyHash": "string"
}Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- configuredAudienceModelPolicy
- 
               The IAM resource policy. Type: String Length Constraints: Minimum length of 1. Maximum length of 20480. 
- policyHash
- 
               A cryptographic hash of the contents of the policy used to prevent unexpected concurrent modification of the policy. Type: String Length Constraints: Minimum length of 64. Maximum length of 128. Pattern: [0-9a-f]+
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
- 
               You do not have sufficient access to perform this action. HTTP Status Code: 403 
- ResourceNotFoundException
- 
               The resource you are requesting does not exist. HTTP Status Code: 404 
- ValidationException
- 
               The request parameters for this request are incorrect. HTTP Status Code: 400 
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: