amazonka-oam-2.0: Amazon CloudWatch Observability Access Manager SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.OAM.PutSinkPolicy

Description

Creates or updates the resource policy that grants permissions to source accounts to link to the monitoring account sink. When you create a sink policy, you can grant permissions to all accounts in an organization or to individual accounts.

You can also use a sink policy to limit the types of data that is shared. The three types that you can allow or deny are:

  • Metrics - Specify with AWS::CloudWatch::Metric
  • Log groups - Specify with AWS::Logs::LogGroup
  • Traces - Specify with AWS::XRay::Trace

See the examples in this section to see how to specify permitted source accounts and data types.

Synopsis

Creating a Request

data PutSinkPolicy Source #

See: newPutSinkPolicy smart constructor.

Constructors

PutSinkPolicy' 

Fields

  • sinkIdentifier :: Text

    The ARN of the sink to attach this policy to.

  • policy :: Text

    The JSON policy to use. If you are updating an existing policy, the entire existing policy is replaced by what you specify here.

    The policy must be in JSON string format with quotation marks escaped and no newlines.

    For examples of different types of policies, see the Examples section on this page.

Instances

Instances details
ToJSON PutSinkPolicy Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

ToHeaders PutSinkPolicy Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

ToPath PutSinkPolicy Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

ToQuery PutSinkPolicy Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

AWSRequest PutSinkPolicy Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

Associated Types

type AWSResponse PutSinkPolicy #

Generic PutSinkPolicy Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

Associated Types

type Rep PutSinkPolicy :: Type -> Type #

Read PutSinkPolicy Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

Show PutSinkPolicy Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

NFData PutSinkPolicy Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

Methods

rnf :: PutSinkPolicy -> () #

Eq PutSinkPolicy Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

Hashable PutSinkPolicy Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

type AWSResponse PutSinkPolicy Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

type Rep PutSinkPolicy Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

type Rep PutSinkPolicy = D1 ('MetaData "PutSinkPolicy" "Amazonka.OAM.PutSinkPolicy" "amazonka-oam-2.0-2r3dTellrOe218sRY2Qi5h" 'False) (C1 ('MetaCons "PutSinkPolicy'" 'PrefixI 'True) (S1 ('MetaSel ('Just "sinkIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "policy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newPutSinkPolicy Source #

Create a value of PutSinkPolicy with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:sinkIdentifier:PutSinkPolicy', putSinkPolicy_sinkIdentifier - The ARN of the sink to attach this policy to.

PutSinkPolicy, putSinkPolicy_policy - The JSON policy to use. If you are updating an existing policy, the entire existing policy is replaced by what you specify here.

The policy must be in JSON string format with quotation marks escaped and no newlines.

For examples of different types of policies, see the Examples section on this page.

Request Lenses

putSinkPolicy_sinkIdentifier :: Lens' PutSinkPolicy Text Source #

The ARN of the sink to attach this policy to.

putSinkPolicy_policy :: Lens' PutSinkPolicy Text Source #

The JSON policy to use. If you are updating an existing policy, the entire existing policy is replaced by what you specify here.

The policy must be in JSON string format with quotation marks escaped and no newlines.

For examples of different types of policies, see the Examples section on this page.

Destructuring the Response

data PutSinkPolicyResponse Source #

See: newPutSinkPolicyResponse smart constructor.

Constructors

PutSinkPolicyResponse' 

Fields

Instances

Instances details
Generic PutSinkPolicyResponse Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

Associated Types

type Rep PutSinkPolicyResponse :: Type -> Type #

Read PutSinkPolicyResponse Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

Show PutSinkPolicyResponse Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

NFData PutSinkPolicyResponse Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

Methods

rnf :: PutSinkPolicyResponse -> () #

Eq PutSinkPolicyResponse Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

type Rep PutSinkPolicyResponse Source # 
Instance details

Defined in Amazonka.OAM.PutSinkPolicy

type Rep PutSinkPolicyResponse = D1 ('MetaData "PutSinkPolicyResponse" "Amazonka.OAM.PutSinkPolicy" "amazonka-oam-2.0-2r3dTellrOe218sRY2Qi5h" 'False) (C1 ('MetaCons "PutSinkPolicyResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "policy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "sinkArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "sinkId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newPutSinkPolicyResponse Source #

Create a value of PutSinkPolicyResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

PutSinkPolicy, putSinkPolicyResponse_policy - The policy that you specified.

PutSinkPolicyResponse, putSinkPolicyResponse_sinkArn - The ARN of the sink.

$sel:sinkId:PutSinkPolicyResponse', putSinkPolicyResponse_sinkId - The random ID string that Amazon Web Services generated as part of the sink ARN.

$sel:httpStatus:PutSinkPolicyResponse', putSinkPolicyResponse_httpStatus - The response's http status code.

Response Lenses

putSinkPolicyResponse_sinkId :: Lens' PutSinkPolicyResponse (Maybe Text) Source #

The random ID string that Amazon Web Services generated as part of the sink ARN.