Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates an IAM role that is linked to a specific Amazon Web Services service. The service controls the attached policies and when the role can be deleted. This helps ensure that the service is not broken by an unexpectedly changed or deleted role, which could put your Amazon Web Services resources into an unknown state. Allowing the service to control the role helps improve service stability and proper cleanup when a service and its role are no longer needed. For more information, see Using service-linked roles in the IAM User Guide.
To attach a policy to this service-linked role, you must make the request using the Amazon Web Services service that depends on this role.
Synopsis
- data CreateServiceLinkedRole = CreateServiceLinkedRole' {}
- newCreateServiceLinkedRole :: Text -> CreateServiceLinkedRole
- createServiceLinkedRole_customSuffix :: Lens' CreateServiceLinkedRole (Maybe Text)
- createServiceLinkedRole_description :: Lens' CreateServiceLinkedRole (Maybe Text)
- createServiceLinkedRole_aWSServiceName :: Lens' CreateServiceLinkedRole Text
- data CreateServiceLinkedRoleResponse = CreateServiceLinkedRoleResponse' {
- role' :: Maybe Role
- httpStatus :: Int
- newCreateServiceLinkedRoleResponse :: Int -> CreateServiceLinkedRoleResponse
- createServiceLinkedRoleResponse_role :: Lens' CreateServiceLinkedRoleResponse (Maybe Role)
- createServiceLinkedRoleResponse_httpStatus :: Lens' CreateServiceLinkedRoleResponse Int
Creating a Request
data CreateServiceLinkedRole Source #
See: newCreateServiceLinkedRole
smart constructor.
CreateServiceLinkedRole' | |
|
Instances
newCreateServiceLinkedRole Source #
Create a value of CreateServiceLinkedRole
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:customSuffix:CreateServiceLinkedRole'
, createServiceLinkedRole_customSuffix
- A string that you provide, which is combined with the service-provided
prefix to form the complete role name. If you make multiple requests for
the same service, then you must supply a different CustomSuffix
for
each request. Otherwise the request fails with a duplicate role name
error. For example, you could add -1
or -debug
to the suffix.
Some services do not support the CustomSuffix
parameter. If you
provide an optional suffix and the operation fails, try the operation
again without the suffix.
$sel:description:CreateServiceLinkedRole'
, createServiceLinkedRole_description
- The description of the role.
$sel:aWSServiceName:CreateServiceLinkedRole'
, createServiceLinkedRole_aWSServiceName
- The service principal for the Amazon Web Services service to which this
role is attached. You use a string similar to a URL but without the
http:// in front. For example: elasticbeanstalk.amazonaws.com
.
Service principals are unique and case-sensitive. To find the exact service principal for your service-linked role, see Amazon Web Services services that work with IAM in the IAM User Guide. Look for the services that have Yes in the Service-Linked Role column. Choose the Yes link to view the service-linked role documentation for that service.
Request Lenses
createServiceLinkedRole_customSuffix :: Lens' CreateServiceLinkedRole (Maybe Text) Source #
A string that you provide, which is combined with the service-provided
prefix to form the complete role name. If you make multiple requests for
the same service, then you must supply a different CustomSuffix
for
each request. Otherwise the request fails with a duplicate role name
error. For example, you could add -1
or -debug
to the suffix.
Some services do not support the CustomSuffix
parameter. If you
provide an optional suffix and the operation fails, try the operation
again without the suffix.
createServiceLinkedRole_description :: Lens' CreateServiceLinkedRole (Maybe Text) Source #
The description of the role.
createServiceLinkedRole_aWSServiceName :: Lens' CreateServiceLinkedRole Text Source #
The service principal for the Amazon Web Services service to which this
role is attached. You use a string similar to a URL but without the
http:// in front. For example: elasticbeanstalk.amazonaws.com
.
Service principals are unique and case-sensitive. To find the exact service principal for your service-linked role, see Amazon Web Services services that work with IAM in the IAM User Guide. Look for the services that have Yes in the Service-Linked Role column. Choose the Yes link to view the service-linked role documentation for that service.
Destructuring the Response
data CreateServiceLinkedRoleResponse Source #
See: newCreateServiceLinkedRoleResponse
smart constructor.
CreateServiceLinkedRoleResponse' | |
|
Instances
Eq CreateServiceLinkedRoleResponse Source # | |
Read CreateServiceLinkedRoleResponse Source # | |
Show CreateServiceLinkedRoleResponse Source # | |
Defined in Amazonka.IAM.CreateServiceLinkedRole | |
Generic CreateServiceLinkedRoleResponse Source # | |
NFData CreateServiceLinkedRoleResponse Source # | |
Defined in Amazonka.IAM.CreateServiceLinkedRole rnf :: CreateServiceLinkedRoleResponse -> () # | |
type Rep CreateServiceLinkedRoleResponse Source # | |
Defined in Amazonka.IAM.CreateServiceLinkedRole type Rep CreateServiceLinkedRoleResponse = D1 ('MetaData "CreateServiceLinkedRoleResponse" "Amazonka.IAM.CreateServiceLinkedRole" "libZSservicesZSamazonka-iamZSamazonka-iam" 'False) (C1 ('MetaCons "CreateServiceLinkedRoleResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "role'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Role)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
newCreateServiceLinkedRoleResponse Source #
Create a value of CreateServiceLinkedRoleResponse
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:role':CreateServiceLinkedRoleResponse'
, createServiceLinkedRoleResponse_role
- A Role object that contains details about the newly created role.
$sel:httpStatus:CreateServiceLinkedRoleResponse'
, createServiceLinkedRoleResponse_httpStatus
- The response's http status code.
Response Lenses
createServiceLinkedRoleResponse_role :: Lens' CreateServiceLinkedRoleResponse (Maybe Role) Source #
A Role object that contains details about the newly created role.
createServiceLinkedRoleResponse_httpStatus :: Lens' CreateServiceLinkedRoleResponse Int Source #
The response's http status code.