amazonka-iam-1.6.1: Amazon Identity and Access Management SDK.

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

Network.AWS.IAM.CreateServiceLinkedRole

Contents

Description

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

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 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 - 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
Eq CreateServiceLinkedRole Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

Data CreateServiceLinkedRole Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateServiceLinkedRole -> c CreateServiceLinkedRole #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateServiceLinkedRole #

toConstr :: CreateServiceLinkedRole -> Constr #

dataTypeOf :: CreateServiceLinkedRole -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CreateServiceLinkedRole) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateServiceLinkedRole) #

gmapT :: (forall b. Data b => b -> b) -> CreateServiceLinkedRole -> CreateServiceLinkedRole #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateServiceLinkedRole -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateServiceLinkedRole -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateServiceLinkedRole -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateServiceLinkedRole -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateServiceLinkedRole -> m CreateServiceLinkedRole #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateServiceLinkedRole -> m CreateServiceLinkedRole #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateServiceLinkedRole -> m CreateServiceLinkedRole #

Read CreateServiceLinkedRole Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

Show CreateServiceLinkedRole Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

Generic CreateServiceLinkedRole Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

Associated Types

type Rep CreateServiceLinkedRole :: Type -> Type #

Hashable CreateServiceLinkedRole Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

AWSRequest CreateServiceLinkedRole Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

Associated Types

type Rs CreateServiceLinkedRole :: Type #

ToHeaders CreateServiceLinkedRole Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

ToPath CreateServiceLinkedRole Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

ToQuery CreateServiceLinkedRole Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

NFData CreateServiceLinkedRole Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

Methods

rnf :: CreateServiceLinkedRole -> () #

type Rep CreateServiceLinkedRole Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

type Rep CreateServiceLinkedRole = D1 (MetaData "CreateServiceLinkedRole" "Network.AWS.IAM.CreateServiceLinkedRole" "amazonka-iam-1.6.1-BDjAp2BAcQu3GSS4Bsr6zu" False) (C1 (MetaCons "CreateServiceLinkedRole'" PrefixI True) (S1 (MetaSel (Just "_cslrCustomSuffix") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_cslrDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_cslrAWSServiceName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs CreateServiceLinkedRole Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

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.

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:

data CreateServiceLinkedRoleResponse Source #

See: createServiceLinkedRoleResponse smart constructor.

Instances
Eq CreateServiceLinkedRoleResponse Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

Data CreateServiceLinkedRoleResponse Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateServiceLinkedRoleResponse -> c CreateServiceLinkedRoleResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateServiceLinkedRoleResponse #

toConstr :: CreateServiceLinkedRoleResponse -> Constr #

dataTypeOf :: CreateServiceLinkedRoleResponse -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CreateServiceLinkedRoleResponse) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateServiceLinkedRoleResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateServiceLinkedRoleResponse -> CreateServiceLinkedRoleResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateServiceLinkedRoleResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateServiceLinkedRoleResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateServiceLinkedRoleResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateServiceLinkedRoleResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateServiceLinkedRoleResponse -> m CreateServiceLinkedRoleResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateServiceLinkedRoleResponse -> m CreateServiceLinkedRoleResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateServiceLinkedRoleResponse -> m CreateServiceLinkedRoleResponse #

Read CreateServiceLinkedRoleResponse Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

Show CreateServiceLinkedRoleResponse Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

Generic CreateServiceLinkedRoleResponse Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

Associated Types

type Rep CreateServiceLinkedRoleResponse :: Type -> Type #

NFData CreateServiceLinkedRoleResponse Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

type Rep CreateServiceLinkedRoleResponse Source # 
Instance details

Defined in Network.AWS.IAM.CreateServiceLinkedRole

type Rep CreateServiceLinkedRoleResponse = D1 (MetaData "CreateServiceLinkedRoleResponse" "Network.AWS.IAM.CreateServiceLinkedRole" "amazonka-iam-1.6.1-BDjAp2BAcQu3GSS4Bsr6zu" False) (C1 (MetaCons "CreateServiceLinkedRoleResponse'" PrefixI True) (S1 (MetaSel (Just "_cslrrsRole") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Role)) :*: S1 (MetaSel (Just "_cslrrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))

Response Lenses

cslrrsRole :: Lens' CreateServiceLinkedRoleResponse (Maybe Role) Source #

A Role object that contains details about the newly created role.