1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. resourcemanager
  5. ServiceLinkedRole
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.resourcemanager.ServiceLinkedRole

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    Provides a Resource Manager Service Linked Role.

    For information about Resource Manager Service Linked Role and how to use it, see What is Service Linked Role..

    NOTE: Available since v1.157.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const _default = new alicloud.resourcemanager.ServiceLinkedRole("default", {serviceName: "ops.elasticsearch.aliyuncs.com"});
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.resourcemanager.ServiceLinkedRole("default", service_name="ops.elasticsearch.aliyuncs.com")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := resourcemanager.NewServiceLinkedRole(ctx, "default", &resourcemanager.ServiceLinkedRoleArgs{
    			ServiceName: pulumi.String("ops.elasticsearch.aliyuncs.com"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new AliCloud.ResourceManager.ServiceLinkedRole("default", new()
        {
            ServiceName = "ops.elasticsearch.aliyuncs.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.resourcemanager.ServiceLinkedRole;
    import com.pulumi.alicloud.resourcemanager.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 default_ = new ServiceLinkedRole("default", ServiceLinkedRoleArgs.builder()
                .serviceName("ops.elasticsearch.aliyuncs.com")
                .build());
    
        }
    }
    
    resources:
      default:
        type: alicloud:resourcemanager:ServiceLinkedRole
        properties:
          serviceName: ops.elasticsearch.aliyuncs.com
    

    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,
                          custom_suffix: Optional[str] = None,
                          description: 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: alicloud:resourcemanager: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 exampleserviceLinkedRoleResourceResourceFromResourcemanagerserviceLinkedRole = new AliCloud.ResourceManager.ServiceLinkedRole("exampleserviceLinkedRoleResourceResourceFromResourcemanagerserviceLinkedRole", new()
    {
        ServiceName = "string",
        CustomSuffix = "string",
        Description = "string",
    });
    
    example, err := resourcemanager.NewServiceLinkedRole(ctx, "exampleserviceLinkedRoleResourceResourceFromResourcemanagerserviceLinkedRole", &resourcemanager.ServiceLinkedRoleArgs{
    	ServiceName:  pulumi.String("string"),
    	CustomSuffix: pulumi.String("string"),
    	Description:  pulumi.String("string"),
    })
    
    var exampleserviceLinkedRoleResourceResourceFromResourcemanagerserviceLinkedRole = new ServiceLinkedRole("exampleserviceLinkedRoleResourceResourceFromResourcemanagerserviceLinkedRole", ServiceLinkedRoleArgs.builder()
        .serviceName("string")
        .customSuffix("string")
        .description("string")
        .build());
    
    exampleservice_linked_role_resource_resource_from_resourcemanagerservice_linked_role = alicloud.resourcemanager.ServiceLinkedRole("exampleserviceLinkedRoleResourceResourceFromResourcemanagerserviceLinkedRole",
        service_name="string",
        custom_suffix="string",
        description="string")
    
    const exampleserviceLinkedRoleResourceResourceFromResourcemanagerserviceLinkedRole = new alicloud.resourcemanager.ServiceLinkedRole("exampleserviceLinkedRoleResourceResourceFromResourcemanagerserviceLinkedRole", {
        serviceName: "string",
        customSuffix: "string",
        description: "string",
    });
    
    type: alicloud:resourcemanager:ServiceLinkedRole
    properties:
        customSuffix: string
        description: string
        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 service name. For more information about the service name, see Cloud services that support service linked roles
    CustomSuffix string
    The suffix of the role name. Only a few service linked roles support custom suffixes. The role name (including its suffix) must be 1 to 64 characters in length and can contain letters, digits, periods (.), and hyphens (-). For example, if the suffix is Example, the role name is ServiceLinkedRoleName_Example.
    Description string
    The description of the service linked role. This parameter must be specified for only the service linked roles that support custom suffixes. Otherwise, the preset value is used and cannot be modified. The description must be 1 to 1,024 characters in length.
    ServiceName string
    The service name. For more information about the service name, see Cloud services that support service linked roles
    CustomSuffix string
    The suffix of the role name. Only a few service linked roles support custom suffixes. The role name (including its suffix) must be 1 to 64 characters in length and can contain letters, digits, periods (.), and hyphens (-). For example, if the suffix is Example, the role name is ServiceLinkedRoleName_Example.
    Description string
    The description of the service linked role. This parameter must be specified for only the service linked roles that support custom suffixes. Otherwise, the preset value is used and cannot be modified. The description must be 1 to 1,024 characters in length.
    serviceName String
    The service name. For more information about the service name, see Cloud services that support service linked roles
    customSuffix String
    The suffix of the role name. Only a few service linked roles support custom suffixes. The role name (including its suffix) must be 1 to 64 characters in length and can contain letters, digits, periods (.), and hyphens (-). For example, if the suffix is Example, the role name is ServiceLinkedRoleName_Example.
    description String
    The description of the service linked role. This parameter must be specified for only the service linked roles that support custom suffixes. Otherwise, the preset value is used and cannot be modified. The description must be 1 to 1,024 characters in length.
    serviceName string
    The service name. For more information about the service name, see Cloud services that support service linked roles
    customSuffix string
    The suffix of the role name. Only a few service linked roles support custom suffixes. The role name (including its suffix) must be 1 to 64 characters in length and can contain letters, digits, periods (.), and hyphens (-). For example, if the suffix is Example, the role name is ServiceLinkedRoleName_Example.
    description string
    The description of the service linked role. This parameter must be specified for only the service linked roles that support custom suffixes. Otherwise, the preset value is used and cannot be modified. The description must be 1 to 1,024 characters in length.
    service_name str
    The service name. For more information about the service name, see Cloud services that support service linked roles
    custom_suffix str
    The suffix of the role name. Only a few service linked roles support custom suffixes. The role name (including its suffix) must be 1 to 64 characters in length and can contain letters, digits, periods (.), and hyphens (-). For example, if the suffix is Example, the role name is ServiceLinkedRoleName_Example.
    description str
    The description of the service linked role. This parameter must be specified for only the service linked roles that support custom suffixes. Otherwise, the preset value is used and cannot be modified. The description must be 1 to 1,024 characters in length.
    serviceName String
    The service name. For more information about the service name, see Cloud services that support service linked roles
    customSuffix String
    The suffix of the role name. Only a few service linked roles support custom suffixes. The role name (including its suffix) must be 1 to 64 characters in length and can contain letters, digits, periods (.), and hyphens (-). For example, if the suffix is Example, the role name is ServiceLinkedRoleName_Example.
    description String
    The description of the service linked role. This parameter must be specified for only the service linked roles that support custom suffixes. Otherwise, the preset value is used and cannot be modified. The description must be 1 to 1,024 characters in length.

    Outputs

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

    Arn string
    The Alibaba Cloud Resource Name (ARN) of the role.
    Id string
    The provider-assigned unique ID for this managed resource.
    RoleId string
    The ID of the role.
    RoleName string
    The name of the role.
    Arn string
    The Alibaba Cloud Resource Name (ARN) of the role.
    Id string
    The provider-assigned unique ID for this managed resource.
    RoleId string
    The ID of the role.
    RoleName string
    The name of the role.
    arn String
    The Alibaba Cloud Resource Name (ARN) of the role.
    id String
    The provider-assigned unique ID for this managed resource.
    roleId String
    The ID of the role.
    roleName String
    The name of the role.
    arn string
    The Alibaba Cloud Resource Name (ARN) of the role.
    id string
    The provider-assigned unique ID for this managed resource.
    roleId string
    The ID of the role.
    roleName string
    The name of the role.
    arn str
    The Alibaba Cloud Resource Name (ARN) of the role.
    id str
    The provider-assigned unique ID for this managed resource.
    role_id str
    The ID of the role.
    role_name str
    The name of the role.
    arn String
    The Alibaba Cloud Resource Name (ARN) of the role.
    id String
    The provider-assigned unique ID for this managed resource.
    roleId String
    The ID of the role.
    roleName String
    The name 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,
            arn: Optional[str] = None,
            custom_suffix: Optional[str] = None,
            description: Optional[str] = None,
            role_id: Optional[str] = None,
            role_name: Optional[str] = None,
            service_name: 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)
    Resource lookup is not supported in YAML
    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:
    Arn string
    The Alibaba Cloud Resource Name (ARN) of the role.
    CustomSuffix string
    The suffix of the role name. Only a few service linked roles support custom suffixes. The role name (including its suffix) must be 1 to 64 characters in length and can contain letters, digits, periods (.), and hyphens (-). For example, if the suffix is Example, the role name is ServiceLinkedRoleName_Example.
    Description string
    The description of the service linked role. This parameter must be specified for only the service linked roles that support custom suffixes. Otherwise, the preset value is used and cannot be modified. The description must be 1 to 1,024 characters in length.
    RoleId string
    The ID of the role.
    RoleName string
    The name of the role.
    ServiceName string
    The service name. For more information about the service name, see Cloud services that support service linked roles
    Arn string
    The Alibaba Cloud Resource Name (ARN) of the role.
    CustomSuffix string
    The suffix of the role name. Only a few service linked roles support custom suffixes. The role name (including its suffix) must be 1 to 64 characters in length and can contain letters, digits, periods (.), and hyphens (-). For example, if the suffix is Example, the role name is ServiceLinkedRoleName_Example.
    Description string
    The description of the service linked role. This parameter must be specified for only the service linked roles that support custom suffixes. Otherwise, the preset value is used and cannot be modified. The description must be 1 to 1,024 characters in length.
    RoleId string
    The ID of the role.
    RoleName string
    The name of the role.
    ServiceName string
    The service name. For more information about the service name, see Cloud services that support service linked roles
    arn String
    The Alibaba Cloud Resource Name (ARN) of the role.
    customSuffix String
    The suffix of the role name. Only a few service linked roles support custom suffixes. The role name (including its suffix) must be 1 to 64 characters in length and can contain letters, digits, periods (.), and hyphens (-). For example, if the suffix is Example, the role name is ServiceLinkedRoleName_Example.
    description String
    The description of the service linked role. This parameter must be specified for only the service linked roles that support custom suffixes. Otherwise, the preset value is used and cannot be modified. The description must be 1 to 1,024 characters in length.
    roleId String
    The ID of the role.
    roleName String
    The name of the role.
    serviceName String
    The service name. For more information about the service name, see Cloud services that support service linked roles
    arn string
    The Alibaba Cloud Resource Name (ARN) of the role.
    customSuffix string
    The suffix of the role name. Only a few service linked roles support custom suffixes. The role name (including its suffix) must be 1 to 64 characters in length and can contain letters, digits, periods (.), and hyphens (-). For example, if the suffix is Example, the role name is ServiceLinkedRoleName_Example.
    description string
    The description of the service linked role. This parameter must be specified for only the service linked roles that support custom suffixes. Otherwise, the preset value is used and cannot be modified. The description must be 1 to 1,024 characters in length.
    roleId string
    The ID of the role.
    roleName string
    The name of the role.
    serviceName string
    The service name. For more information about the service name, see Cloud services that support service linked roles
    arn str
    The Alibaba Cloud Resource Name (ARN) of the role.
    custom_suffix str
    The suffix of the role name. Only a few service linked roles support custom suffixes. The role name (including its suffix) must be 1 to 64 characters in length and can contain letters, digits, periods (.), and hyphens (-). For example, if the suffix is Example, the role name is ServiceLinkedRoleName_Example.
    description str
    The description of the service linked role. This parameter must be specified for only the service linked roles that support custom suffixes. Otherwise, the preset value is used and cannot be modified. The description must be 1 to 1,024 characters in length.
    role_id str
    The ID of the role.
    role_name str
    The name of the role.
    service_name str
    The service name. For more information about the service name, see Cloud services that support service linked roles
    arn String
    The Alibaba Cloud Resource Name (ARN) of the role.
    customSuffix String
    The suffix of the role name. Only a few service linked roles support custom suffixes. The role name (including its suffix) must be 1 to 64 characters in length and can contain letters, digits, periods (.), and hyphens (-). For example, if the suffix is Example, the role name is ServiceLinkedRoleName_Example.
    description String
    The description of the service linked role. This parameter must be specified for only the service linked roles that support custom suffixes. Otherwise, the preset value is used and cannot be modified. The description must be 1 to 1,024 characters in length.
    roleId String
    The ID of the role.
    roleName String
    The name of the role.
    serviceName String
    The service name. For more information about the service name, see Cloud services that support service linked roles

    Import

    Resource Manager Service Linked Role can be imported using the id, e.g.

    $ pulumi import alicloud:resourcemanager/serviceLinkedRole:ServiceLinkedRole default <service_name>:<role_name>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi