1. Packages
  2. Google Cloud Native
  3. API Docs
  4. sqladmin
  5. sqladmin/v1
  6. Database

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.sqladmin/v1.Database

Explore with Pulumi AI

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

Inserts a resource containing information about a database inside a Cloud SQL instance. Note: You can’t modify the default character set and collation.

Create Database Resource

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

Constructor syntax

new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);
@overload
def Database(resource_name: str,
             args: DatabaseArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def Database(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             instance: Optional[str] = None,
             charset: Optional[str] = None,
             collation: Optional[str] = None,
             etag: Optional[str] = None,
             kind: Optional[str] = None,
             name: Optional[str] = None,
             project: Optional[str] = None,
             self_link: Optional[str] = None,
             sqlserver_database_details: Optional[SqlServerDatabaseDetailsArgs] = None)
func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)
public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)
public Database(String name, DatabaseArgs args)
public Database(String name, DatabaseArgs args, CustomResourceOptions options)
type: google-native:sqladmin/v1:Database
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DatabaseArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DatabaseArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DatabaseArgs
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 exampledatabaseResourceResourceFromSqladminv1 = new GoogleNative.SQLAdmin.V1.Database("exampledatabaseResourceResourceFromSqladminv1", new()
{
    Instance = "string",
    Charset = "string",
    Collation = "string",
    Kind = "string",
    Name = "string",
    Project = "string",
    SelfLink = "string",
    SqlserverDatabaseDetails = new GoogleNative.SQLAdmin.V1.Inputs.SqlServerDatabaseDetailsArgs
    {
        CompatibilityLevel = 0,
        RecoveryModel = "string",
    },
});
Copy
example, err := sqladmin.NewDatabase(ctx, "exampledatabaseResourceResourceFromSqladminv1", &sqladmin.DatabaseArgs{
	Instance:  pulumi.String("string"),
	Charset:   pulumi.String("string"),
	Collation: pulumi.String("string"),
	Kind:      pulumi.String("string"),
	Name:      pulumi.String("string"),
	Project:   pulumi.String("string"),
	SelfLink:  pulumi.String("string"),
	SqlserverDatabaseDetails: &sqladmin.SqlServerDatabaseDetailsArgs{
		CompatibilityLevel: pulumi.Int(0),
		RecoveryModel:      pulumi.String("string"),
	},
})
Copy
var exampledatabaseResourceResourceFromSqladminv1 = new Database("exampledatabaseResourceResourceFromSqladminv1", DatabaseArgs.builder()
    .instance("string")
    .charset("string")
    .collation("string")
    .kind("string")
    .name("string")
    .project("string")
    .selfLink("string")
    .sqlserverDatabaseDetails(SqlServerDatabaseDetailsArgs.builder()
        .compatibilityLevel(0)
        .recoveryModel("string")
        .build())
    .build());
Copy
exampledatabase_resource_resource_from_sqladminv1 = google_native.sqladmin.v1.Database("exampledatabaseResourceResourceFromSqladminv1",
    instance="string",
    charset="string",
    collation="string",
    kind="string",
    name="string",
    project="string",
    self_link="string",
    sqlserver_database_details={
        "compatibility_level": 0,
        "recovery_model": "string",
    })
Copy
const exampledatabaseResourceResourceFromSqladminv1 = new google_native.sqladmin.v1.Database("exampledatabaseResourceResourceFromSqladminv1", {
    instance: "string",
    charset: "string",
    collation: "string",
    kind: "string",
    name: "string",
    project: "string",
    selfLink: "string",
    sqlserverDatabaseDetails: {
        compatibilityLevel: 0,
        recoveryModel: "string",
    },
});
Copy
type: google-native:sqladmin/v1:Database
properties:
    charset: string
    collation: string
    instance: string
    kind: string
    name: string
    project: string
    selfLink: string
    sqlserverDatabaseDetails:
        compatibilityLevel: 0
        recoveryModel: string
Copy

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

Instance This property is required. string
The name of the Cloud SQL instance. This does not include the project ID.
Charset string
The Cloud SQL charset value.
Collation string
The Cloud SQL collation value.
Etag string
This field is deprecated and will be removed from a future version of the API.

Deprecated: This field is deprecated and will be removed from a future version of the API.

