put_resource_policy
async
¶
put_resource_policy(
resource_arn: ResourceArn,
resource_policy: Policy,
client_token: IdempotenceToken,
*,
config_overrides: Optional[AsyncLookoutEquipmentClientConfig] = None,
policy_revision_id: Optional[PolicyRevisionId] = None,
) -> PutResourcePolicyResponse
Creates a resource control policy for a given resource.
Parameters:
-
resource_arn(ResourceArn) –The Amazon Resource Name (ARN) of the resource for which the policy is being created.
-
resource_policy(Policy) –The JSON-formatted resource policy to create.
-
policy_revision_id(Optional[PolicyRevisionId], default:None) –A unique identifier for a revision of the resource policy.
-
client_token(IdempotenceToken) –A unique identifier for the request. If you do not set the client request token, Amazon Lookout for Equipment generates one.
Raises:
-
AccessDeniedException–The request could not be completed because you do not have access to the resource.
-
ConflictException–The request could not be completed due to a conflict with the current state of the target resource.
-
InternalServerException–Processing of the request has failed because of an unknown error, exception or failure.
-
ResourceNotFoundException–The resource requested could not be found. Verify the resource ID and retry your request.
-
ServiceQuotaExceededException–Resource limitations have been exceeded.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input fails to satisfy constraints specified by Amazon Lookout for Equipment or a related Amazon Web Services service that's being utilized.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_lookoutequipment/_services/async_lookout_equipment.py
2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 | |