Apache Spark credential resource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as dbtcloud from "@pulumi/dbtcloud";
const mySparkCred = new dbtcloud.SparkCredential("my_spark_cred", {
projectId: dbtProject.id,
token: "abcdefgh",
schema: "my_schema",
});
import pulumi
import pulumi_dbtcloud as dbtcloud
my_spark_cred = dbtcloud.SparkCredential("my_spark_cred",
project_id=dbt_project["id"],
token="abcdefgh",
schema="my_schema")
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.NewSparkCredential(ctx, "my_spark_cred", &dbtcloud.SparkCredentialArgs{
ProjectId: pulumi.Any(dbtProject.Id),
Token: pulumi.String("abcdefgh"),
Schema: pulumi.String("my_schema"),
})
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 mySparkCred = new DbtCloud.SparkCredential("my_spark_cred", new()
{
ProjectId = dbtProject.Id,
Token = "abcdefgh",
Schema = "my_schema",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dbtcloud.SparkCredential;
import com.pulumi.dbtcloud.SparkCredentialArgs;
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 mySparkCred = new SparkCredential("mySparkCred", SparkCredentialArgs.builder()
.projectId(dbtProject.id())
.token("abcdefgh")
.schema("my_schema")
.build());
}
}
resources:
mySparkCred:
type: dbtcloud:SparkCredential
name: my_spark_cred
properties:
projectId: ${dbtProject.id}
token: abcdefgh
schema: my_schema
Create SparkCredential Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SparkCredential(name: string, args: SparkCredentialArgs, opts?: CustomResourceOptions);@overload
def SparkCredential(resource_name: str,
args: SparkCredentialArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SparkCredential(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[int] = None,
schema: Optional[str] = None,
token: Optional[str] = None,
target_name: Optional[str] = None)func NewSparkCredential(ctx *Context, name string, args SparkCredentialArgs, opts ...ResourceOption) (*SparkCredential, error)public SparkCredential(string name, SparkCredentialArgs args, CustomResourceOptions? opts = null)
public SparkCredential(String name, SparkCredentialArgs args)
public SparkCredential(String name, SparkCredentialArgs args, CustomResourceOptions options)
type: dbtcloud:SparkCredential
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 SparkCredentialArgs
- 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 SparkCredentialArgs
- 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 SparkCredentialArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SparkCredentialArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SparkCredentialArgs
- 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 sparkCredentialResource = new DbtCloud.SparkCredential("sparkCredentialResource", new()
{
ProjectId = 0,
Schema = "string",
Token = "string",
});
example, err := dbtcloud.NewSparkCredential(ctx, "sparkCredentialResource", &dbtcloud.SparkCredentialArgs{
ProjectId: pulumi.Int(0),
Schema: pulumi.String("string"),
Token: pulumi.String("string"),
})
var sparkCredentialResource = new SparkCredential("sparkCredentialResource", SparkCredentialArgs.builder()
.projectId(0)
.schema("string")
.token("string")
.build());
spark_credential_resource = dbtcloud.SparkCredential("sparkCredentialResource",
project_id=0,
schema="string",
token="string")
const sparkCredentialResource = new dbtcloud.SparkCredential("sparkCredentialResource", {
projectId: 0,
schema: "string",
token: "string",
});
type: dbtcloud:SparkCredential
properties:
projectId: 0
schema: string
token: string
SparkCredential 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 SparkCredential resource accepts the following input properties:
- Project
Id int - Project ID to create the Apache Spark credential in
- Schema string
- The schema where to create models
- Token string
- Token for Apache Spark user
- Target
Name string - Target name
- Project
Id int - Project ID to create the Apache Spark credential in
- Schema string
- The schema where to create models
- Token string
- Token for Apache Spark user
- Target
Name string - Target name
- project
Id Integer - Project ID to create the Apache Spark credential in
- schema String
- The schema where to create models
- token String
- Token for Apache Spark user
- target
Name String - Target name
- project
Id number - Project ID to create the Apache Spark credential in
- schema string
- The schema where to create models
- token string
- Token for Apache Spark user
- target
Name string - Target name
- project_
id int - Project ID to create the Apache Spark credential in
- schema str
- The schema where to create models
- token str
- Token for Apache Spark user
- target_
name str - Target name
- project
Id Number - Project ID to create the Apache Spark credential in
- schema String
- The schema where to create models
- token String
- Token for Apache Spark user
- target
Name String - Target name
Outputs
All input properties are implicitly available as output properties. Additionally, the SparkCredential resource produces the following output properties:
- Credential
Id int - The system Apache Spark credential ID
- Id string
- The provider-assigned unique ID for this managed resource.
- Credential
Id int - The system Apache Spark credential ID
- Id string
- The provider-assigned unique ID for this managed resource.
- credential
Id Integer - The system Apache Spark credential ID
- id String
- The provider-assigned unique ID for this managed resource.
- credential
Id number - The system Apache Spark credential ID
- id string
- The provider-assigned unique ID for this managed resource.
- credential_
id int - The system Apache Spark credential ID
- id str
- The provider-assigned unique ID for this managed resource.
- credential
Id Number - The system Apache Spark credential ID
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SparkCredential Resource
Get an existing SparkCredential 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?: SparkCredentialState, opts?: CustomResourceOptions): SparkCredential@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
credential_id: Optional[int] = None,
project_id: Optional[int] = None,
schema: Optional[str] = None,
target_name: Optional[str] = None,
token: Optional[str] = None) -> SparkCredentialfunc GetSparkCredential(ctx *Context, name string, id IDInput, state *SparkCredentialState, opts ...ResourceOption) (*SparkCredential, error)public static SparkCredential Get(string name, Input<string> id, SparkCredentialState? state, CustomResourceOptions? opts = null)public static SparkCredential get(String name, Output<String> id, SparkCredentialState state, CustomResourceOptions options)resources: _: type: dbtcloud:SparkCredential 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 system Apache Spark credential ID
- Project
Id int - Project ID to create the Apache Spark credential in
- Schema string
- The schema where to create models
- Target
Name string - Target name
- Token string
- Token for Apache Spark user
- Credential
Id int - The system Apache Spark credential ID
- Project
Id int - Project ID to create the Apache Spark credential in
- Schema string
- The schema where to create models
- Target
Name string - Target name
- Token string
- Token for Apache Spark user
- credential
Id Integer - The system Apache Spark credential ID
- project
Id Integer - Project ID to create the Apache Spark credential in
- schema String
- The schema where to create models
- target
Name String - Target name
- token String
- Token for Apache Spark user
- credential
Id number - The system Apache Spark credential ID
- project
Id number - Project ID to create the Apache Spark credential in
- schema string
- The schema where to create models
- target
Name string - Target name
- token string
- Token for Apache Spark user
- credential_
id int - The system Apache Spark credential ID
- project_
id int - Project ID to create the Apache Spark credential in
- schema str
- The schema where to create models
- target_
name str - Target name
- token str
- Token for Apache Spark user
- credential
Id Number - The system Apache Spark credential ID
- project
Id Number - Project ID to create the Apache Spark credential in
- schema String
- The schema where to create models
- target
Name String - Target name
- token String
- Token for Apache Spark user
Import
using import blocks (requires Terraform >= 1.5)
import {
to = dbtcloud_spark_credential.my_spark_credential
id = “project_id:credential_id”
}
import {
to = dbtcloud_spark_credential.my_spark_credential
id = “12345:6789”
}
using the older import command
$ pulumi import dbtcloud:index/sparkCredential:SparkCredential my_spark_credential "project_id:credential_id"
$ pulumi import dbtcloud:index/sparkCredential:SparkCredential my_spark_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
dbtcloudTerraform Provider.
