oci.Database.CloudDatabaseManagement
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const test = new oci.database.CloudDatabaseManagement("test", {
databaseId: testDatabase.id,
managementType: databaseCloudDatabaseManagementDetailsManagementType,
privateEndPointId: databaseCloudDatabaseManagementDetailsPrivateEndPointId,
serviceName: databaseCloudDatabaseManagementDetailsServiceName,
credentialdetails: {
userName: databaseCloudDatabaseManagementDetailsUserName,
passwordSecretId: databaseCloudDatabaseManagementDetailsPasswordSecretId,
},
enableManagement: databaseCloudDatabaseManagementDetailsEnableManagement,
port: cloudDatabaseManagementPort,
protocol: cloudDatabaseManagementProtocol,
role: cloudDatabaseManagementRole,
sslSecretId: testSecret.id,
});
import pulumi
import pulumi_oci as oci
test = oci.database.CloudDatabaseManagement("test",
database_id=test_database["id"],
management_type=database_cloud_database_management_details_management_type,
private_end_point_id=database_cloud_database_management_details_private_end_point_id,
service_name=database_cloud_database_management_details_service_name,
credentialdetails={
"user_name": database_cloud_database_management_details_user_name,
"password_secret_id": database_cloud_database_management_details_password_secret_id,
},
enable_management=database_cloud_database_management_details_enable_management,
port=cloud_database_management_port,
protocol=cloud_database_management_protocol,
role=cloud_database_management_role,
ssl_secret_id=test_secret["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/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(testDatabase.Id),
ManagementType: pulumi.Any(databaseCloudDatabaseManagementDetailsManagementType),
PrivateEndPointId: pulumi.Any(databaseCloudDatabaseManagementDetailsPrivateEndPointId),
ServiceName: pulumi.Any(databaseCloudDatabaseManagementDetailsServiceName),
Credentialdetails: &database.CloudDatabaseManagementCredentialdetailsArgs{
UserName: pulumi.Any(databaseCloudDatabaseManagementDetailsUserName),
PasswordSecretId: pulumi.Any(databaseCloudDatabaseManagementDetailsPasswordSecretId),
},
EnableManagement: pulumi.Any(databaseCloudDatabaseManagementDetailsEnableManagement),
Port: pulumi.Any(cloudDatabaseManagementPort),
Protocol: pulumi.Any(cloudDatabaseManagementProtocol),
Role: pulumi.Any(cloudDatabaseManagementRole),
SslSecretId: pulumi.Any(testSecret.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 test = new Oci.Database.CloudDatabaseManagement("test", new()
{
DatabaseId = testDatabase.Id,
ManagementType = databaseCloudDatabaseManagementDetailsManagementType,
PrivateEndPointId = databaseCloudDatabaseManagementDetailsPrivateEndPointId,
ServiceName = databaseCloudDatabaseManagementDetailsServiceName,
Credentialdetails = new Oci.Database.Inputs.CloudDatabaseManagementCredentialdetailsArgs
{
UserName = databaseCloudDatabaseManagementDetailsUserName,
PasswordSecretId = databaseCloudDatabaseManagementDetailsPasswordSecretId,
},
EnableManagement = databaseCloudDatabaseManagementDetailsEnableManagement,
Port = cloudDatabaseManagementPort,
Protocol = cloudDatabaseManagementProtocol,
Role = cloudDatabaseManagementRole,
SslSecretId = testSecret.Id,
});
});
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(testDatabase.id())
.managementType(databaseCloudDatabaseManagementDetailsManagementType)
.privateEndPointId(databaseCloudDatabaseManagementDetailsPrivateEndPointId)
.serviceName(databaseCloudDatabaseManagementDetailsServiceName)
.credentialdetails(CloudDatabaseManagementCredentialdetailsArgs.builder()
.userName(databaseCloudDatabaseManagementDetailsUserName)
.passwordSecretId(databaseCloudDatabaseManagementDetailsPasswordSecretId)
.build())
.enableManagement(databaseCloudDatabaseManagementDetailsEnableManagement)
.port(cloudDatabaseManagementPort)
.protocol(cloudDatabaseManagementProtocol)
.role(cloudDatabaseManagementRole)
.sslSecretId(testSecret.id())
.build());
}
}
resources:
test:
type: oci:Database:CloudDatabaseManagement
properties:
databaseId: ${testDatabase.id}
managementType: ${databaseCloudDatabaseManagementDetailsManagementType}
privateEndPointId: ${databaseCloudDatabaseManagementDetailsPrivateEndPointId}
serviceName: ${databaseCloudDatabaseManagementDetailsServiceName}
credentialdetails:
userName: ${databaseCloudDatabaseManagementDetailsUserName}
passwordSecretId: ${databaseCloudDatabaseManagementDetailsPasswordSecretId}
enableManagement: ${databaseCloudDatabaseManagementDetailsEnableManagement}
port: ${cloudDatabaseManagementPort}
protocol: ${cloudDatabaseManagementProtocol}
role: ${cloudDatabaseManagementRole}
sslSecretId: ${testSecret.id}
Create CloudDatabaseManagement Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CloudDatabaseManagement(name: string, args: CloudDatabaseManagementArgs, opts?: CustomResourceOptions);
@overload
def CloudDatabaseManagement(resource_name: str,
args: CloudDatabaseManagementArgs,
opts: Optional[ResourceOptions] = None)
@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,
private_end_point_id: Optional[str] = None,
service_name: Optional[str] = None,
port: Optional[int] = None,
protocol: Optional[str] = None,
role: Optional[str] = None,
ssl_secret_id: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var cloudDatabaseManagementResource = new Oci.Database.CloudDatabaseManagement("cloudDatabaseManagementResource", new()
{
Credentialdetails = new Oci.Database.Inputs.CloudDatabaseManagementCredentialdetailsArgs
{
PasswordSecretId = "string",
UserName = "string",
},
DatabaseId = "string",
EnableManagement = false,
ManagementType = "string",
PrivateEndPointId = "string",
ServiceName = "string",
Port = 0,
Protocol = "string",
Role = "string",
SslSecretId = "string",
});
example, err := Database.NewCloudDatabaseManagement(ctx, "cloudDatabaseManagementResource", &Database.CloudDatabaseManagementArgs{
Credentialdetails: &database.CloudDatabaseManagementCredentialdetailsArgs{
PasswordSecretId: pulumi.String("string"),
UserName: pulumi.String("string"),
},
DatabaseId: pulumi.String("string"),
EnableManagement: pulumi.Bool(false),
ManagementType: pulumi.String("string"),
PrivateEndPointId: pulumi.String("string"),
ServiceName: pulumi.String("string"),
Port: pulumi.Int(0),
Protocol: pulumi.String("string"),
Role: pulumi.String("string"),
SslSecretId: pulumi.String("string"),
})
var cloudDatabaseManagementResource = new CloudDatabaseManagement("cloudDatabaseManagementResource", CloudDatabaseManagementArgs.builder()
.credentialdetails(CloudDatabaseManagementCredentialdetailsArgs.builder()
.passwordSecretId("string")
.userName("string")
.build())
.databaseId("string")
.enableManagement(false)
.managementType("string")
.privateEndPointId("string")
.serviceName("string")
.port(0)
.protocol("string")
.role("string")
.sslSecretId("string")
.build());
cloud_database_management_resource = oci.database.CloudDatabaseManagement("cloudDatabaseManagementResource",
credentialdetails={
"password_secret_id": "string",
"user_name": "string",
},
database_id="string",
enable_management=False,
management_type="string",
private_end_point_id="string",
service_name="string",
port=0,
protocol="string",
role="string",
ssl_secret_id="string")
const cloudDatabaseManagementResource = new oci.database.CloudDatabaseManagement("cloudDatabaseManagementResource", {
credentialdetails: {
passwordSecretId: "string",
userName: "string",
},
databaseId: "string",
enableManagement: false,
managementType: "string",
privateEndPointId: "string",
serviceName: "string",
port: 0,
protocol: "string",
role: "string",
sslSecretId: "string",
});
type: oci:Database:CloudDatabaseManagement
properties:
credentialdetails:
passwordSecretId: string
userName: string
databaseId: string
enableManagement: false
managementType: string
port: 0
privateEndPointId: string
protocol: string
role: string
serviceName: string
sslSecretId: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CloudDatabaseManagement resource accepts the following input properties:
- Credentialdetails
Cloud
Database Management Credentialdetails - Database
Id string - 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 string - (Updatable) Specifies database management type
enum:
BASIC
ADVANCED
- Private
End stringPoint Id - The OCID of the private endpoint.
- Service
Name 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.
- Ssl
Secret stringId - The OCID of the Oracle Cloud Infrastructure secret.
- Credentialdetails
Cloud
Database Management Credentialdetails Args - Database
Id string - 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 string - (Updatable) Specifies database management type
enum:
BASIC
ADVANCED
- Private
End stringPoint Id - The OCID of the private endpoint.
- Service
Name 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.
- Ssl
Secret stringId - The OCID of the Oracle Cloud Infrastructure secret.
- credentialdetails
Cloud
Management Credentialdetails - database
Id String - The database OCID.
- enable
Management 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
- management
Type String - (Updatable) Specifies database management type
enum:
BASIC
ADVANCED
- private
End StringPoint Id - The OCID of the private endpoint.
- service
Name 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.
- ssl
Secret StringId - The OCID of the Oracle Cloud Infrastructure secret.
- credentialdetails
Cloud
Database Management Credentialdetails - database
Id string - The database OCID.
- enable
Management 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
- management
Type string - (Updatable) Specifies database management type
enum:
BASIC
ADVANCED
- private
End stringPoint Id - The OCID of the private endpoint.
- service
Name 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.
- ssl
Secret stringId - The OCID of the Oracle Cloud Infrastructure secret.
- credentialdetails
database.
Cloud Database Management Credentialdetails Args - 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:
BASIC
ADVANCED
- private_
end_ strpoint_ id - 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_ strid - The OCID of the Oracle Cloud Infrastructure secret.
- credentialdetails Property Map
- database
Id String - The database OCID.
- enable
Management 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
- management
Type String - (Updatable) Specifies database management type
enum:
BASIC
ADVANCED
- private
End StringPoint Id - The OCID of the private endpoint.
- service
Name 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.
- ssl
Secret StringId - 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.
- Credentialdetails
Cloud
Database Management Credentialdetails - Database
Id string - 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 string - (Updatable) Specifies database management type
enum:
BASIC
ADVANCED
- Port int
- The port used to connect to the database.
- Private
End stringPoint Id - 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.
- Service
Name string - The name of the Oracle Database service that will be used to connect to the database.
- Ssl
Secret stringId - The OCID of the Oracle Cloud Infrastructure secret.
- Credentialdetails
Cloud
Database Management Credentialdetails Args - Database
Id string - 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 string - (Updatable) Specifies database management type
enum:
BASIC
ADVANCED
- Port int
- The port used to connect to the database.
- Private
End stringPoint Id - 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.
- Service
Name string - The name of the Oracle Database service that will be used to connect to the database.
- Ssl
Secret stringId - The OCID of the Oracle Cloud Infrastructure secret.
- credentialdetails
Cloud
Management Credentialdetails - database
Id String - The database OCID.
- enable
Management 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
- management
Type String - (Updatable) Specifies database management type
enum:
BASIC
ADVANCED
- port Integer
- The port used to connect to the database.
- private
End StringPoint Id - 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.
- service
Name String - The name of the Oracle Database service that will be used to connect to the database.
- ssl
Secret StringId - The OCID of the Oracle Cloud Infrastructure secret.
- credentialdetails
Cloud
Database Management Credentialdetails - database
Id string - The database OCID.
- enable
Management 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
- management
Type string - (Updatable) Specifies database management type
enum:
BASIC
ADVANCED
- port number
- The port used to connect to the database.
- private
End stringPoint Id - 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.
- service
Name string - The name of the Oracle Database service that will be used to connect to the database.
- ssl
Secret stringId - The OCID of the Oracle Cloud Infrastructure secret.
- credentialdetails
database.
Cloud Database Management Credentialdetails Args - 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:
BASIC
ADVANCED
- port int
- The port used to connect to the database.
- private_
end_ strpoint_ id - 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_ strid - The OCID of the Oracle Cloud Infrastructure secret.
- credentialdetails Property Map
- database
Id String - The database OCID.
- enable
Management 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
- management
Type String - (Updatable) Specifies database management type
enum:
BASIC
ADVANCED
- port Number
- The port used to connect to the database.
- private
End StringPoint Id - 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.
- service
Name String - The name of the Oracle Database service that will be used to connect to the database.
- ssl
Secret StringId - The OCID of the Oracle Cloud Infrastructure secret.
Supporting Types
CloudDatabaseManagementCredentialdetails, CloudDatabaseManagementCredentialdetailsArgs
- Password
Secret stringId - Specific database username's password OCID.
- User
Name string - Database username
- Password
Secret stringId - Specific database username's password OCID.
- User
Name string - Database username
- password
Secret StringId - Specific database username's password OCID.
- user
Name String - Database username
- password
Secret stringId - Specific database username's password OCID.
- user
Name string - Database username
- password_
secret_ strid - Specific database username's password OCID.
- user_
name str - Database username
- password
Secret StringId - Specific database username's password OCID.
- user
Name String - Database username
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.