Smaws_Client_IAM.CreatePolicyCreates a new managed policy for your Amazon Web Services account.
This operation creates a policy version with a version identifier of v1 and sets v1 as the policy's default version. For more information about policy versions, see Versioning for managed policies in the IAM User Guide.
As a best practice, you can validate your IAM policies. To learn more, see Validating IAM policies in the IAM User Guide.
For more information about managed policies in general, see Managed policies and inline policies in the IAM User Guide.
val error_to_string :
[ Smaws_Lib.Protocols.AwsQuery.error
| `ConcurrentModificationException of Types.concurrent_modification_exception
| `EntityAlreadyExistsException of Types.entity_already_exists_exception
| `InvalidInputException of Types.invalid_input_exception
| `LimitExceededException of Types.limit_exceeded_exception
| `MalformedPolicyDocumentException of
Types.malformed_policy_document_exception
| `ServiceFailureException of Types.service_failure_exception ] ->
stringval request :
'http_type Smaws_Lib.Context.t ->
Types.create_policy_request ->
(Types.create_policy_response,
[> Smaws_Lib.Protocols.AwsQuery.error
| `ConcurrentModificationException of
Types.concurrent_modification_exception
| `EntityAlreadyExistsException of Types.entity_already_exists_exception
| `InvalidInputException of Types.invalid_input_exception
| `LimitExceededException of Types.limit_exceeded_exception
| `MalformedPolicyDocumentException of
Types.malformed_policy_document_exception
| `ServiceFailureException of Types.service_failure_exception ])
Stdlib.resultval request_with_metadata :
'http_type Smaws_Lib.Context.t ->
Types.create_policy_request ->
(Types.create_policy_response Smaws_Lib.Response.t,
[> Smaws_Lib.Protocols.AwsQuery.error
| `ConcurrentModificationException of
Types.concurrent_modification_exception
| `EntityAlreadyExistsException of Types.entity_already_exists_exception
| `InvalidInputException of Types.invalid_input_exception
| `LimitExceededException of Types.limit_exceeded_exception
| `MalformedPolicyDocumentException of
Types.malformed_policy_document_exception
| `ServiceFailureException of Types.service_failure_exception ]
* Smaws_Lib.Response.metadata)
Stdlib.result