Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

AutonomousContainerDatabaseDataguardAssociationOperation

This resource provides the Autonomous Container Database Dataguard Association Operation resource in Oracle Cloud Infrastructure Database service.

Perform a new Autonomous Container Database Dataguard Association Operation on an Autonomous Container Database that has Dataguard enabled

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var switchover = new Oci.Database.AutonomousContainerDatabaseDataguardAssociationOperation("switchover", new()
    {
        Operation = "switchover",
        AutonomousContainerDatabaseId = data.Oci_database_autonomous_container_database_dataguard_associations.Dataguard_associations.Autonomous_container_database_dataguard_associations[0].Autonomous_container_database_id,
        AutonomousContainerDatabaseDataguardAssociationId = data.Oci_database_autonomous_container_database_dataguard_associations.Dataguard_associations.Autonomous_container_database_dataguard_associations[0].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.NewAutonomousContainerDatabaseDataguardAssociationOperation(ctx, "switchover", &Database.AutonomousContainerDatabaseDataguardAssociationOperationArgs{
			Operation:                     pulumi.String("switchover"),
			AutonomousContainerDatabaseId: pulumi.Any(data.Oci_database_autonomous_container_database_dataguard_associations.Dataguard_associations.Autonomous_container_database_dataguard_associations[0].Autonomous_container_database_id),
			AutonomousContainerDatabaseDataguardAssociationId: pulumi.Any(data.Oci_database_autonomous_container_database_dataguard_associations.Dataguard_associations.Autonomous_container_database_dataguard_associations[0].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.AutonomousContainerDatabaseDataguardAssociationOperation;
import com.pulumi.oci.Database.AutonomousContainerDatabaseDataguardAssociationOperationArgs;
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 switchover = new AutonomousContainerDatabaseDataguardAssociationOperation("switchover", AutonomousContainerDatabaseDataguardAssociationOperationArgs.builder()        
            .operation("switchover")
            .autonomousContainerDatabaseId(data.oci_database_autonomous_container_database_dataguard_associations().dataguard_associations().autonomous_container_database_dataguard_associations()[0].autonomous_container_database_id())
            .autonomousContainerDatabaseDataguardAssociationId(data.oci_database_autonomous_container_database_dataguard_associations().dataguard_associations().autonomous_container_database_dataguard_associations()[0].id())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

switchover = oci.database.AutonomousContainerDatabaseDataguardAssociationOperation("switchover",
    operation="switchover",
    autonomous_container_database_id=data["oci_database_autonomous_container_database_dataguard_associations"]["dataguard_associations"]["autonomous_container_database_dataguard_associations"][0]["autonomous_container_database_id"],
    autonomous_container_database_dataguard_association_id=data["oci_database_autonomous_container_database_dataguard_associations"]["dataguard_associations"]["autonomous_container_database_dataguard_associations"][0]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const switchover = new oci.database.AutonomousContainerDatabaseDataguardAssociationOperation("switchover", {
    operation: "switchover",
    autonomousContainerDatabaseId: data.oci_database_autonomous_container_database_dataguard_associations.dataguard_associations.autonomous_container_database_dataguard_associations[0].autonomous_container_database_id,
    autonomousContainerDatabaseDataguardAssociationId: data.oci_database_autonomous_container_database_dataguard_associations.dataguard_associations.autonomous_container_database_dataguard_associations[0].id,
});
resources:
  switchover:
    type: oci:Database:AutonomousContainerDatabaseDataguardAssociationOperation
    properties:
      operation: switchover
      # "failover" or "reinstate"
      autonomousContainerDatabaseId: ${data.oci_database_autonomous_container_database_dataguard_associations.dataguard_associations.autonomous_container_database_dataguard_associations[0].autonomous_container_database_id}
      autonomousContainerDatabaseDataguardAssociationId: ${data.oci_database_autonomous_container_database_dataguard_associations.dataguard_associations.autonomous_container_database_dataguard_associations[0].id}

Create AutonomousContainerDatabaseDataguardAssociationOperation Resource

new AutonomousContainerDatabaseDataguardAssociationOperation(name: string, args: AutonomousContainerDatabaseDataguardAssociationOperationArgs, opts?: CustomResourceOptions);
@overload
def AutonomousContainerDatabaseDataguardAssociationOperation(resource_name: str,
                                                             opts: Optional[ResourceOptions] = None,
                                                             autonomous_container_database_dataguard_association_id: Optional[str] = None,
                                                             autonomous_container_database_id: Optional[str] = None,
                                                             operation: Optional[str] = None)
@overload
def AutonomousContainerDatabaseDataguardAssociationOperation(resource_name: str,
                                                             args: AutonomousContainerDatabaseDataguardAssociationOperationArgs,
                                                             opts: Optional[ResourceOptions] = None)
func NewAutonomousContainerDatabaseDataguardAssociationOperation(ctx *Context, name string, args AutonomousContainerDatabaseDataguardAssociationOperationArgs, opts ...ResourceOption) (*AutonomousContainerDatabaseDataguardAssociationOperation, error)
public AutonomousContainerDatabaseDataguardAssociationOperation(string name, AutonomousContainerDatabaseDataguardAssociationOperationArgs args, CustomResourceOptions? opts = null)
public AutonomousContainerDatabaseDataguardAssociationOperation(String name, AutonomousContainerDatabaseDataguardAssociationOperationArgs args)
public AutonomousContainerDatabaseDataguardAssociationOperation(String name, AutonomousContainerDatabaseDataguardAssociationOperationArgs args, CustomResourceOptions options)
type: oci:Database:AutonomousContainerDatabaseDataguardAssociationOperation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AutonomousContainerDatabaseDataguardAssociationOperationArgs
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 AutonomousContainerDatabaseDataguardAssociationOperationArgs
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 AutonomousContainerDatabaseDataguardAssociationOperationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AutonomousContainerDatabaseDataguardAssociationOperationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AutonomousContainerDatabaseDataguardAssociationOperationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

AutonomousContainerDatabaseDataguardAssociationId string

The Autonomous Container Database Dataguard Association OCID. This attribute is a forcenew attribute.

AutonomousContainerDatabaseId string

The Autonomous Container Database OCID. This attribute is a forcenew attribute.

Operation string

There are three type of supported operations switchover, failover, reinstate. switchover can only be used for primary database while failover and reinstate can only be used for standby database. This attribute is a forcenew attribute.

AutonomousContainerDatabaseDataguardAssociationId string

The Autonomous Container Database Dataguard Association OCID. This attribute is a forcenew attribute.

AutonomousContainerDatabaseId string

The Autonomous Container Database OCID. This attribute is a forcenew attribute.

Operation string

There are three type of supported operations switchover, failover, reinstate. switchover can only be used for primary database while failover and reinstate can only be used for standby database. This attribute is a forcenew attribute.

autonomousContainerDatabaseDataguardAssociationId String

The Autonomous Container Database Dataguard Association OCID. This attribute is a forcenew attribute.

autonomousContainerDatabaseId String

The Autonomous Container Database OCID. This attribute is a forcenew attribute.

operation String

There are three type of supported operations switchover, failover, reinstate. switchover can only be used for primary database while failover and reinstate can only be used for standby database. This attribute is a forcenew attribute.

autonomousContainerDatabaseDataguardAssociationId string

The Autonomous Container Database Dataguard Association OCID. This attribute is a forcenew attribute.

autonomousContainerDatabaseId string

The Autonomous Container Database OCID. This attribute is a forcenew attribute.

operation string

There are three type of supported operations switchover, failover, reinstate. switchover can only be used for primary database while failover and reinstate can only be used for standby database. This attribute is a forcenew attribute.

autonomous_container_database_dataguard_association_id str

The Autonomous Container Database Dataguard Association OCID. This attribute is a forcenew attribute.

autonomous_container_database_id str

The Autonomous Container Database OCID. This attribute is a forcenew attribute.

operation str

There are three type of supported operations switchover, failover, reinstate. switchover can only be used for primary database while failover and reinstate can only be used for standby database. This attribute is a forcenew attribute.

autonomousContainerDatabaseDataguardAssociationId String

The Autonomous Container Database Dataguard Association OCID. This attribute is a forcenew attribute.

autonomousContainerDatabaseId String

The Autonomous Container Database OCID. This attribute is a forcenew attribute.

operation String

There are three type of supported operations switchover, failover, reinstate. switchover can only be used for primary database while failover and reinstate can only be used for standby database. This attribute is a forcenew attribute.

Outputs

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

Get an existing AutonomousContainerDatabaseDataguardAssociationOperation 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?: AutonomousContainerDatabaseDataguardAssociationOperationState, opts?: CustomResourceOptions): AutonomousContainerDatabaseDataguardAssociationOperation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        autonomous_container_database_dataguard_association_id: Optional[str] = None,
        autonomous_container_database_id: Optional[str] = None,
        operation: Optional[str] = None) -> AutonomousContainerDatabaseDataguardAssociationOperation
func GetAutonomousContainerDatabaseDataguardAssociationOperation(ctx *Context, name string, id IDInput, state *AutonomousContainerDatabaseDataguardAssociationOperationState, opts ...ResourceOption) (*AutonomousContainerDatabaseDataguardAssociationOperation, error)
public static AutonomousContainerDatabaseDataguardAssociationOperation Get(string name, Input<string> id, AutonomousContainerDatabaseDataguardAssociationOperationState? state, CustomResourceOptions? opts = null)
public static AutonomousContainerDatabaseDataguardAssociationOperation get(String name, Output<String> id, AutonomousContainerDatabaseDataguardAssociationOperationState 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:
AutonomousContainerDatabaseDataguardAssociationId string

The Autonomous Container Database Dataguard Association OCID. This attribute is a forcenew attribute.

AutonomousContainerDatabaseId string

The Autonomous Container Database OCID. This attribute is a forcenew attribute.

Operation string

There are three type of supported operations switchover, failover, reinstate. switchover can only be used for primary database while failover and reinstate can only be used for standby database. This attribute is a forcenew attribute.

AutonomousContainerDatabaseDataguardAssociationId string

The Autonomous Container Database Dataguard Association OCID. This attribute is a forcenew attribute.

AutonomousContainerDatabaseId string

The Autonomous Container Database OCID. This attribute is a forcenew attribute.

Operation string

There are three type of supported operations switchover, failover, reinstate. switchover can only be used for primary database while failover and reinstate can only be used for standby database. This attribute is a forcenew attribute.

autonomousContainerDatabaseDataguardAssociationId String

The Autonomous Container Database Dataguard Association OCID. This attribute is a forcenew attribute.

autonomousContainerDatabaseId String

The Autonomous Container Database OCID. This attribute is a forcenew attribute.

operation String

There are three type of supported operations switchover, failover, reinstate. switchover can only be used for primary database while failover and reinstate can only be used for standby database. This attribute is a forcenew attribute.

autonomousContainerDatabaseDataguardAssociationId string

The Autonomous Container Database Dataguard Association OCID. This attribute is a forcenew attribute.

autonomousContainerDatabaseId string

The Autonomous Container Database OCID. This attribute is a forcenew attribute.

operation string

There are three type of supported operations switchover, failover, reinstate. switchover can only be used for primary database while failover and reinstate can only be used for standby database. This attribute is a forcenew attribute.

autonomous_container_database_dataguard_association_id str

The Autonomous Container Database Dataguard Association OCID. This attribute is a forcenew attribute.

autonomous_container_database_id str

The Autonomous Container Database OCID. This attribute is a forcenew attribute.

operation str

There are three type of supported operations switchover, failover, reinstate. switchover can only be used for primary database while failover and reinstate can only be used for standby database. This attribute is a forcenew attribute.

autonomousContainerDatabaseDataguardAssociationId String

The Autonomous Container Database Dataguard Association OCID. This attribute is a forcenew attribute.

autonomousContainerDatabaseId String

The Autonomous Container Database OCID. This attribute is a forcenew attribute.

operation String

There are three type of supported operations switchover, failover, reinstate. switchover can only be used for primary database while failover and reinstate can only be used for standby database. This attribute is a forcenew attribute.

Import

AutonomousContainerDatabaseDataguardAssociationOperation does not support import.

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.