influxdb.Authorization
Explore with Pulumi AI
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
This property is required. string - The unique name of the resource.
- args
This property is required. AuthorizationArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. 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
This property is required. string - The unique name of the resource.
- args
This property is required. AuthorizationArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. AuthorizationArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. 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=[{
"action": "string",
"resource": {
"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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Authorization resource accepts the following input properties:
- Org
Id This property is required. string - An organization ID. Identifies the organization that owns the resource.
- Permissions
This property is required. List<KomminarLabs. Influx DB. Inputs. Authorization Permission> - A list of permissions for an authorization.
- Description string
- A description of the token.
- Status string
- Status of the token. Valid values are
active
orinactive
. - User string
- A user name. Specifies the user that the authorization is scoped to.
- User
Id string - A user ID. Specifies the user that the authorization is scoped to.
- Org
Id This property is required. string - An organization ID. Identifies the organization that owns the resource.
- Permissions
This property is required. []AuthorizationPermission Args - A list of permissions for an authorization.
- Description string
- A description of the token.
- Status string
- Status of the token. Valid values are
active
orinactive
. - User string
- A user name. Specifies the user that the authorization is scoped to.
- User
Id string - A user ID. Specifies the user that the authorization is scoped to.
- org
Id This property is required. String - An organization ID. Identifies the organization that owns the resource.
- permissions
This property is required. 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
orinactive
. - user String
- A user name. Specifies the user that the authorization is scoped to.
- user
Id String - A user ID. Specifies the user that the authorization is scoped to.
- org
Id This property is required. string - An organization ID. Identifies the organization that owns the resource.
- permissions
This property is required. 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
orinactive
. - user string
- A user name. Specifies the user that the authorization is scoped to.
- user
Id string - A user ID. Specifies the user that the authorization is scoped to.
- org_
id This property is required. str - An organization ID. Identifies the organization that owns the resource.
- permissions
This property is required. Sequence[AuthorizationPermission Args] - A list of permissions for an authorization.
- description str
- A description of the token.
- status str
- Status of the token. Valid values are
active
orinactive
. - 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.
- org
Id This property is required. String - An organization ID. Identifies the organization that owns the resource.
- permissions
This property is required. 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
orinactive
. - user String
- A user name. Specifies the user that the authorization is scoped to.
- user
Id 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:
- 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.
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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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.
- Created
At string - Authorization creation date.
- Description string
- A description of the token.
- Org string
- An organization name. The organization that owns the resource.
- Org
Id string - An organization ID. Identifies the organization that owns the resource.
- Permissions
List<Komminar
Labs. Influx DB. Inputs. Authorization Permission> - A list of permissions for an authorization.
- Status string
- Status of the token. Valid values are
active
orinactive
. - Token string
- The API token.
- Updated
At string - Last Authorization update date.
- User string
- A user name. Specifies the user that the authorization is scoped to.
- User
Id string - A user ID. Specifies the user that the authorization is scoped to.
- Created
At string - Authorization creation date.
- Description string
- A description of the token.
- Org string
- An organization name. The organization that owns the resource.
- Org
Id string - An organization ID. Identifies the organization that owns the resource.
- Permissions
[]Authorization
Permission Args - A list of permissions for an authorization.
- Status string
- Status of the token. Valid values are
active
orinactive
. - Token string
- The API token.
- Updated
At string - Last Authorization update date.
- User string
- A user name. Specifies the user that the authorization is scoped to.
- User
Id string - A user ID. Specifies the user that the authorization is scoped to.
- created
At String - Authorization creation date.
- description String
- A description of the token.
- org String
- An organization name. The organization that owns the resource.
- org
Id String - An organization ID. Identifies the organization that owns the resource.
- permissions
List<Authorization
Permission> - A list of permissions for an authorization.
- status String
- Status of the token. Valid values are
active
orinactive
. - token String
- The API token.
- updated
At String - Last Authorization update date.
- user String
- A user name. Specifies the user that the authorization is scoped to.
- user
Id String - A user ID. Specifies the user that the authorization is scoped to.
- created
At string - Authorization creation date.
- description string
- A description of the token.
- org string
- An organization name. The organization that owns the resource.
- org
Id string - An organization ID. Identifies the organization that owns the resource.
- permissions
Authorization
Permission[] - A list of permissions for an authorization.
- status string
- Status of the token. Valid values are
active
orinactive
. - token string
- The API token.
- updated
At string - Last Authorization update date.
- user string
- A user name. Specifies the user that the authorization is scoped to.
- user
Id 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[Authorization
Permission Args] - A list of permissions for an authorization.
- status str
- Status of the token. Valid values are
active
orinactive
. - 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.
- created
At String - Authorization creation date.
- description String
- A description of the token.
- org String
- An organization name. The organization that owns the resource.
- org
Id 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
orinactive
. - token String
- The API token.
- updated
At String - Last Authorization update date.
- user String
- A user name. Specifies the user that the authorization is scoped to.
- user
Id String - A user ID. Specifies the user that the authorization is scoped to.
Supporting Types
AuthorizationPermission, AuthorizationPermissionArgs
- Action
This property is required. string - Permission action. Valid values are
read
orwrite
. - Resource
This property is required. KomminarLabs. Influx DB. Inputs. Authorization Permission Resource
- Action
This property is required. string - Permission action. Valid values are
read
orwrite
. - Resource
This property is required. AuthorizationPermission Resource
- action
This property is required. String - Permission action. Valid values are
read
orwrite
. - resource
This property is required. AuthorizationPermission Resource
- action
This property is required. string - Permission action. Valid values are
read
orwrite
. - resource
This property is required. AuthorizationPermission Resource
- action
This property is required. str - Permission action. Valid values are
read
orwrite
. - resource
This property is required. AuthorizationPermission Resource
- action
This property is required. String - Permission action. Valid values are
read
orwrite
. - resource
This property is required. Property Map
AuthorizationPermissionResource, AuthorizationPermissionResourceArgs
- Type
This property is required. 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.
- Org
Id string - An organization ID. Identifies the organization that owns the resource.
- Type
This property is required. 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.
- Org
Id string - An organization ID. Identifies the organization that owns the resource.
- type
This property is required. 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.
- org
Id String - An organization ID. Identifies the organization that owns the resource.
- type
This property is required. 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.
- org
Id string - An organization ID. Identifies the organization that owns the resource.
- type
This property is required. 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
This property is required. 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.
- org
Id 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.