put_resource_policy
¶
put_resource_policy(
name: AppMonitorName,
policy_document: str,
*,
config_overrides: Optional[RUMClientConfig] = None,
policy_revision_id: Optional[PolicyRevisionId] = None,
) -> PutResourcePolicyResponse
Use this operation to assign a resource-based policy to a CloudWatch RUM app monitor to control access to it. Each app monitor can have one resource-based policy. The maximum size of the policy is 4 KB. To learn more about using resource policies with RUM, see Using resource-based policies with CloudWatch RUM.
Parameters:
-
name(AppMonitorName) –The name of the app monitor that you want to apply this resource-based policy to. To find the names of your app monitors, you can use the ListAppMonitors operation.
-
policy_document(str) –The JSON to use as the resource policy. The document can be up to 4 KB in size. For more information about the contents and syntax for this policy, see Using resource-based policies with CloudWatch RUM.
-
policy_revision_id(Optional[PolicyRevisionId], default:None) –A string value that you can use to conditionally update your policy. You can provide the revision ID of your existing policy to make mutating requests against that policy.
When you assign a policy revision ID, then later requests about that policy will be rejected with an
InvalidPolicyRevisionIdExceptionerror if they don't provide the correct current revision ID.
Raises:
-
AccessDeniedException–You don't have sufficient permissions to perform this action.
-
ConflictException–This operation attempted to create a resource that already exists.
-
InternalServerException–Internal service exception.
-
InvalidPolicyRevisionIdException–The policy revision ID that you provided doeesn't match the latest policy revision ID.
-
MalformedPolicyDocumentException–The policy document that you specified is not formatted correctly.
-
PolicySizeLimitExceededException–The policy document is too large. The limit is 4 KB.
-
ResourceNotFoundException–Resource not found.
-
ThrottlingException–The request was throttled because of quota limits.
-
ValidationException–One of the arguments for the request is not valid.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_rum/_services/rum.py
1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 | |