Copyright | (c) 2013-2018 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 |
Language | Haskell2010 |
Creates an IAM role that is linked to a specific AWS 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 AWS 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.
The name of the role is generated by combining the string that you specify for the AWSServiceName
parameter with the string that you specify for the CustomSuffix
parameter. The resulting name must be unique in your account or the request fails.
To attach a policy to this service-linked role, you must make the request using the AWS service that depends on this role.
Synopsis
- createServiceLinkedRole :: Text -> CreateServiceLinkedRole
- data CreateServiceLinkedRole
- cslrCustomSuffix :: Lens' CreateServiceLinkedRole (Maybe Text)
- cslrDescription :: Lens' CreateServiceLinkedRole (Maybe Text)
- cslrAWSServiceName :: Lens' CreateServiceLinkedRole Text
- createServiceLinkedRoleResponse :: Int -> CreateServiceLinkedRoleResponse
- data CreateServiceLinkedRoleResponse
- cslrrsRole :: Lens' CreateServiceLinkedRoleResponse (Maybe Role)
- cslrrsResponseStatus :: Lens' CreateServiceLinkedRoleResponse Int
Creating a Request
createServiceLinkedRole Source #
Creates a value of CreateServiceLinkedRole
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cslrCustomSuffix
- A string that you provide, which is combined with the service name to form the complete role name. If you make multiple requests for the same service, then you must supply a differentCustomSuffix
for each request. Otherwise the request fails with a duplicate role name error. For example, you could add-1
or-debug
to the suffix.cslrDescription
- The description of the role.cslrAWSServiceName
- The AWS 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
data CreateServiceLinkedRole Source #
See: createServiceLinkedRole
smart constructor.
Instances
Request Lenses
cslrCustomSuffix :: Lens' CreateServiceLinkedRole (Maybe Text) Source #
A string that you provide, which is combined with the service name 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.
cslrDescription :: Lens' CreateServiceLinkedRole (Maybe Text) Source #
The description of the role.
cslrAWSServiceName :: Lens' CreateServiceLinkedRole Text Source #
The AWS 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
Destructuring the Response
createServiceLinkedRoleResponse Source #
Creates a value of CreateServiceLinkedRoleResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cslrrsRole
- ARole
object that contains details about the newly created role.cslrrsResponseStatus
- -- | The response status code.
data CreateServiceLinkedRoleResponse Source #
See: createServiceLinkedRoleResponse
smart constructor.
Instances
Response Lenses
cslrrsRole :: Lens' CreateServiceLinkedRoleResponse (Maybe Role) Source #
A Role
object that contains details about the newly created role.
cslrrsResponseStatus :: Lens' CreateServiceLinkedRoleResponse Int Source #
- - | The response status code.