1. Packages
  2. Volcengine
  3. API Docs
  4. iam
  5. ServiceLinkedRole
Volcengine v0.0.37 published on Wednesday, Oct 22, 2025 by Volcengine

volcengine.iam.ServiceLinkedRole

Get Started
volcengine logo
Volcengine v0.0.37 published on Wednesday, Oct 22, 2025 by Volcengine

    Provides a resource to manage iam service linked role

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.iam.ServiceLinkedRole("foo", {serviceName: "ecs"});
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.iam.ServiceLinkedRole("foo", service_name="ecs")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/iam"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := iam.NewServiceLinkedRole(ctx, "foo", &iam.ServiceLinkedRoleArgs{
    			ServiceName: pulumi.String("ecs"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Iam.ServiceLinkedRole("foo", new()
        {
            ServiceName = "ecs",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.iam.ServiceLinkedRole;
    import com.pulumi.volcengine.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 foo = new ServiceLinkedRole("foo", ServiceLinkedRoleArgs.builder()        
                .serviceName("ecs")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: volcengine:iam:ServiceLinkedRole
        properties:
          serviceName: ecs
    

    Create ServiceLinkedRole Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ServiceLinkedRole(name: string, args: ServiceLinkedRoleArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceLinkedRole(resource_name: str,
                          args: ServiceLinkedRoleArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceLinkedRole(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          service_name: Optional[str] = None)
    func NewServiceLinkedRole(ctx *Context, name string, args ServiceLinkedRoleArgs, opts ...ResourceOption) (*ServiceLinkedRole, error)
    public ServiceLinkedRole(string name, ServiceLinkedRoleArgs args, CustomResourceOptions? opts = null)
    public ServiceLinkedRole(String name, ServiceLinkedRoleArgs args)
    public ServiceLinkedRole(String name, ServiceLinkedRoleArgs args, CustomResourceOptions options)
    
    type: volcengine:iam:ServiceLinkedRole
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.
    name String
    The unique name of the resource.
    args ServiceLinkedRoleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var serviceLinkedRoleResource = new Volcengine.Iam.ServiceLinkedRole("serviceLinkedRoleResource", new()
    {
        ServiceName = "string",
    });
    
    example, err := iam.NewServiceLinkedRole(ctx, "serviceLinkedRoleResource", &iam.ServiceLinkedRoleArgs{
    	ServiceName: pulumi.String("string"),
    })
    
    var serviceLinkedRoleResource = new ServiceLinkedRole("serviceLinkedRoleResource", ServiceLinkedRoleArgs.builder()
        .serviceName("string")
        .build());
    
    service_linked_role_resource = volcengine.iam.ServiceLinkedRole("serviceLinkedRoleResource", service_name="string")
    
    const serviceLinkedRoleResource = new volcengine.iam.ServiceLinkedRole("serviceLinkedRoleResource", {serviceName: "string"});
    
    type: volcengine:iam:ServiceLinkedRole
    properties:
        serviceName: string
    

    ServiceLinkedRole Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ServiceLinkedRole resource accepts the following input properties:

    ServiceName string
    The name of the service.
    ServiceName string
    The name of the service.
    serviceName String
    The name of the service.
    serviceName string
    The name of the service.
    service_name str
    The name of the service.
    serviceName String
    The name of the service.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    RoleId int
    The id of the role.
    RoleName string
    The name of the role.
    Status string
    The status of the role.
    Id string
    The provider-assigned unique ID for this managed resource.
    RoleId int
    The id of the role.
    RoleName string
    The name of the role.
    Status string
    The status of the role.
    id String
    The provider-assigned unique ID for this managed resource.
    roleId Integer
    The id of the role.
    roleName String
    The name of the role.
    status String
    The status of the role.
    id string
    The provider-assigned unique ID for this managed resource.
    roleId number
    The id of the role.
    roleName string
    The name of the role.
    status string
    The status of the role.
    id str
    The provider-assigned unique ID for this managed resource.
    role_id int
    The id of the role.
    role_name str
    The name of the role.
    status str
    The status of the role.
    id String
    The provider-assigned unique ID for this managed resource.
    roleId Number
    The id of the role.
    roleName String
    The name of the role.
    status String
    The status of the role.

    Look up 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,
            role_id: Optional[int] = None,
            role_name: Optional[str] = None,
            service_name: Optional[str] = None,
            status: 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)
    public static ServiceLinkedRole get(String name, Output<String> id, ServiceLinkedRoleState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:iam:ServiceLinkedRole    get:      id: ${id}
    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.
    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:
    RoleId int
    The id of the role.
    RoleName string
    The name of the role.
    ServiceName string
    The name of the service.
    Status string
    The status of the role.
    RoleId int
    The id of the role.
    RoleName string
    The name of the role.
    ServiceName string
    The name of the service.
    Status string
    The status of the role.
    roleId Integer
    The id of the role.
    roleName String
    The name of the role.
    serviceName String
    The name of the service.
    status String
    The status of the role.
    roleId number
    The id of the role.
    roleName string
    The name of the role.
    serviceName string
    The name of the service.
    status string
    The status of the role.
    role_id int
    The id of the role.
    role_name str
    The name of the role.
    service_name str
    The name of the service.
    status str
    The status of the role.
    roleId Number
    The id of the role.
    roleName String
    The name of the role.
    serviceName String
    The name of the service.
    status String
    The status of the role.

    Import

    IamServiceLinkedRole can be imported using the id, e.g.

    $ pulumi import volcengine:iam/serviceLinkedRole:ServiceLinkedRole default resource_id
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.37 published on Wednesday, Oct 22, 2025 by Volcengine
      Meet Neo: Your AI Platform Teammate