1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Identity
  5. DbCredential
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Identity.DbCredential

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This resource provides the Db Credential resource in Oracle Cloud Infrastructure Identity service.

    Creates a new DB credential for the specified user.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testDbCredential = new oci.identity.DbCredential("test_db_credential", {
        description: dbCredentialDescription,
        password: dbCredentialPassword,
        userId: testUser.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_db_credential = oci.identity.DbCredential("test_db_credential",
        description=db_credential_description,
        password=db_credential_password,
        user_id=test_user["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Identity.NewDbCredential(ctx, "test_db_credential", &Identity.DbCredentialArgs{
    			Description: pulumi.Any(dbCredentialDescription),
    			Password:    pulumi.Any(dbCredentialPassword),
    			UserId:      pulumi.Any(testUser.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testDbCredential = new Oci.Identity.DbCredential("test_db_credential", new()
        {
            Description = dbCredentialDescription,
            Password = dbCredentialPassword,
            UserId = testUser.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Identity.DbCredential;
    import com.pulumi.oci.Identity.DbCredentialArgs;
    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 testDbCredential = new DbCredential("testDbCredential", DbCredentialArgs.builder()
                .description(dbCredentialDescription)
                .password(dbCredentialPassword)
                .userId(testUser.id())
                .build());
    
        }
    }
    
    resources:
      testDbCredential:
        type: oci:Identity:DbCredential
        name: test_db_credential
        properties:
          description: ${dbCredentialDescription}
          password: ${dbCredentialPassword}
          userId: ${testUser.id}
    

    Create DbCredential Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DbCredential(name: string, args: DbCredentialArgs, opts?: CustomResourceOptions);
    @overload
    def DbCredential(resource_name: str,
                     args: DbCredentialArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def DbCredential(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     description: Optional[str] = None,
                     password: Optional[str] = None,
                     user_id: Optional[str] = None)
    func NewDbCredential(ctx *Context, name string, args DbCredentialArgs, opts ...ResourceOption) (*DbCredential, error)
    public DbCredential(string name, DbCredentialArgs args, CustomResourceOptions? opts = null)
    public DbCredential(String name, DbCredentialArgs args)
    public DbCredential(String name, DbCredentialArgs args, CustomResourceOptions options)
    
    type: oci:Identity:DbCredential
    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 DbCredentialArgs
    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 DbCredentialArgs
    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 DbCredentialArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DbCredentialArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DbCredentialArgs
    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 dbCredentialResource = new Oci.Identity.DbCredential("dbCredentialResource", new()
    {
        Description = "string",
        Password = "string",
        UserId = "string",
    });
    
    example, err := Identity.NewDbCredential(ctx, "dbCredentialResource", &Identity.DbCredentialArgs{
    	Description: pulumi.String("string"),
    	Password:    pulumi.String("string"),
    	UserId:      pulumi.String("string"),
    })
    
    var dbCredentialResource = new DbCredential("dbCredentialResource", DbCredentialArgs.builder()
        .description("string")
        .password("string")
        .userId("string")
        .build());
    
    db_credential_resource = oci.identity.DbCredential("dbCredentialResource",
        description="string",
        password="string",
        user_id="string")
    
    const dbCredentialResource = new oci.identity.DbCredential("dbCredentialResource", {
        description: "string",
        password: "string",
        userId: "string",
    });
    
    type: oci:Identity:DbCredential
    properties:
        description: string
        password: string
        userId: string
    

    DbCredential 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 DbCredential resource accepts the following input properties:

    Description string
    The description you assign to the DB credentials during creation.
    Password string
    The password for the DB credentials during creation.
    UserId string

    The OCID of the user.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Description string
    The description you assign to the DB credentials during creation.
    Password string
    The password for the DB credentials during creation.
    UserId string

    The OCID of the user.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description String
    The description you assign to the DB credentials during creation.
    password String
    The password for the DB credentials during creation.
    userId String

    The OCID of the user.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description string
    The description you assign to the DB credentials during creation.
    password string
    The password for the DB credentials during creation.
    userId string

    The OCID of the user.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description str
    The description you assign to the DB credentials during creation.
    password str
    The password for the DB credentials during creation.
    user_id str

    The OCID of the user.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description String
    The description you assign to the DB credentials during creation.
    password String
    The password for the DB credentials during creation.
    userId String

    The OCID of the user.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DbCredential resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    LifecycleDetails string
    The detailed status of INACTIVE lifecycleState.
    State string
    The credential's current state. After creating a DB credential, make sure its lifecycleState changes from CREATING to ACTIVE before using it.
    TimeCreated string
    Date and time the DbCredential object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    TimeExpires string
    Date and time when this credential will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    Id string
    The provider-assigned unique ID for this managed resource.
    LifecycleDetails string
    The detailed status of INACTIVE lifecycleState.
    State string
    The credential's current state. After creating a DB credential, make sure its lifecycleState changes from CREATING to ACTIVE before using it.
    TimeCreated string
    Date and time the DbCredential object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    TimeExpires string
    Date and time when this credential will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    id String
    The provider-assigned unique ID for this managed resource.
    lifecycleDetails String
    The detailed status of INACTIVE lifecycleState.
    state String
    The credential's current state. After creating a DB credential, make sure its lifecycleState changes from CREATING to ACTIVE before using it.
    timeCreated String
    Date and time the DbCredential object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeExpires String
    Date and time when this credential will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    id string
    The provider-assigned unique ID for this managed resource.
    lifecycleDetails string
    The detailed status of INACTIVE lifecycleState.
    state string
    The credential's current state. After creating a DB credential, make sure its lifecycleState changes from CREATING to ACTIVE before using it.
    timeCreated string
    Date and time the DbCredential object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeExpires string
    Date and time when this credential will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    id str
    The provider-assigned unique ID for this managed resource.
    lifecycle_details str
    The detailed status of INACTIVE lifecycleState.
    state str
    The credential's current state. After creating a DB credential, make sure its lifecycleState changes from CREATING to ACTIVE before using it.
    time_created str
    Date and time the DbCredential object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    time_expires str
    Date and time when this credential will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    id String
    The provider-assigned unique ID for this managed resource.
    lifecycleDetails String
    The detailed status of INACTIVE lifecycleState.
    state String
    The credential's current state. After creating a DB credential, make sure its lifecycleState changes from CREATING to ACTIVE before using it.
    timeCreated String
    Date and time the DbCredential object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeExpires String
    Date and time when this credential will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z

    Look up Existing DbCredential Resource

    Get an existing DbCredential 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?: DbCredentialState, opts?: CustomResourceOptions): DbCredential
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            lifecycle_details: Optional[str] = None,
            password: Optional[str] = None,
            state: Optional[str] = None,
            time_created: Optional[str] = None,
            time_expires: Optional[str] = None,
            user_id: Optional[str] = None) -> DbCredential
    func GetDbCredential(ctx *Context, name string, id IDInput, state *DbCredentialState, opts ...ResourceOption) (*DbCredential, error)
    public static DbCredential Get(string name, Input<string> id, DbCredentialState? state, CustomResourceOptions? opts = null)
    public static DbCredential get(String name, Output<String> id, DbCredentialState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    Description string
    The description you assign to the DB credentials during creation.
    LifecycleDetails string
    The detailed status of INACTIVE lifecycleState.
    Password string
    The password for the DB credentials during creation.
    State string
    The credential's current state. After creating a DB credential, make sure its lifecycleState changes from CREATING to ACTIVE before using it.
    TimeCreated string
    Date and time the DbCredential object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    TimeExpires string
    Date and time when this credential will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    UserId string

    The OCID of the user.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Description string
    The description you assign to the DB credentials during creation.
    LifecycleDetails string
    The detailed status of INACTIVE lifecycleState.
    Password string
    The password for the DB credentials during creation.
    State string
    The credential's current state. After creating a DB credential, make sure its lifecycleState changes from CREATING to ACTIVE before using it.
    TimeCreated string
    Date and time the DbCredential object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    TimeExpires string
    Date and time when this credential will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    UserId string

    The OCID of the user.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description String
    The description you assign to the DB credentials during creation.
    lifecycleDetails String
    The detailed status of INACTIVE lifecycleState.
    password String
    The password for the DB credentials during creation.
    state String
    The credential's current state. After creating a DB credential, make sure its lifecycleState changes from CREATING to ACTIVE before using it.
    timeCreated String
    Date and time the DbCredential object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeExpires String
    Date and time when this credential will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    userId String

    The OCID of the user.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description string
    The description you assign to the DB credentials during creation.
    lifecycleDetails string
    The detailed status of INACTIVE lifecycleState.
    password string
    The password for the DB credentials during creation.
    state string
    The credential's current state. After creating a DB credential, make sure its lifecycleState changes from CREATING to ACTIVE before using it.
    timeCreated string
    Date and time the DbCredential object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeExpires string
    Date and time when this credential will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    userId string

    The OCID of the user.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description str
    The description you assign to the DB credentials during creation.
    lifecycle_details str
    The detailed status of INACTIVE lifecycleState.
    password str
    The password for the DB credentials during creation.
    state str
    The credential's current state. After creating a DB credential, make sure its lifecycleState changes from CREATING to ACTIVE before using it.
    time_created str
    Date and time the DbCredential object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    time_expires str
    Date and time when this credential will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    user_id str

    The OCID of the user.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description String
    The description you assign to the DB credentials during creation.
    lifecycleDetails String
    The detailed status of INACTIVE lifecycleState.
    password String
    The password for the DB credentials during creation.
    state String
    The credential's current state. After creating a DB credential, make sure its lifecycleState changes from CREATING to ACTIVE before using it.
    timeCreated String
    Date and time the DbCredential object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeExpires String
    Date and time when this credential will expire, in the format defined by RFC3339. Null if it never expires. Example: 2016-08-25T21:10:29.600Z
    userId String

    The OCID of the user.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Import

    Import is not supported for this resource.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi