| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.IoT.AttachThingPrincipal
Description
Attaches the specified principal to the specified thing. A principal can be X.509 certificates, Amazon Cognito identities or federated identities.
Requires permission to access the AttachThingPrincipal action.
Synopsis
- data AttachThingPrincipal = AttachThingPrincipal' {}
- newAttachThingPrincipal :: Text -> Text -> AttachThingPrincipal
- attachThingPrincipal_thingName :: Lens' AttachThingPrincipal Text
- attachThingPrincipal_principal :: Lens' AttachThingPrincipal Text
- data AttachThingPrincipalResponse = AttachThingPrincipalResponse' {
- httpStatus :: Int
- newAttachThingPrincipalResponse :: Int -> AttachThingPrincipalResponse
- attachThingPrincipalResponse_httpStatus :: Lens' AttachThingPrincipalResponse Int
Creating a Request
data AttachThingPrincipal Source #
The input for the AttachThingPrincipal operation.
See: newAttachThingPrincipal smart constructor.
Constructors
| AttachThingPrincipal' | |
Instances
newAttachThingPrincipal Source #
Arguments
| :: Text | |
| -> Text | |
| -> AttachThingPrincipal |
Create a value of AttachThingPrincipal 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:
AttachThingPrincipal, attachThingPrincipal_thingName - The name of the thing.
$sel:principal:AttachThingPrincipal', attachThingPrincipal_principal - The principal, which can be a certificate ARN (as returned from the
CreateCertificate operation) or an Amazon Cognito ID.
Request Lenses
attachThingPrincipal_thingName :: Lens' AttachThingPrincipal Text Source #
The name of the thing.
attachThingPrincipal_principal :: Lens' AttachThingPrincipal Text Source #
The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.
Destructuring the Response
data AttachThingPrincipalResponse Source #
The output from the AttachThingPrincipal operation.
See: newAttachThingPrincipalResponse smart constructor.
Constructors
| AttachThingPrincipalResponse' | |
Fields
| |
Instances
newAttachThingPrincipalResponse Source #
Create a value of AttachThingPrincipalResponse 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:httpStatus:AttachThingPrincipalResponse', attachThingPrincipalResponse_httpStatus - The response's http status code.
Response Lenses
attachThingPrincipalResponse_httpStatus :: Lens' AttachThingPrincipalResponse Int Source #
The response's http status code.