1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Database
  5. CloudDatabaseManagement
Oracle Cloud Infrastructure v1.16.1 published on Wednesday, Nov 22, 2023 by Pulumi

oci.Database.CloudDatabaseManagement

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.16.1 published on Wednesday, Nov 22, 2023 by Pulumi

    This resource provides the Database Management resource in Oracle Cloud Infrastructure Database service.

    Enable / Update / Disable database management for the specified Oracle Database instance.

    Database Management requires USER_NAME, PASSWORD_SECRET_ID and PRIVATE_END_POINT_ID. database.0.database_management_config is updated to appropriate managementType and managementStatus for the specified Oracle Database instance.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Oci.Database.CloudDatabaseManagement("test", new()
        {
            DatabaseId = oci_database_database.Test_database.Id,
            ManagementType = @var.Database_cloud_database_management_details_management_type,
            PrivateEndPointId = @var.Database_cloud_database_management_details_private_end_point_id,
            ServiceName = @var.Database_cloud_database_management_details_service_name,
            Credentialdetails = new Oci.Database.Inputs.CloudDatabaseManagementCredentialdetailsArgs
            {
                UserName = @var.Database_cloud_database_management_details_user_name,
                PasswordSecretId = @var.Database_cloud_database_management_details_password_secret_id,
            },
            EnableManagement = @var.Database_cloud_database_management_details_enable_management,
            Port = @var.Cloud_database_management_port,
            Protocol = @var.Cloud_database_management_protocol,
            Role = @var.Cloud_database_management_role,
            SslSecretId = oci_vault_secret.Test_secret.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Database"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Database.NewCloudDatabaseManagement(ctx, "test", &Database.CloudDatabaseManagementArgs{
    			DatabaseId:        pulumi.Any(oci_database_database.Test_database.Id),
    			ManagementType:    pulumi.Any(_var.Database_cloud_database_management_details_management_type),
    			PrivateEndPointId: pulumi.Any(_var.Database_cloud_database_management_details_private_end_point_id),
    			ServiceName:       pulumi.Any(_var.Database_cloud_database_management_details_service_name),
    			Credentialdetails: &database.CloudDatabaseManagementCredentialdetailsArgs{
    				UserName:         pulumi.Any(_var.Database_cloud_database_management_details_user_name),
    				PasswordSecretId: pulumi.Any(_var.Database_cloud_database_management_details_password_secret_id),
    			},
    			EnableManagement: pulumi.Any(_var.Database_cloud_database_management_details_enable_management),
    			Port:             pulumi.Any(_var.Cloud_database_management_port),
    			Protocol:         pulumi.Any(_var.Cloud_database_management_protocol),
    			Role:             pulumi.Any(_var.Cloud_database_management_role),
    			SslSecretId:      pulumi.Any(oci_vault_secret.Test_secret.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Database.CloudDatabaseManagement;
    import com.pulumi.oci.Database.CloudDatabaseManagementArgs;
    import com.pulumi.oci.Database.inputs.CloudDatabaseManagementCredentialdetailsArgs;
    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 test = new CloudDatabaseManagement("test", CloudDatabaseManagementArgs.builder()        
                .databaseId(oci_database_database.test_database().id())
                .managementType(var_.database_cloud_database_management_details_management_type())
                .privateEndPointId(var_.database_cloud_database_management_details_private_end_point_id())
                .serviceName(var_.database_cloud_database_management_details_service_name())
                .credentialdetails(CloudDatabaseManagementCredentialdetailsArgs.builder()
                    .userName(var_.database_cloud_database_management_details_user_name())
                    .passwordSecretId(var_.database_cloud_database_management_details_password_secret_id())
                    .build())
                .enableManagement(var_.database_cloud_database_management_details_enable_management())
                .port(var_.cloud_database_management_port())
                .protocol(var_.cloud_database_management_protocol())
                .role(var_.cloud_database_management_role())
                .sslSecretId(oci_vault_secret.test_secret().id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_oci as oci
    
    test = oci.database.CloudDatabaseManagement("test",
        database_id=oci_database_database["test_database"]["id"],
        management_type=var["database_cloud_database_management_details_management_type"],
        private_end_point_id=var["database_cloud_database_management_details_private_end_point_id"],
        service_name=var["database_cloud_database_management_details_service_name"],
        credentialdetails=oci.database.CloudDatabaseManagementCredentialdetailsArgs(
            user_name=var["database_cloud_database_management_details_user_name"],
            password_secret_id=var["database_cloud_database_management_details_password_secret_id"],
        ),
        enable_management=var["database_cloud_database_management_details_enable_management"],
        port=var["cloud_database_management_port"],
        protocol=var["cloud_database_management_protocol"],
        role=var["cloud_database_management_role"],
        ssl_secret_id=oci_vault_secret["test_secret"]["id"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const test = new oci.database.CloudDatabaseManagement("test", {
        databaseId: oci_database_database.test_database.id,
        managementType: _var.database_cloud_database_management_details_management_type,
        privateEndPointId: _var.database_cloud_database_management_details_private_end_point_id,
        serviceName: _var.database_cloud_database_management_details_service_name,
        credentialdetails: {
            userName: _var.database_cloud_database_management_details_user_name,
            passwordSecretId: _var.database_cloud_database_management_details_password_secret_id,
        },
        enableManagement: _var.database_cloud_database_management_details_enable_management,
        port: _var.cloud_database_management_port,
        protocol: _var.cloud_database_management_protocol,
        role: _var.cloud_database_management_role,
        sslSecretId: oci_vault_secret.test_secret.id,
    });
    
    resources:
      test:
        type: oci:Database:CloudDatabaseManagement
        properties:
          databaseId: ${oci_database_database.test_database.id}
          managementType: ${var.database_cloud_database_management_details_management_type}
          privateEndPointId: ${var.database_cloud_database_management_details_private_end_point_id}
          serviceName: ${var.database_cloud_database_management_details_service_name}
          credentialdetails:
            userName: ${var.database_cloud_database_management_details_user_name}
            passwordSecretId: ${var.database_cloud_database_management_details_password_secret_id}
          enableManagement: ${var.database_cloud_database_management_details_enable_management}
          port: ${var.cloud_database_management_port}
          protocol: ${var.cloud_database_management_protocol}
          role: ${var.cloud_database_management_role}
          sslSecretId: ${oci_vault_secret.test_secret.id}
    

    Create CloudDatabaseManagement Resource

    new CloudDatabaseManagement(name: string, args: CloudDatabaseManagementArgs, opts?: CustomResourceOptions);
    @overload
    def CloudDatabaseManagement(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                credentialdetails: Optional[_database.CloudDatabaseManagementCredentialdetailsArgs] = None,
                                database_id: Optional[str] = None,
                                enable_management: Optional[bool] = None,
                                management_type: Optional[str] = None,
                                port: Optional[int] = None,
                                private_end_point_id: Optional[str] = None,
                                protocol: Optional[str] = None,
                                role: Optional[str] = None,
                                service_name: Optional[str] = None,
                                ssl_secret_id: Optional[str] = None)
    @overload
    def CloudDatabaseManagement(resource_name: str,
                                args: CloudDatabaseManagementArgs,
                                opts: Optional[ResourceOptions] = None)
    func NewCloudDatabaseManagement(ctx *Context, name string, args CloudDatabaseManagementArgs, opts ...ResourceOption) (*CloudDatabaseManagement, error)
    public CloudDatabaseManagement(string name, CloudDatabaseManagementArgs args, CustomResourceOptions? opts = null)
    public CloudDatabaseManagement(String name, CloudDatabaseManagementArgs args)
    public CloudDatabaseManagement(String name, CloudDatabaseManagementArgs args, CustomResourceOptions options)
    
    type: oci:Database:CloudDatabaseManagement
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args CloudDatabaseManagementArgs
    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 CloudDatabaseManagementArgs
    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 CloudDatabaseManagementArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CloudDatabaseManagementArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CloudDatabaseManagementArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    CloudDatabaseManagement Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The CloudDatabaseManagement resource accepts the following input properties:

    Credentialdetails CloudDatabaseManagementCredentialdetails
    DatabaseId string

    The database OCID.

    EnableManagement bool

    (Updatable) Use this flag to enable/disable database management

    ** 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

    ManagementType string

    (Updatable) Specifies database management type enum:

    PrivateEndPointId string

    The OCID of the private endpoint.

    ServiceName string

    The name of the Oracle Database service that will be used to connect to the database.

    Port int

    The port used to connect to the database.

    Protocol string

    Protocol used by the database connection.

    Role string

    The role of the user that will be connecting to the database.

    SslSecretId string

    The OCID of the Oracle Cloud Infrastructure secret.

    Credentialdetails CloudDatabaseManagementCredentialdetailsArgs
    DatabaseId string

    The database OCID.

    EnableManagement bool

    (Updatable) Use this flag to enable/disable database management

    ** 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

    ManagementType string

    (Updatable) Specifies database management type enum:

    PrivateEndPointId string

    The OCID of the private endpoint.

    ServiceName string

    The name of the Oracle Database service that will be used to connect to the database.

    Port int

    The port used to connect to the database.

    Protocol string

    Protocol used by the database connection.

    Role string

    The role of the user that will be connecting to the database.

    SslSecretId string

    The OCID of the Oracle Cloud Infrastructure secret.

    credentialdetails CloudManagementCredentialdetails
    databaseId String

    The database OCID.

    enableManagement Boolean

    (Updatable) Use this flag to enable/disable database management

    ** 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

    managementType String

    (Updatable) Specifies database management type enum:

    privateEndPointId String

    The OCID of the private endpoint.

    serviceName String

    The name of the Oracle Database service that will be used to connect to the database.

    port Integer

    The port used to connect to the database.

    protocol String

    Protocol used by the database connection.

    role String

    The role of the user that will be connecting to the database.

    sslSecretId String

    The OCID of the Oracle Cloud Infrastructure secret.

    credentialdetails CloudDatabaseManagementCredentialdetails
    databaseId string

    The database OCID.

    enableManagement boolean

    (Updatable) Use this flag to enable/disable database management

    ** 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

    managementType string

    (Updatable) Specifies database management type enum:

    privateEndPointId string

    The OCID of the private endpoint.

    serviceName string

    The name of the Oracle Database service that will be used to connect to the database.

    port number

    The port used to connect to the database.

    protocol string

    Protocol used by the database connection.

    role string

    The role of the user that will be connecting to the database.

    sslSecretId string

    The OCID of the Oracle Cloud Infrastructure secret.

    credentialdetails CloudDatabaseManagementCredentialdetailsArgs
    database_id str

    The database OCID.

    enable_management bool

    (Updatable) Use this flag to enable/disable database management

    ** 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

    management_type str

    (Updatable) Specifies database management type enum:

    private_end_point_id str

    The OCID of the private endpoint.

    service_name str

    The name of the Oracle Database service that will be used to connect to the database.

    port int

    The port used to connect to the database.

    protocol str

    Protocol used by the database connection.

    role str

    The role of the user that will be connecting to the database.

    ssl_secret_id str

    The OCID of the Oracle Cloud Infrastructure secret.

    credentialdetails Property Map
    databaseId String

    The database OCID.

    enableManagement Boolean

    (Updatable) Use this flag to enable/disable database management

    ** 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

    managementType String

    (Updatable) Specifies database management type enum:

    privateEndPointId String

    The OCID of the private endpoint.

    serviceName String

    The name of the Oracle Database service that will be used to connect to the database.

    port Number

    The port used to connect to the database.

    protocol String

    Protocol used by the database connection.

    role String

    The role of the user that will be connecting to the database.

    sslSecretId String

    The OCID of the Oracle Cloud Infrastructure secret.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CloudDatabaseManagement 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 CloudDatabaseManagement Resource

    Get an existing CloudDatabaseManagement 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?: CloudDatabaseManagementState, opts?: CustomResourceOptions): CloudDatabaseManagement
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            credentialdetails: Optional[_database.CloudDatabaseManagementCredentialdetailsArgs] = None,
            database_id: Optional[str] = None,
            enable_management: Optional[bool] = None,
            management_type: Optional[str] = None,
            port: Optional[int] = None,
            private_end_point_id: Optional[str] = None,
            protocol: Optional[str] = None,
            role: Optional[str] = None,
            service_name: Optional[str] = None,
            ssl_secret_id: Optional[str] = None) -> CloudDatabaseManagement
    func GetCloudDatabaseManagement(ctx *Context, name string, id IDInput, state *CloudDatabaseManagementState, opts ...ResourceOption) (*CloudDatabaseManagement, error)
    public static CloudDatabaseManagement Get(string name, Input<string> id, CloudDatabaseManagementState? state, CustomResourceOptions? opts = null)
    public static CloudDatabaseManagement get(String name, Output<String> id, CloudDatabaseManagementState 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:
    Credentialdetails CloudDatabaseManagementCredentialdetails
    DatabaseId string

    The database OCID.

    EnableManagement bool

    (Updatable) Use this flag to enable/disable database management

    ** 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

    ManagementType string

    (Updatable) Specifies database management type enum:

    Port int

    The port used to connect to the database.

    PrivateEndPointId string

    The OCID of the private endpoint.

    Protocol string

    Protocol used by the database connection.

    Role string

    The role of the user that will be connecting to the database.

    ServiceName string

    The name of the Oracle Database service that will be used to connect to the database.

    SslSecretId string

    The OCID of the Oracle Cloud Infrastructure secret.

    Credentialdetails CloudDatabaseManagementCredentialdetailsArgs
    DatabaseId string

    The database OCID.

    EnableManagement bool

    (Updatable) Use this flag to enable/disable database management

    ** 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

    ManagementType string

    (Updatable) Specifies database management type enum:

    Port int

    The port used to connect to the database.

    PrivateEndPointId string

    The OCID of the private endpoint.

    Protocol string

    Protocol used by the database connection.

    Role string

    The role of the user that will be connecting to the database.

    ServiceName string

    The name of the Oracle Database service that will be used to connect to the database.

    SslSecretId string

    The OCID of the Oracle Cloud Infrastructure secret.

    credentialdetails CloudManagementCredentialdetails
    databaseId String

    The database OCID.

    enableManagement Boolean

    (Updatable) Use this flag to enable/disable database management

    ** 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

    managementType String

    (Updatable) Specifies database management type enum:

    port Integer

    The port used to connect to the database.

    privateEndPointId String

    The OCID of the private endpoint.

    protocol String

    Protocol used by the database connection.

    role String

    The role of the user that will be connecting to the database.

    serviceName String

    The name of the Oracle Database service that will be used to connect to the database.

    sslSecretId String

    The OCID of the Oracle Cloud Infrastructure secret.

    credentialdetails CloudDatabaseManagementCredentialdetails
    databaseId string

    The database OCID.

    enableManagement boolean

    (Updatable) Use this flag to enable/disable database management

    ** 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

    managementType string

    (Updatable) Specifies database management type enum:

    port number

    The port used to connect to the database.

    privateEndPointId string

    The OCID of the private endpoint.

    protocol string

    Protocol used by the database connection.

    role string

    The role of the user that will be connecting to the database.

    serviceName string

    The name of the Oracle Database service that will be used to connect to the database.

    sslSecretId string

    The OCID of the Oracle Cloud Infrastructure secret.

    credentialdetails CloudDatabaseManagementCredentialdetailsArgs
    database_id str

    The database OCID.

    enable_management bool

    (Updatable) Use this flag to enable/disable database management

    ** 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

    management_type str

    (Updatable) Specifies database management type enum:

    port int

    The port used to connect to the database.

    private_end_point_id str

    The OCID of the private endpoint.

    protocol str

    Protocol used by the database connection.

    role str

    The role of the user that will be connecting to the database.

    service_name str

    The name of the Oracle Database service that will be used to connect to the database.

    ssl_secret_id str

    The OCID of the Oracle Cloud Infrastructure secret.

    credentialdetails Property Map
    databaseId String

    The database OCID.

    enableManagement Boolean

    (Updatable) Use this flag to enable/disable database management

    ** 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

    managementType String

    (Updatable) Specifies database management type enum:

    port Number

    The port used to connect to the database.

    privateEndPointId String

    The OCID of the private endpoint.

    protocol String

    Protocol used by the database connection.

    role String

    The role of the user that will be connecting to the database.

    serviceName String

    The name of the Oracle Database service that will be used to connect to the database.

    sslSecretId String

    The OCID of the Oracle Cloud Infrastructure secret.

    Supporting Types

    CloudDatabaseManagementCredentialdetails, CloudDatabaseManagementCredentialdetailsArgs

    PasswordSecretId string

    Specific database username's password OCID.

    UserName string

    Database username

    PasswordSecretId string

    Specific database username's password OCID.

    UserName string

    Database username

    passwordSecretId String

    Specific database username's password OCID.

    userName String

    Database username

    passwordSecretId string

    Specific database username's password OCID.

    userName string

    Database username

    password_secret_id str

    Specific database username's password OCID.

    user_name str

    Database username

    passwordSecretId String

    Specific database username's password OCID.

    userName String

    Database username

    Import

    Import is not supported for this resource.

    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 v1.16.1 published on Wednesday, Nov 22, 2023 by Pulumi