Skip to content

SSMClient.put_resource_policy

rboto-ssm==0.4.0 · Service index · Types

Model summary (excerpt): Creates or updates a Systems Manager resource policy. A resource policy helps you to define the IAM entity (for example, an Amazon Web Services account) that can manage your Systems Manager resources. The following resources support Systems Manager resource policies. OpsItemGroup - The resource policy for OpsItemGroup enables Amazon Web Services accounts to view and interact with OpsCenter...

Install and imports

python -m pip install "rboto[ssm]==0.4.0"
from rboto import SSMClient
from rboto_ssm.types import (
    PutResourcePolicyOutput,
)

Signature

async def put_resource_policy(
    *,
    resource_arn: str,
    policy: str,
    policy_id: str | None = None,
    policy_hash: str | None = None,
) -> PutResourcePolicyOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
resource_arn Yes Amazon Resource Name (ARN) of the resource to which you want to attach a policy.
policy Yes A policy you want to associate with a resource.
policy_id No The policy ID.
policy_hash No ID of the current policy version. The hash helps to prevent a situation where multiple users attempt to overwrite a policy. You must provide this hash when updating or deleting a policy.

Output

PutResourcePolicyOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
policy_id str | None Always present —
policy_hash str | None Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

PutResourcePolicyOutput

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_ssm.exceptions:

InternalServerError, MalformedResourcePolicyDocumentError, ResourceNotFoundError, ResourcePolicyConflictError, ResourcePolicyInvalidParameterError, ResourcePolicyLimitExceededError, ResourcePolicyNotFoundError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model