ServiceLinkedRoleArgs

data class ServiceLinkedRoleArgs(val awsServiceName: Output<String>? = null, val customSuffix: Output<String>? = null, val description: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<ServiceLinkedRoleArgs>

Provides an IAM service-linked role.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const elasticbeanstalk = new aws.iam.ServiceLinkedRole("elasticbeanstalk", {awsServiceName: "elasticbeanstalk.amazonaws.com"});
import pulumi
import pulumi_aws as aws
elasticbeanstalk = aws.iam.ServiceLinkedRole("elasticbeanstalk", aws_service_name="elasticbeanstalk.amazonaws.com")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var elasticbeanstalk = new Aws.Iam.ServiceLinkedRole("elasticbeanstalk", new()
{
AwsServiceName = "elasticbeanstalk.amazonaws.com",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.ServiceLinkedRole;
import com.pulumi.aws.iam.ServiceLinkedRoleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var elasticbeanstalk = new ServiceLinkedRole("elasticbeanstalk", ServiceLinkedRoleArgs.builder()
.awsServiceName("elasticbeanstalk.amazonaws.com")
.build());
}
}
resources:
elasticbeanstalk:
type: aws:iam:ServiceLinkedRole
properties:
awsServiceName: elasticbeanstalk.amazonaws.com

Import

Using pulumi import, import IAM service-linked roles using role ARN. For example:

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

Constructors

Link copied to clipboard
constructor(awsServiceName: Output<String>? = null, customSuffix: Output<String>? = null, description: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val awsServiceName: Output<String>? = null

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.

Link copied to clipboard
val customSuffix: Output<String>? = null

Additional string appended to the role name. Not all AWS services support custom suffixes.

Link copied to clipboard
val description: Output<String>? = null

The description of the role.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Key-value mapping of tags for the IAM role. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

Link copied to clipboard
open override fun toJava(): ServiceLinkedRoleArgs