ServiceLinkedRole

Provides an IAM service-linked role.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var elasticbeanstalk = new Aws.Iam.ServiceLinkedRole("elasticbeanstalk", new Aws.Iam.ServiceLinkedRoleArgs
        {
            AwsServiceName = "elasticbeanstalk.amazonaws.com",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/iam"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iam.NewServiceLinkedRole(ctx, "elasticbeanstalk", &iam.ServiceLinkedRoleArgs{
			AwsServiceName: pulumi.String("elasticbeanstalk.amazonaws.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

elasticbeanstalk = aws.iam.ServiceLinkedRole("elasticbeanstalk", aws_service_name="elasticbeanstalk.amazonaws.com")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const elasticbeanstalk = new aws.iam.ServiceLinkedRole("elasticbeanstalk", {
    awsServiceName: "elasticbeanstalk.amazonaws.com",
});

Create a ServiceLinkedRole Resource

new ServiceLinkedRole(name: string, args: ServiceLinkedRoleArgs, opts?: CustomResourceOptions);
@overload
def ServiceLinkedRole(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      aws_service_name: Optional[str] = None,
                      custom_suffix: Optional[str] = None,
                      description: Optional[str] = None)
@overload
def ServiceLinkedRole(resource_name: str,
                      args: ServiceLinkedRoleArgs,
                      opts: Optional[ResourceOptions] = None)
func NewServiceLinkedRole(ctx *Context, name string, args ServiceLinkedRoleArgs, opts ...ResourceOption) (*ServiceLinkedRole, error)
public ServiceLinkedRole(string name, ServiceLinkedRoleArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ServiceLinkedRoleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args ServiceLinkedRoleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ServiceLinkedRoleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ServiceLinkedRoleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ServiceLinkedRole Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ServiceLinkedRole resource accepts the following input properties:

AwsServiceName string
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. To find the full list of services that support service-linked roles, check the docs.
CustomSuffix string
Additional string appended to the role name. Not all AWS services support custom suffixes.
Description string
The description of the role.
AwsServiceName string
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. To find the full list of services that support service-linked roles, check the docs.
CustomSuffix string
Additional string appended to the role name. Not all AWS services support custom suffixes.
Description string
The description of the role.
awsServiceName string
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. To find the full list of services that support service-linked roles, check the docs.
customSuffix string
Additional string appended to the role name. Not all AWS services support custom suffixes.
description string
The description of the role.
aws_service_name str
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. To find the full list of services that support service-linked roles, check the docs.
custom_suffix str
Additional string appended to the role name. Not all AWS services support custom suffixes.
description str
The description of the role.

Outputs

All input properties are implicitly available as output properties. Additionally, the ServiceLinkedRole resource produces the following output properties:

Arn string
The Amazon Resource Name (ARN) specifying the role.
CreateDate string
The creation date of the IAM role.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the role.
Path string
The path of the role.
UniqueId string
The stable and unique string identifying the role.
Arn string
The Amazon Resource Name (ARN) specifying the role.
CreateDate string
The creation date of the IAM role.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the role.
Path string
The path of the role.
UniqueId string
The stable and unique string identifying the role.
arn string
The Amazon Resource Name (ARN) specifying the role.
createDate string
The creation date of the IAM role.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the role.
path string
The path of the role.
uniqueId string
The stable and unique string identifying the role.
arn str
The Amazon Resource Name (ARN) specifying the role.
create_date str
The creation date of the IAM role.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the role.
path str
The path of the role.
unique_id str
The stable and unique string identifying the role.

Look up an Existing ServiceLinkedRole Resource

Get an existing ServiceLinkedRole resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ServiceLinkedRoleState, opts?: CustomResourceOptions): ServiceLinkedRole
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        aws_service_name: Optional[str] = None,
        create_date: Optional[str] = None,
        custom_suffix: Optional[str] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        path: Optional[str] = None,
        unique_id: Optional[str] = None) -> ServiceLinkedRole
func GetServiceLinkedRole(ctx *Context, name string, id IDInput, state *ServiceLinkedRoleState, opts ...ResourceOption) (*ServiceLinkedRole, error)
public static ServiceLinkedRole Get(string name, Input<string> id, ServiceLinkedRoleState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string
The Amazon Resource Name (ARN) specifying the role.
AwsServiceName string
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. To find the full list of services that support service-linked roles, check the docs.
CreateDate string
The creation date of the IAM role.
CustomSuffix string
Additional string appended to the role name. Not all AWS services support custom suffixes.
Description string
The description of the role.
Name string
The name of the role.
Path string
The path of the role.
UniqueId string
The stable and unique string identifying the role.
Arn string
The Amazon Resource Name (ARN) specifying the role.
AwsServiceName string
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. To find the full list of services that support service-linked roles, check the docs.
CreateDate string
The creation date of the IAM role.
CustomSuffix string
Additional string appended to the role name. Not all AWS services support custom suffixes.
Description string
The description of the role.
Name string
The name of the role.
Path string
The path of the role.
UniqueId string
The stable and unique string identifying the role.
arn string
The Amazon Resource Name (ARN) specifying the role.
awsServiceName string
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. To find the full list of services that support service-linked roles, check the docs.
createDate string
The creation date of the IAM role.
customSuffix string
Additional string appended to the role name. Not all AWS services support custom suffixes.
description string
The description of the role.
name string
The name of the role.
path string
The path of the role.
uniqueId string
The stable and unique string identifying the role.
arn str
The Amazon Resource Name (ARN) specifying the role.
aws_service_name str
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. To find the full list of services that support service-linked roles, check the docs.
create_date str
The creation date of the IAM role.
custom_suffix str
Additional string appended to the role name. Not all AWS services support custom suffixes.
description str
The description of the role.
name str
The name of the role.
path str
The path of the role.
unique_id str
The stable and unique string identifying the role.

Import

IAM service-linked roles can be imported using role ARN, e.g.

 $ pulumi import aws:iam/serviceLinkedRole:ServiceLinkedRole elasticbeanstalk arn:aws:iam::123456789012:role/aws-service-role/elasticbeanstalk.amazonaws.com/AWSServiceRoleForElasticBeanstalk

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.