libZSservicesZSamazonka-iamZSamazonka-iam
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.IAM.CreateServiceLinkedRole

Description

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

Creating a Request

data CreateServiceLinkedRole Source #

See: newCreateServiceLinkedRole smart constructor.

Constructors

CreateServiceLinkedRole' 

Fields

  • customSuffix :: Maybe Text

    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.

  • description :: Maybe Text

    The description of the role.

  • aWSServiceName :: Text

    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.

Instances

Instances details
Eq CreateServiceLinkedRole Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

Read CreateServiceLinkedRole Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

Show CreateServiceLinkedRole Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

Generic CreateServiceLinkedRole Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

Associated Types

type Rep CreateServiceLinkedRole :: Type -> Type #

NFData CreateServiceLinkedRole Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

Methods

rnf :: CreateServiceLinkedRole -> () #

Hashable CreateServiceLinkedRole Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

AWSRequest CreateServiceLinkedRole Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

ToHeaders CreateServiceLinkedRole Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

ToPath CreateServiceLinkedRole Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

ToQuery CreateServiceLinkedRole Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

type Rep CreateServiceLinkedRole Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

type Rep CreateServiceLinkedRole = D1 ('MetaData "CreateServiceLinkedRole" "Amazonka.IAM.CreateServiceLinkedRole" "libZSservicesZSamazonka-iamZSamazonka-iam" 'False) (C1 ('MetaCons "CreateServiceLinkedRole'" 'PrefixI 'True) (S1 ('MetaSel ('Just "customSuffix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "aWSServiceName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse CreateServiceLinkedRole Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

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_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.

Constructors

CreateServiceLinkedRoleResponse' 

Fields

Instances

Instances details
Eq CreateServiceLinkedRoleResponse Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

Read CreateServiceLinkedRoleResponse Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

Show CreateServiceLinkedRoleResponse Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

Generic CreateServiceLinkedRoleResponse Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

Associated Types

type Rep CreateServiceLinkedRoleResponse :: Type -> Type #

NFData CreateServiceLinkedRoleResponse Source # 
Instance details

Defined in Amazonka.IAM.CreateServiceLinkedRole

type Rep CreateServiceLinkedRoleResponse Source # 
Instance details

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.