logdna.Category
Explore with Pulumi AI
# Resource: logdna.Category
Manages LogDNA Categories. Categories are designed to organize views, boards and screens. Categories can be created standalone and then attached to any views, boards, or screens.
To get started, all you need to do is to specify one of supported type
: views, boards, or screens and name
.
Example - Basic Category
import * as pulumi from "@pulumi/pulumi";
import * as logdna from "@pulumi/logdna";
const myCategory = new logdna.Category("myCategory", {type: "views"});
import pulumi
import pulumi_logdna as logdna
my_category = logdna.Category("myCategory", type="views")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/logdna/logdna"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := logdna.NewCategory(ctx, "myCategory", &logdna.CategoryArgs{
Type: pulumi.String("views"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Logdna = Pulumi.Logdna;
return await Deployment.RunAsync(() =>
{
var myCategory = new Logdna.Category("myCategory", new()
{
Type = "views",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.logdna.Category;
import com.pulumi.logdna.CategoryArgs;
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 myCategory = new Category("myCategory", CategoryArgs.builder()
.type("views")
.build());
}
}
resources:
myCategory:
type: logdna:Category
properties:
type: views
Create Category Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Category(name: string, args?: CategoryArgs, opts?: CustomResourceOptions);
@overload
def Category(resource_name: str,
args: Optional[CategoryArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Category(resource_name: str,
opts: Optional[ResourceOptions] = None,
category_id: Optional[str] = None,
name: Optional[str] = None,
type: Optional[str] = None)
func NewCategory(ctx *Context, name string, args *CategoryArgs, opts ...ResourceOption) (*Category, error)
public Category(string name, CategoryArgs? args = null, CustomResourceOptions? opts = null)
public Category(String name, CategoryArgs args)
public Category(String name, CategoryArgs args, CustomResourceOptions options)
type: logdna:Category
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 CategoryArgs
- 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 CategoryArgs
- 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 CategoryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CategoryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CategoryArgs
- 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 categoryResource = new Logdna.Category("categoryResource", new()
{
CategoryId = "string",
Name = "string",
Type = "string",
});
example, err := logdna.NewCategory(ctx, "categoryResource", &logdna.CategoryArgs{
CategoryId: pulumi.String("string"),
Name: pulumi.String("string"),
Type: pulumi.String("string"),
})
var categoryResource = new Category("categoryResource", CategoryArgs.builder()
.categoryId("string")
.name("string")
.type("string")
.build());
category_resource = logdna.Category("categoryResource",
category_id="string",
name="string",
type="string")
const categoryResource = new logdna.Category("categoryResource", {
categoryId: "string",
name: "string",
type: "string",
});
type: logdna:Category
properties:
categoryId: string
name: string
type: string
Category 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 Category resource accepts the following input properties:
- Category
Id string - Name string
- string (Required) The name this Category will be given
- Type string
- string (Required) The type this Category belongs to, valid options are:
views
,boards
,screens
- Category
Id string - Name string
- string (Required) The name this Category will be given
- Type string
- string (Required) The type this Category belongs to, valid options are:
views
,boards
,screens
- category
Id String - name String
- string (Required) The name this Category will be given
- type String
- string (Required) The type this Category belongs to, valid options are:
views
,boards
,screens
- category
Id string - name string
- string (Required) The name this Category will be given
- type string
- string (Required) The type this Category belongs to, valid options are:
views
,boards
,screens
- category_
id str - name str
- string (Required) The name this Category will be given
- type str
- string (Required) The type this Category belongs to, valid options are:
views
,boards
,screens
- category
Id String - name String
- string (Required) The name this Category will be given
- type String
- string (Required) The type this Category belongs to, valid options are:
views
,boards
,screens
Outputs
All input properties are implicitly available as output properties. Additionally, the Category resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Category Resource
Get an existing Category 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?: CategoryState, opts?: CustomResourceOptions): Category
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
category_id: Optional[str] = None,
name: Optional[str] = None,
type: Optional[str] = None) -> Category
func GetCategory(ctx *Context, name string, id IDInput, state *CategoryState, opts ...ResourceOption) (*Category, error)
public static Category Get(string name, Input<string> id, CategoryState? state, CustomResourceOptions? opts = null)
public static Category get(String name, Output<String> id, CategoryState state, CustomResourceOptions options)
resources: _: type: logdna:Category 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.
- Category
Id string - Name string
- string (Required) The name this Category will be given
- Type string
- string (Required) The type this Category belongs to, valid options are:
views
,boards
,screens
- Category
Id string - Name string
- string (Required) The name this Category will be given
- Type string
- string (Required) The type this Category belongs to, valid options are:
views
,boards
,screens
- category
Id String - name String
- string (Required) The name this Category will be given
- type String
- string (Required) The type this Category belongs to, valid options are:
views
,boards
,screens
- category
Id string - name string
- string (Required) The name this Category will be given
- type string
- string (Required) The type this Category belongs to, valid options are:
views
,boards
,screens
- category_
id str - name str
- string (Required) The name this Category will be given
- type str
- string (Required) The type this Category belongs to, valid options are:
views
,boards
,screens
- category
Id String - name String
- string (Required) The name this Category will be given
- type String
- string (Required) The type this Category belongs to, valid options are:
views
,boards
,screens
Import
Categories can be imported by type
and id
, which can be found using the List Categories API:
- Custom HTTP Headers -
servicekey: <SERVICE_KEY>
orapikey: <SERVICE_KEY>
curl –request GET \
--url <API_URL>/v1/config/categories/<CATEGORY_TYPE> \
--header 'Accept: application/json' \
--header 'servicekey: <SERVICE_KEY>'
- Basic Auth -
Authorization: Basic <encodeInBase64(credentials)>
.
Credentials is a string composed of formatted as <username>:<password>
, our usage here entails substituting <SERVICE_KEY>
as the username and leaving the password blank. The colon separator should still included in the resulting string <SERVICE_KEY>:
curl –request GET \
--url <API_URL>/v1/config/categories/<CATEGORY_TYPE> \
--header 'Accept: application/json' \
--header 'Authorization: Basic <BASE_64_ENCODED_CREDENTIALS>'
$ pulumi import logdna:index/category:Category your-category-name <type>:<id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- logdna logdna/terraform-provider-logdna
- License
- Notes
- This Pulumi package is based on the
logdna
Terraform Provider.