Skip to content

Commit

Permalink
Update SDK and Rootly API support
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmingoia committed Jan 8, 2024
1 parent 09cb01f commit 703d057
Show file tree
Hide file tree
Showing 182 changed files with 9,717 additions and 1,272 deletions.
4 changes: 2 additions & 2 deletions sdk/nodejs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
> This provider is a derived work of the [Terraform Provider](https://github.com/rootlyhq/terraform-provider-rootly)
> distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,
> first check the [`pulumi/pulumi-rootly` repo](https://github.com/pulumi/pulumi-rootly/issues); however, if that doesn't turn up anything,
> please consult the source [`rootlyhq/terraform-provider-rootly` repo](https://github.com/rootlyhq/terraform-provider-rootly/issues).
> first check the [`pulumi-rootly` repo](https://github.com/rootlyhq/pulumi-rootly/issues); however, if that doesn't turn up anything,
> please consult the source [`terraform-provider-rootly` repo](https://github.com/rootlyhq/terraform-provider-rootly/issues).
146 changes: 146 additions & 0 deletions sdk/nodejs/authorization.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

import * as pulumi from "@pulumi/pulumi";
import * as utilities from "./utilities";

export class Authorization extends pulumi.CustomResource {
/**
* Get an existing Authorization resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AuthorizationState, opts?: pulumi.CustomResourceOptions): Authorization {
return new Authorization(name, <any>state, { ...opts, id: id });
}

/** @internal */
public static readonly __pulumiType = 'rootly:index/authorization:Authorization';

/**
* Returns true if the given object is an instance of Authorization. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is Authorization {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Authorization.__pulumiType;
}

/**
* The id of the resource being accessed.
*/
public readonly authorizableId!: pulumi.Output<string>;
/**
* The type of resource being accessed.. Value must be one of `Dashboard`.
*/
public readonly authorizableType!: pulumi.Output<string | undefined>;
/**
* The resource id granted access.
*/
public readonly granteeId!: pulumi.Output<string>;
/**
* The type of resource granted access.. Value must be one of `User`, `Team`.
*/
public readonly granteeType!: pulumi.Output<string | undefined>;
/**
* Value must be one of `read`, `update`, `authorize`, `destroy`.
*/
public readonly permissions!: pulumi.Output<string[]>;

/**
* Create a Authorization resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: AuthorizationArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: AuthorizationArgs | AuthorizationState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as AuthorizationState | undefined;
resourceInputs["authorizableId"] = state ? state.authorizableId : undefined;
resourceInputs["authorizableType"] = state ? state.authorizableType : undefined;
resourceInputs["granteeId"] = state ? state.granteeId : undefined;
resourceInputs["granteeType"] = state ? state.granteeType : undefined;
resourceInputs["permissions"] = state ? state.permissions : undefined;
} else {
const args = argsOrState as AuthorizationArgs | undefined;
if ((!args || args.authorizableId === undefined) && !opts.urn) {
throw new Error("Missing required property 'authorizableId'");
}
if ((!args || args.granteeId === undefined) && !opts.urn) {
throw new Error("Missing required property 'granteeId'");
}
if ((!args || args.permissions === undefined) && !opts.urn) {
throw new Error("Missing required property 'permissions'");
}
resourceInputs["authorizableId"] = args ? args.authorizableId : undefined;
resourceInputs["authorizableType"] = args ? args.authorizableType : undefined;
resourceInputs["granteeId"] = args ? args.granteeId : undefined;
resourceInputs["granteeType"] = args ? args.granteeType : undefined;
resourceInputs["permissions"] = args ? args.permissions : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Authorization.__pulumiType, name, resourceInputs, opts);
}
}

/**
* Input properties used for looking up and filtering Authorization resources.
*/
export interface AuthorizationState {
/**
* The id of the resource being accessed.
*/
authorizableId?: pulumi.Input<string>;
/**
* The type of resource being accessed.. Value must be one of `Dashboard`.
*/
authorizableType?: pulumi.Input<string>;
/**
* The resource id granted access.
*/
granteeId?: pulumi.Input<string>;
/**
* The type of resource granted access.. Value must be one of `User`, `Team`.
*/
granteeType?: pulumi.Input<string>;
/**
* Value must be one of `read`, `update`, `authorize`, `destroy`.
*/
permissions?: pulumi.Input<pulumi.Input<string>[]>;
}

/**
* The set of arguments for constructing a Authorization resource.
*/
export interface AuthorizationArgs {
/**
* The id of the resource being accessed.
*/
authorizableId: pulumi.Input<string>;
/**
* The type of resource being accessed.. Value must be one of `Dashboard`.
*/
authorizableType?: pulumi.Input<string>;
/**
* The resource id granted access.
*/
granteeId: pulumi.Input<string>;
/**
* The type of resource granted access.. Value must be one of `User`, `Team`.
*/
granteeType?: pulumi.Input<string>;
/**
* Value must be one of `read`, `update`, `authorize`, `destroy`.
*/
permissions: pulumi.Input<pulumi.Input<string>[]>;
}
18 changes: 9 additions & 9 deletions sdk/nodejs/customFieldOption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class CustomFieldOption extends pulumi.CustomResource {
}

/**
* The hex color of the custom_field_option
* The hex color of the custom*field*option
*/
public readonly color!: pulumi.Output<string>;
/**
Expand All @@ -45,11 +45,11 @@ export class CustomFieldOption extends pulumi.CustomResource {
public readonly customFieldId!: pulumi.Output<number>;
public readonly default!: pulumi.Output<boolean>;
/**
* The position of the custom_field_option
* The position of the custom*field*option
*/
public readonly position!: pulumi.Output<number>;
/**
* The value of the custom_field_option
* The value of the custom*field*option
*/
public readonly value!: pulumi.Output<string>;

Expand Down Expand Up @@ -92,7 +92,7 @@ export class CustomFieldOption extends pulumi.CustomResource {
*/
export interface CustomFieldOptionState {
/**
* The hex color of the custom_field_option
* The hex color of the custom*field*option
*/
color?: pulumi.Input<string>;
/**
Expand All @@ -101,11 +101,11 @@ export interface CustomFieldOptionState {
customFieldId?: pulumi.Input<number>;
default?: pulumi.Input<boolean>;
/**
* The position of the custom_field_option
* The position of the custom*field*option
*/
position?: pulumi.Input<number>;
/**
* The value of the custom_field_option
* The value of the custom*field*option
*/
value?: pulumi.Input<string>;
}
Expand All @@ -115,7 +115,7 @@ export interface CustomFieldOptionState {
*/
export interface CustomFieldOptionArgs {
/**
* The hex color of the custom_field_option
* The hex color of the custom*field*option
*/
color?: pulumi.Input<string>;
/**
Expand All @@ -124,11 +124,11 @@ export interface CustomFieldOptionArgs {
customFieldId?: pulumi.Input<number>;
default?: pulumi.Input<boolean>;
/**
* The position of the custom_field_option
* The position of the custom*field*option
*/
position?: pulumi.Input<number>;
/**
* The value of the custom_field_option
* The value of the custom*field*option
*/
value: pulumi.Input<string>;
}
122 changes: 122 additions & 0 deletions sdk/nodejs/customForm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

import * as pulumi from "@pulumi/pulumi";
import * as utilities from "./utilities";

export class CustomForm extends pulumi.CustomResource {
/**
* Get an existing CustomForm resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CustomFormState, opts?: pulumi.CustomResourceOptions): CustomForm {
return new CustomForm(name, <any>state, { ...opts, id: id });
}

/** @internal */
public static readonly __pulumiType = 'rootly:index/customForm:CustomForm';

/**
* Returns true if the given object is an instance of CustomForm. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is CustomForm {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === CustomForm.__pulumiType;
}

/**
* The Slack command used to trigger this form.
*/
public readonly command!: pulumi.Output<string>;
public readonly description!: pulumi.Output<string>;
public readonly enabled!: pulumi.Output<boolean | undefined>;
/**
* The name of the custom form.
*/
public readonly name!: pulumi.Output<string>;
/**
* The custom form slug. Add this to form*field.shown or form*field.required to associate form fields with custom forms.
*/
public readonly slug!: pulumi.Output<string>;

/**
* Create a CustomForm resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: CustomFormArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: CustomFormArgs | CustomFormState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as CustomFormState | undefined;
resourceInputs["command"] = state ? state.command : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["slug"] = state ? state.slug : undefined;
} else {
const args = argsOrState as CustomFormArgs | undefined;
if ((!args || args.command === undefined) && !opts.urn) {
throw new Error("Missing required property 'command'");
}
resourceInputs["command"] = args ? args.command : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["slug"] = args ? args.slug : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(CustomForm.__pulumiType, name, resourceInputs, opts);
}
}

/**
* Input properties used for looking up and filtering CustomForm resources.
*/
export interface CustomFormState {
/**
* The Slack command used to trigger this form.
*/
command?: pulumi.Input<string>;
description?: pulumi.Input<string>;
enabled?: pulumi.Input<boolean>;
/**
* The name of the custom form.
*/
name?: pulumi.Input<string>;
/**
* The custom form slug. Add this to form*field.shown or form*field.required to associate form fields with custom forms.
*/
slug?: pulumi.Input<string>;
}

/**
* The set of arguments for constructing a CustomForm resource.
*/
export interface CustomFormArgs {
/**
* The Slack command used to trigger this form.
*/
command: pulumi.Input<string>;
description?: pulumi.Input<string>;
enabled?: pulumi.Input<boolean>;
/**
* The name of the custom form.
*/
name?: pulumi.Input<string>;
/**
* The custom form slug. Add this to form*field.shown or form*field.required to associate form fields with custom forms.
*/
slug?: pulumi.Input<string>;
}
4 changes: 2 additions & 2 deletions sdk/nodejs/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class Dashboard extends pulumi.CustomResource {
*/
public /*out*/ readonly slug!: pulumi.Output<string>;
/**
* The user_id of the dashboard, for dashboards with owner == user
* The userId of the dashboard, for dashboards with owner == user
*/
public /*out*/ readonly userId!: pulumi.Output<number>;

Expand Down Expand Up @@ -141,7 +141,7 @@ export interface DashboardState {
*/
slug?: pulumi.Input<string>;
/**
* The user_id of the dashboard, for dashboards with owner == user
* The userId of the dashboard, for dashboards with owner == user
*/
userId?: pulumi.Input<number>;
}
Expand Down
3 changes: 2 additions & 1 deletion sdk/nodejs/dashboardPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// *** Do not edit by hand unless you're certain you know what you are doing! ***

import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "./types";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
import * as utilities from "./utilities";

/**
Expand Down
Loading

0 comments on commit 703d057

Please sign in to comment.