1. Packages
  2. InfluxDB
  3. API Docs
  4. Authorization
InfluxDB v1.2.0 published on Tuesday, Apr 16, 2024 by komminarlabs

influxdb.Authorization

Explore with Pulumi AI

influxdb logo
InfluxDB v1.2.0 published on Tuesday, Apr 16, 2024 by komminarlabs

    Creates and manages an authorization and returns the authorization with the generated API token. Use this resource to create/manage an authorization, which generates an API token with permissions to read or write to a specific resource or type of resource.

    Create Authorization Resource

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

    Constructor syntax

    new Authorization(name: string, args: AuthorizationArgs, opts?: CustomResourceOptions);
    @overload
    def Authorization(resource_name: str,
                      args: AuthorizationArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def Authorization(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      org_id: Optional[str] = None,
                      permissions: Optional[Sequence[AuthorizationPermissionArgs]] = None,
                      description: Optional[str] = None,
                      status: Optional[str] = None,
                      user: Optional[str] = None,
                      user_id: Optional[str] = None)
    func NewAuthorization(ctx *Context, name string, args AuthorizationArgs, opts ...ResourceOption) (*Authorization, error)
    public Authorization(string name, AuthorizationArgs args, CustomResourceOptions? opts = null)
    public Authorization(String name, AuthorizationArgs args)
    public Authorization(String name, AuthorizationArgs args, CustomResourceOptions options)
    
    type: influxdb:Authorization
    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 AuthorizationArgs
    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 AuthorizationArgs
    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 AuthorizationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AuthorizationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AuthorizationArgs
    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 authorizationResource = new InfluxDB.Authorization("authorizationResource", new()
    {
        OrgId = "string",
        Permissions = new[]
        {
            new InfluxDB.Inputs.AuthorizationPermissionArgs
            {
                Action = "string",
                Resource = new InfluxDB.Inputs.AuthorizationPermissionResourceArgs
                {
                    Type = "string",
                    Id = "string",
                    Name = "string",
                    Org = "string",
                    OrgId = "string",
                },
            },
        },
        Description = "string",
        Status = "string",
        User = "string",
        UserId = "string",
    });
    
    example, err := influxdb.NewAuthorization(ctx, "authorizationResource", &influxdb.AuthorizationArgs{
    	OrgId: pulumi.String("string"),
    	Permissions: influxdb.AuthorizationPermissionArray{
    		&influxdb.AuthorizationPermissionArgs{
    			Action: pulumi.String("string"),
    			Resource: &influxdb.AuthorizationPermissionResourceArgs{
    				Type:  pulumi.String("string"),
    				Id:    pulumi.String("string"),
    				Name:  pulumi.String("string"),
    				Org:   pulumi.String("string"),
    				OrgId: pulumi.String("string"),
    			},
    		},
    	},
    	Description: pulumi.String("string"),
    	Status:      pulumi.String("string"),
    	User:        pulumi.String("string"),
    	UserId:      pulumi.String("string"),
    })
    
    var authorizationResource = new Authorization("authorizationResource", AuthorizationArgs.builder()
        .orgId("string")
        .permissions(AuthorizationPermissionArgs.builder()
            .action("string")
            .resource(AuthorizationPermissionResourceArgs.builder()
                .type("string")
                .id("string")
                .name("string")
                .org("string")
                .orgId("string")
                .build())
            .build())
        .description("string")
        .status("string")
        .user("string")
        .userId("string")
        .build());
    
    authorization_resource = influxdb.Authorization("authorizationResource",
        org_id="string",
        permissions=[influxdb.AuthorizationPermissionArgs(
            action="string",
            resource=influxdb.AuthorizationPermissionResourceArgs(
                type="string",
                id="string",
                name="string",
                org="string",
                org_id="string",
            ),
        )],
        description="string",
        status="string",
        user="string",
        user_id="string")
    
    const authorizationResource = new influxdb.Authorization("authorizationResource", {
        orgId: "string",
        permissions: [{
            action: "string",
            resource: {
                type: "string",
                id: "string",
                name: "string",
                org: "string",
                orgId: "string",
            },
        }],
        description: "string",
        status: "string",
        user: "string",
        userId: "string",
    });
    
    type: influxdb:Authorization
    properties:
        description: string
        orgId: string
        permissions:
            - action: string
              resource:
                id: string
                name: string
                org: string
                orgId: string
                type: string
        status: string
        user: string
        userId: string
    

    Authorization Resource Properties

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

    Inputs

    The Authorization resource accepts the following input properties:

    OrgId string
    An organization ID. Identifies the organization that owns the resource.
    Permissions List<KomminarLabs.InfluxDB.Inputs.AuthorizationPermission>
    A list of permissions for an authorization.
    Description string
    A description of the token.
    Status string
    Status of the token. Valid values are active or inactive.
    User string
    A user name. Specifies the user that the authorization is scoped to.
    UserId string
    A user ID. Specifies the user that the authorization is scoped to.
    OrgId string
    An organization ID. Identifies the organization that owns the resource.
    Permissions []AuthorizationPermissionArgs
    A list of permissions for an authorization.
    Description string
    A description of the token.
    Status string
    Status of the token. Valid values are active or inactive.
    User string
    A user name. Specifies the user that the authorization is scoped to.
    UserId string
    A user ID. Specifies the user that the authorization is scoped to.
    orgId String
    An organization ID. Identifies the organization that owns the resource.
    permissions List<AuthorizationPermission>
    A list of permissions for an authorization.
    description String
    A description of the token.
    status String
    Status of the token. Valid values are active or inactive.
    user String
    A user name. Specifies the user that the authorization is scoped to.
    userId String
    A user ID. Specifies the user that the authorization is scoped to.
    orgId string
    An organization ID. Identifies the organization that owns the resource.
    permissions AuthorizationPermission[]
    A list of permissions for an authorization.
    description string
    A description of the token.
    status string
    Status of the token. Valid values are active or inactive.
    user string
    A user name. Specifies the user that the authorization is scoped to.
    userId string
    A user ID. Specifies the user that the authorization is scoped to.
    org_id str
    An organization ID. Identifies the organization that owns the resource.
    permissions Sequence[AuthorizationPermissionArgs]
    A list of permissions for an authorization.
    description str
    A description of the token.
    status str
    Status of the token. Valid values are active or inactive.
    user str
    A user name. Specifies the user that the authorization is scoped to.
    user_id str
    A user ID. Specifies the user that the authorization is scoped to.
    orgId String
    An organization ID. Identifies the organization that owns the resource.
    permissions List<Property Map>
    A list of permissions for an authorization.
    description String
    A description of the token.
    status String
    Status of the token. Valid values are active or inactive.
    user String
    A user name. Specifies the user that the authorization is scoped to.
    userId String
    A user ID. Specifies the user that the authorization is scoped to.

    Outputs

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

    CreatedAt string
    Authorization creation date.
    Id string
    The provider-assigned unique ID for this managed resource.
    Org string
    An organization name. The organization that owns the resource.
    Token string
    The API token.
    UpdatedAt string
    Last Authorization update date.
    CreatedAt string
    Authorization creation date.
    Id string
    The provider-assigned unique ID for this managed resource.
    Org string
    An organization name. The organization that owns the resource.
    Token string
    The API token.
    UpdatedAt string
    Last Authorization update date.
    createdAt String
    Authorization creation date.
    id String
    The provider-assigned unique ID for this managed resource.
    org String
    An organization name. The organization that owns the resource.
    token String
    The API token.
    updatedAt String
    Last Authorization update date.
    createdAt string
    Authorization creation date.
    id string
    The provider-assigned unique ID for this managed resource.
    org string
    An organization name. The organization that owns the resource.
    token string
    The API token.
    updatedAt string
    Last Authorization update date.
    created_at str
    Authorization creation date.
    id str
    The provider-assigned unique ID for this managed resource.
    org str
    An organization name. The organization that owns the resource.
    token str
    The API token.
    updated_at str
    Last Authorization update date.
    createdAt String
    Authorization creation date.
    id String
    The provider-assigned unique ID for this managed resource.
    org String
    An organization name. The organization that owns the resource.
    token String
    The API token.
    updatedAt String
    Last Authorization update date.

    Look up Existing Authorization Resource

    Get an existing Authorization 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?: AuthorizationState, opts?: CustomResourceOptions): Authorization
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            description: Optional[str] = None,
            org: Optional[str] = None,
            org_id: Optional[str] = None,
            permissions: Optional[Sequence[AuthorizationPermissionArgs]] = None,
            status: Optional[str] = None,
            token: Optional[str] = None,
            updated_at: Optional[str] = None,
            user: Optional[str] = None,
            user_id: Optional[str] = None) -> Authorization
    func GetAuthorization(ctx *Context, name string, id IDInput, state *AuthorizationState, opts ...ResourceOption) (*Authorization, error)
    public static Authorization Get(string name, Input<string> id, AuthorizationState? state, CustomResourceOptions? opts = null)
    public static Authorization get(String name, Output<String> id, AuthorizationState 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:
    CreatedAt string
    Authorization creation date.
    Description string
    A description of the token.
    Org string
    An organization name. The organization that owns the resource.
    OrgId string
    An organization ID. Identifies the organization that owns the resource.
    Permissions List<KomminarLabs.InfluxDB.Inputs.AuthorizationPermission>
    A list of permissions for an authorization.
    Status string
    Status of the token. Valid values are active or inactive.
    Token string
    The API token.
    UpdatedAt string
    Last Authorization update date.
    User string
    A user name. Specifies the user that the authorization is scoped to.
    UserId string
    A user ID. Specifies the user that the authorization is scoped to.
    CreatedAt string
    Authorization creation date.
    Description string
    A description of the token.
    Org string
    An organization name. The organization that owns the resource.
    OrgId string
    An organization ID. Identifies the organization that owns the resource.
    Permissions []AuthorizationPermissionArgs
    A list of permissions for an authorization.
    Status string
    Status of the token. Valid values are active or inactive.
    Token string
    The API token.
    UpdatedAt string
    Last Authorization update date.
    User string
    A user name. Specifies the user that the authorization is scoped to.
    UserId string
    A user ID. Specifies the user that the authorization is scoped to.
    createdAt String
    Authorization creation date.
    description String
    A description of the token.
    org String
    An organization name. The organization that owns the resource.
    orgId String
    An organization ID. Identifies the organization that owns the resource.
    permissions List<AuthorizationPermission>
    A list of permissions for an authorization.
    status String
    Status of the token. Valid values are active or inactive.
    token String
    The API token.
    updatedAt String
    Last Authorization update date.
    user String
    A user name. Specifies the user that the authorization is scoped to.
    userId String
    A user ID. Specifies the user that the authorization is scoped to.
    createdAt string
    Authorization creation date.
    description string
    A description of the token.
    org string
    An organization name. The organization that owns the resource.
    orgId string
    An organization ID. Identifies the organization that owns the resource.
    permissions AuthorizationPermission[]
    A list of permissions for an authorization.
    status string
    Status of the token. Valid values are active or inactive.
    token string
    The API token.
    updatedAt string
    Last Authorization update date.
    user string
    A user name. Specifies the user that the authorization is scoped to.
    userId string
    A user ID. Specifies the user that the authorization is scoped to.
    created_at str
    Authorization creation date.
    description str
    A description of the token.
    org str
    An organization name. The organization that owns the resource.
    org_id str
    An organization ID. Identifies the organization that owns the resource.
    permissions Sequence[AuthorizationPermissionArgs]
    A list of permissions for an authorization.
    status str
    Status of the token. Valid values are active or inactive.
    token str
    The API token.
    updated_at str
    Last Authorization update date.
    user str
    A user name. Specifies the user that the authorization is scoped to.
    user_id str
    A user ID. Specifies the user that the authorization is scoped to.
    createdAt String
    Authorization creation date.
    description String
    A description of the token.
    org String
    An organization name. The organization that owns the resource.
    orgId String
    An organization ID. Identifies the organization that owns the resource.
    permissions List<Property Map>
    A list of permissions for an authorization.
    status String
    Status of the token. Valid values are active or inactive.
    token String
    The API token.
    updatedAt String
    Last Authorization update date.
    user String
    A user name. Specifies the user that the authorization is scoped to.
    userId String
    A user ID. Specifies the user that the authorization is scoped to.

    Supporting Types

    AuthorizationPermission, AuthorizationPermissionArgs

    Action string
    Permission action. Valid values are read or write.
    Resource KomminarLabs.InfluxDB.Inputs.AuthorizationPermissionResource
    Action string
    Permission action. Valid values are read or write.
    Resource AuthorizationPermissionResource
    action String
    Permission action. Valid values are read or write.
    resource AuthorizationPermissionResource
    action string
    Permission action. Valid values are read or write.
    resource AuthorizationPermissionResource
    action str
    Permission action. Valid values are read or write.
    resource AuthorizationPermissionResource
    action String
    Permission action. Valid values are read or write.
    resource Property Map

    AuthorizationPermissionResource, AuthorizationPermissionResourceArgs

    Type string
    A resource type. Identifies the API resource's type (or kind).
    Id string
    A resource ID. Identifies a specific resource.
    Name string
    The name of the resource. Note: not all resource types have a name property.
    Org string
    An organization name. The organization that owns the resource.
    OrgId string
    An organization ID. Identifies the organization that owns the resource.
    Type string
    A resource type. Identifies the API resource's type (or kind).
    Id string
    A resource ID. Identifies a specific resource.
    Name string
    The name of the resource. Note: not all resource types have a name property.
    Org string
    An organization name. The organization that owns the resource.
    OrgId string
    An organization ID. Identifies the organization that owns the resource.
    type String
    A resource type. Identifies the API resource's type (or kind).
    id String
    A resource ID. Identifies a specific resource.
    name String
    The name of the resource. Note: not all resource types have a name property.
    org String
    An organization name. The organization that owns the resource.
    orgId String
    An organization ID. Identifies the organization that owns the resource.
    type string
    A resource type. Identifies the API resource's type (or kind).
    id string
    A resource ID. Identifies a specific resource.
    name string
    The name of the resource. Note: not all resource types have a name property.
    org string
    An organization name. The organization that owns the resource.
    orgId string
    An organization ID. Identifies the organization that owns the resource.
    type str
    A resource type. Identifies the API resource's type (or kind).
    id str
    A resource ID. Identifies a specific resource.
    name str
    The name of the resource. Note: not all resource types have a name property.
    org str
    An organization name. The organization that owns the resource.
    org_id str
    An organization ID. Identifies the organization that owns the resource.
    type String
    A resource type. Identifies the API resource's type (or kind).
    id String
    A resource ID. Identifies a specific resource.
    name String
    The name of the resource. Note: not all resource types have a name property.
    org String
    An organization name. The organization that owns the resource.
    orgId String
    An organization ID. Identifies the organization that owns the resource.

    Package Details

    Repository
    influxdb komminarlabs/pulumi-influxdb
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the influxdb Terraform Provider.
    influxdb logo
    InfluxDB v1.2.0 published on Tuesday, Apr 16, 2024 by komminarlabs