Kind string
This is always sql#database.
Name string
The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
Project string
The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.
SelfLink string
The URI of this resource.
SqlserverDatabaseDetails Pulumi.GoogleNative.SQLAdmin.V1.Inputs.SqlServerDatabaseDetails
Instance This property is required. string
The name of the Cloud SQL instance. This does not include the project ID.
Charset string
The Cloud SQL charset value.
Collation string
The Cloud SQL collation value.
Etag string
This field is deprecated and will be removed from a future version of the API.

Deprecated: This field is deprecated and will be removed from a future version of the API.

Kind string
This is always sql#database.
Name string
The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
Project string
The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.
SelfLink string
The URI of this resource.
SqlserverDatabaseDetails SqlServerDatabaseDetailsArgs
instance This property is required. String
The name of the Cloud SQL instance. This does not include the project ID.
charset String
The Cloud SQL charset value.
collation String
The Cloud SQL collation value.
etag String
This field is deprecated and will be removed from a future version of the API.

Deprecated: This field is deprecated and will be removed from a future version of the API.

kind String
This is always sql#database.
name String
The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
project String
The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.
selfLink String
The URI of this resource.
sqlserverDatabaseDetails SqlServerDatabaseDetails
instance This property is required. string
The name of the Cloud SQL instance. This does not include the project ID.
charset string
The Cloud SQL charset value.
collation string
The Cloud SQL collation value.
etag string
This field is deprecated and will be removed from a future version of the API.

Deprecated: This field is deprecated and will be removed from a future version of the API.

kind string
This is always sql#database.
name string
The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
project string
The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.
selfLink string
The URI of this resource.
sqlserverDatabaseDetails SqlServerDatabaseDetails
instance This property is required. str
The name of the Cloud SQL instance. This does not include the project ID.
charset str
The Cloud SQL charset value.
collation str
The Cloud SQL collation value.
etag str
This field is deprecated and will be removed from a future version of the API.

Deprecated: This field is deprecated and will be removed from a future version of the API.

kind str
This is always sql#database.
name str
The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
project str
The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.
self_link str
The URI of this resource.
sqlserver_database_details SqlServerDatabaseDetailsArgs
instance This property is required. String
The name of the Cloud SQL instance. This does not include the project ID.
charset String
The Cloud SQL charset value.
collation String
The Cloud SQL collation value.
etag String
This field is deprecated and will be removed from a future version of the API.

Deprecated: This field is deprecated and will be removed from a future version of the API.

kind String
This is always sql#database.
name String
The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
project String
The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.
selfLink String
The URI of this resource.
sqlserverDatabaseDetails Property Map

Outputs

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

Supporting Types

SqlServerDatabaseDetails
, SqlServerDatabaseDetailsArgs

CompatibilityLevel int
The version of SQL Server with which the database is to be made compatible
RecoveryModel string
The recovery model of a SQL Server database
CompatibilityLevel int
The version of SQL Server with which the database is to be made compatible
RecoveryModel string
The recovery model of a SQL Server database
compatibilityLevel Integer
The version of SQL Server with which the database is to be made compatible
recoveryModel String
The recovery model of a SQL Server database
compatibilityLevel number
The version of SQL Server with which the database is to be made compatible
recoveryModel string
The recovery model of a SQL Server database
compatibility_level int
The version of SQL Server with which the database is to be made compatible
recovery_model str
The recovery model of a SQL Server database
compatibilityLevel Number
The version of SQL Server with which the database is to be made compatible
recoveryModel String
The recovery model of a SQL Server database

SqlServerDatabaseDetailsResponse
, SqlServerDatabaseDetailsResponseArgs

CompatibilityLevel This property is required. int
The version of SQL Server with which the database is to be made compatible
RecoveryModel This property is required. string
The recovery model of a SQL Server database
CompatibilityLevel This property is required. int
The version of SQL Server with which the database is to be made compatible
RecoveryModel This property is required. string
The recovery model of a SQL Server database
compatibilityLevel This property is required. Integer
The version of SQL Server with which the database is to be made compatible
recoveryModel This property is required. String
The recovery model of a SQL Server database
compatibilityLevel This property is required. number
The version of SQL Server with which the database is to be made compatible
recoveryModel This property is required. string
The recovery model of a SQL Server database
compatibility_level This property is required. int
The version of SQL Server with which the database is to be made compatible
recovery_model This property is required. str
The recovery model of a SQL Server database
compatibilityLevel This property is required. Number
The version of SQL Server with which the database is to be made compatible
recoveryModel This property is required. String
The recovery model of a SQL Server database

Package Details

Repository
Google Cloud Native pulumi/pulumi-google-native
License
Apache-2.0

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi