dbtcloud.RedshiftCredential
Explore with Pulumi AI
Redshift credential resource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as dbtcloud from "@pulumi/dbtcloud";
const redshift = new dbtcloud.RedshiftCredential("redshift", {
numThreads: 16,
projectId: testProject.id,
defaultSchema: "my_schema",
username: "my_username",
password: "my_sensitive_password",
isActive: true,
});
import pulumi
import pulumi_dbtcloud as dbtcloud
redshift = dbtcloud.RedshiftCredential("redshift",
num_threads=16,
project_id=test_project["id"],
default_schema="my_schema",
username="my_username",
password="my_sensitive_password",
is_active=True)
package main
import (
"github.com/pulumi/pulumi-dbtcloud/sdk/go/dbtcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dbtcloud.NewRedshiftCredential(ctx, "redshift", &dbtcloud.RedshiftCredentialArgs{
NumThreads: pulumi.Int(16),
ProjectId: pulumi.Any(testProject.Id),
DefaultSchema: pulumi.String("my_schema"),
Username: pulumi.String("my_username"),
Password: pulumi.String("my_sensitive_password"),
IsActive: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DbtCloud = Pulumi.DbtCloud;
return await Deployment.RunAsync(() =>
{
var redshift = new DbtCloud.RedshiftCredential("redshift", new()
{
NumThreads = 16,
ProjectId = testProject.Id,
DefaultSchema = "my_schema",
Username = "my_username",
Password = "my_sensitive_password",
IsActive = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dbtcloud.RedshiftCredential;
import com.pulumi.dbtcloud.RedshiftCredentialArgs;
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 redshift = new RedshiftCredential("redshift", RedshiftCredentialArgs.builder()
.numThreads(16)
.projectId(testProject.id())
.defaultSchema("my_schema")
.username("my_username")
.password("my_sensitive_password")
.isActive(true)
.build());
}
}
resources:
redshift:
type: dbtcloud:RedshiftCredential
properties:
numThreads: 16
projectId: ${testProject.id}
defaultSchema: my_schema
username: my_username
password: my_sensitive_password
isActive: true
Create RedshiftCredential Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RedshiftCredential(name: string, args: RedshiftCredentialArgs, opts?: CustomResourceOptions);
@overload
def RedshiftCredential(resource_name: str,
args: RedshiftCredentialArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RedshiftCredential(resource_name: str,
opts: Optional[ResourceOptions] = None,
default_schema: Optional[str] = None,
num_threads: Optional[int] = None,
project_id: Optional[int] = None,
is_active: Optional[bool] = None,
password: Optional[str] = None,
username: Optional[str] = None)
func NewRedshiftCredential(ctx *Context, name string, args RedshiftCredentialArgs, opts ...ResourceOption) (*RedshiftCredential, error)
public RedshiftCredential(string name, RedshiftCredentialArgs args, CustomResourceOptions? opts = null)
public RedshiftCredential(String name, RedshiftCredentialArgs args)
public RedshiftCredential(String name, RedshiftCredentialArgs args, CustomResourceOptions options)
type: dbtcloud:RedshiftCredential
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 RedshiftCredentialArgs
- 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 RedshiftCredentialArgs
- 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 RedshiftCredentialArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RedshiftCredentialArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RedshiftCredentialArgs
- 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 redshiftCredentialResource = new DbtCloud.RedshiftCredential("redshiftCredentialResource", new()
{
DefaultSchema = "string",
NumThreads = 0,
ProjectId = 0,
IsActive = false,
Password = "string",
Username = "string",
});
example, err := dbtcloud.NewRedshiftCredential(ctx, "redshiftCredentialResource", &dbtcloud.RedshiftCredentialArgs{
DefaultSchema: pulumi.String("string"),
NumThreads: pulumi.Int(0),
ProjectId: pulumi.Int(0),
IsActive: pulumi.Bool(false),
Password: pulumi.String("string"),
Username: pulumi.String("string"),
})
var redshiftCredentialResource = new RedshiftCredential("redshiftCredentialResource", RedshiftCredentialArgs.builder()
.defaultSchema("string")
.numThreads(0)
.projectId(0)
.isActive(false)
.password("string")
.username("string")
.build());
redshift_credential_resource = dbtcloud.RedshiftCredential("redshiftCredentialResource",
default_schema="string",
num_threads=0,
project_id=0,
is_active=False,
password="string",
username="string")
const redshiftCredentialResource = new dbtcloud.RedshiftCredential("redshiftCredentialResource", {
defaultSchema: "string",
numThreads: 0,
projectId: 0,
isActive: false,
password: "string",
username: "string",
});
type: dbtcloud:RedshiftCredential
properties:
defaultSchema: string
isActive: false
numThreads: 0
password: string
projectId: 0
username: string
RedshiftCredential 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 RedshiftCredential resource accepts the following input properties:
- Default
Schema string - Default schema name
- Num
Threads int - Number of threads to use
- Project
Id int - Project ID to create the Redshift credential in
- Is
Active bool - Whether the Redshift credential is active
- Password string
- The password for the Redshift account
- Username string
- The username for the Redshift account.
- Default
Schema string - Default schema name
- Num
Threads int - Number of threads to use
- Project
Id int - Project ID to create the Redshift credential in
- Is
Active bool - Whether the Redshift credential is active
- Password string
- The password for the Redshift account
- Username string
- The username for the Redshift account.
- default
Schema String - Default schema name
- num
Threads Integer - Number of threads to use
- project
Id Integer - Project ID to create the Redshift credential in
- is
Active Boolean - Whether the Redshift credential is active
- password String
- The password for the Redshift account
- username String
- The username for the Redshift account.
- default
Schema string - Default schema name
- num
Threads number - Number of threads to use
- project
Id number - Project ID to create the Redshift credential in
- is
Active boolean - Whether the Redshift credential is active
- password string
- The password for the Redshift account
- username string
- The username for the Redshift account.
- default_
schema str - Default schema name
- num_
threads int - Number of threads to use
- project_
id int - Project ID to create the Redshift credential in
- is_
active bool - Whether the Redshift credential is active
- password str
- The password for the Redshift account
- username str
- The username for the Redshift account.
- default
Schema String - Default schema name
- num
Threads Number - Number of threads to use
- project
Id Number - Project ID to create the Redshift credential in
- is
Active Boolean - Whether the Redshift credential is active
- password String
- The password for the Redshift account
- username String
- The username for the Redshift account.
Outputs
All input properties are implicitly available as output properties. Additionally, the RedshiftCredential resource produces the following output properties:
- Credential
Id int - The internal credential ID
- Id string
- The provider-assigned unique ID for this managed resource.
- Credential
Id int - The internal credential ID
- Id string
- The provider-assigned unique ID for this managed resource.
- credential
Id Integer - The internal credential ID
- id String
- The provider-assigned unique ID for this managed resource.
- credential
Id number - The internal credential ID
- id string
- The provider-assigned unique ID for this managed resource.
- credential_
id int - The internal credential ID
- id str
- The provider-assigned unique ID for this managed resource.
- credential
Id Number - The internal credential ID
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing RedshiftCredential Resource
Get an existing RedshiftCredential 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?: RedshiftCredentialState, opts?: CustomResourceOptions): RedshiftCredential
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
credential_id: Optional[int] = None,
default_schema: Optional[str] = None,
is_active: Optional[bool] = None,
num_threads: Optional[int] = None,
password: Optional[str] = None,
project_id: Optional[int] = None,
username: Optional[str] = None) -> RedshiftCredential
func GetRedshiftCredential(ctx *Context, name string, id IDInput, state *RedshiftCredentialState, opts ...ResourceOption) (*RedshiftCredential, error)
public static RedshiftCredential Get(string name, Input<string> id, RedshiftCredentialState? state, CustomResourceOptions? opts = null)
public static RedshiftCredential get(String name, Output<String> id, RedshiftCredentialState state, CustomResourceOptions options)
resources: _: type: dbtcloud:RedshiftCredential 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.
- Credential
Id int - The internal credential ID
- Default
Schema string - Default schema name
- Is
Active bool - Whether the Redshift credential is active
- Num
Threads int - Number of threads to use
- Password string
- The password for the Redshift account
- Project
Id int - Project ID to create the Redshift credential in
- Username string
- The username for the Redshift account.
- Credential
Id int - The internal credential ID
- Default
Schema string - Default schema name
- Is
Active bool - Whether the Redshift credential is active
- Num
Threads int - Number of threads to use
- Password string
- The password for the Redshift account
- Project
Id int - Project ID to create the Redshift credential in
- Username string
- The username for the Redshift account.
- credential
Id Integer - The internal credential ID
- default
Schema String - Default schema name
- is
Active Boolean - Whether the Redshift credential is active
- num
Threads Integer - Number of threads to use
- password String
- The password for the Redshift account
- project
Id Integer - Project ID to create the Redshift credential in
- username String
- The username for the Redshift account.
- credential
Id number - The internal credential ID
- default
Schema string - Default schema name
- is
Active boolean - Whether the Redshift credential is active
- num
Threads number - Number of threads to use
- password string
- The password for the Redshift account
- project
Id number - Project ID to create the Redshift credential in
- username string
- The username for the Redshift account.
- credential_
id int - The internal credential ID
- default_
schema str - Default schema name
- is_
active bool - Whether the Redshift credential is active
- num_
threads int - Number of threads to use
- password str
- The password for the Redshift account
- project_
id int - Project ID to create the Redshift credential in
- username str
- The username for the Redshift account.
- credential
Id Number - The internal credential ID
- default
Schema String - Default schema name
- is
Active Boolean - Whether the Redshift credential is active
- num
Threads Number - Number of threads to use
- password String
- The password for the Redshift account
- project
Id Number - Project ID to create the Redshift credential in
- username String
- The username for the Redshift account.
Import
using import blocks (requires Terraform >= 1.5)
import {
to = dbtcloud_redshift_credential.my_credential
id = “project_id:credential_id”
}
import {
to = dbtcloud_redshift_credential.my_credential
id = “12345:6789”
}
using the older import command
$ pulumi import dbtcloud:index/redshiftCredential:RedshiftCredential my_credential "project_id:credential_id"
$ pulumi import dbtcloud:index/redshiftCredential:RedshiftCredential my_credential 12345:6789
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- dbtcloud pulumi/pulumi-dbtcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dbtcloud
Terraform Provider.