amazonka-iot-2.0: Amazon IoT 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.IoT.AttachPolicy

Description

Attaches the specified policy to the specified principal (certificate or other credential).

Requires permission to access the AttachPolicy action.

Synopsis

Creating a Request

data AttachPolicy Source #

See: newAttachPolicy smart constructor.

Constructors

AttachPolicy' 

Fields

Instances

Instances details
ToJSON AttachPolicy Source # 
Instance details

Defined in Amazonka.IoT.AttachPolicy

ToHeaders AttachPolicy Source # 
Instance details

Defined in Amazonka.IoT.AttachPolicy

ToPath AttachPolicy Source # 
Instance details

Defined in Amazonka.IoT.AttachPolicy

ToQuery AttachPolicy Source # 
Instance details

Defined in Amazonka.IoT.AttachPolicy

AWSRequest AttachPolicy Source # 
Instance details

Defined in Amazonka.IoT.AttachPolicy

Associated Types

type AWSResponse AttachPolicy #

Generic AttachPolicy Source # 
Instance details

Defined in Amazonka.IoT.AttachPolicy

Associated Types

type Rep AttachPolicy :: Type -> Type #

Read AttachPolicy Source # 
Instance details

Defined in Amazonka.IoT.AttachPolicy

Show AttachPolicy Source # 
Instance details

Defined in Amazonka.IoT.AttachPolicy

NFData AttachPolicy Source # 
Instance details

Defined in Amazonka.IoT.AttachPolicy

Methods

rnf :: AttachPolicy -> () #

Eq AttachPolicy Source # 
Instance details

Defined in Amazonka.IoT.AttachPolicy

Hashable AttachPolicy Source # 
Instance details

Defined in Amazonka.IoT.AttachPolicy

type AWSResponse AttachPolicy Source # 
Instance details

Defined in Amazonka.IoT.AttachPolicy

type Rep AttachPolicy Source # 
Instance details

Defined in Amazonka.IoT.AttachPolicy

type Rep AttachPolicy = D1 ('MetaData "AttachPolicy" "Amazonka.IoT.AttachPolicy" "amazonka-iot-2.0-6w03vgAfmrM1SG22OsNJXL" 'False) (C1 ('MetaCons "AttachPolicy'" 'PrefixI 'True) (S1 ('MetaSel ('Just "policyName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "target") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newAttachPolicy Source #

Create a value of AttachPolicy 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:

AttachPolicy, attachPolicy_policyName - The name of the policy to attach.

AttachPolicy, attachPolicy_target - The identity to which the policy is attached. For example, a thing group or a certificate.

Request Lenses

attachPolicy_policyName :: Lens' AttachPolicy Text Source #

The name of the policy to attach.

attachPolicy_target :: Lens' AttachPolicy Text Source #

The identity to which the policy is attached. For example, a thing group or a certificate.

Destructuring the Response

data AttachPolicyResponse Source #

See: newAttachPolicyResponse smart constructor.

Constructors

AttachPolicyResponse' 

newAttachPolicyResponse :: AttachPolicyResponse Source #

Create a value of AttachPolicyResponse with all optional fields omitted.

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