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

oci.Database.AutonomousContainerDatabaseDataguardAssociationOperation

Explore with Pulumi AI

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

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const switchover = new oci.database.AutonomousContainerDatabaseDataguardAssociationOperation("switchover", {
        operation: "switchover",
        autonomousContainerDatabaseId: dataguardAssociations.autonomousContainerDatabaseDataguardAssociations[0].autonomous_container_database_id,
        autonomousContainerDatabaseDataguardAssociationId: dataguardAssociations.autonomousContainerDatabaseDataguardAssociations[0].id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    switchover = oci.database.AutonomousContainerDatabaseDataguardAssociationOperation("switchover",
        operation="switchover",
        autonomous_container_database_id=dataguard_associations["autonomousContainerDatabaseDataguardAssociations"][0]["autonomous_container_database_id"],
        autonomous_container_database_dataguard_association_id=dataguard_associations["autonomousContainerDatabaseDataguardAssociations"][0]["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.NewAutonomousContainerDatabaseDataguardAssociationOperation(ctx, "switchover", &Database.AutonomousContainerDatabaseDataguardAssociationOperationArgs{
    			Operation:                     pulumi.String("switchover"),
    			AutonomousContainerDatabaseId: pulumi.Any(dataguardAssociations.AutonomousContainerDatabaseDataguardAssociations[0].Autonomous_container_database_id),
    			AutonomousContainerDatabaseDataguardAssociationId: pulumi.Any(dataguardAssociations.AutonomousContainerDatabaseDataguardAssociations[0].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 switchover = new Oci.Database.AutonomousContainerDatabaseDataguardAssociationOperation("switchover", new()
        {
            Operation = "switchover",
            AutonomousContainerDatabaseId = dataguardAssociations.AutonomousContainerDatabaseDataguardAssociations[0].Autonomous_container_database_id,
            AutonomousContainerDatabaseDataguardAssociationId = dataguardAssociations.AutonomousContainerDatabaseDataguardAssociations[0].Id,
        });
    
    });
    
    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(dataguardAssociations.autonomousContainerDatabaseDataguardAssociations()[0].autonomous_container_database_id())
                .autonomousContainerDatabaseDataguardAssociationId(dataguardAssociations.autonomousContainerDatabaseDataguardAssociations()[0].id())
                .build());
    
        }
    }
    
    resources:
      switchover:
        type: oci:Database:AutonomousContainerDatabaseDataguardAssociationOperation
        properties:
          operation: switchover
          autonomousContainerDatabaseId: ${dataguardAssociations.autonomousContainerDatabaseDataguardAssociations[0].autonomous_container_database_id}
          autonomousContainerDatabaseDataguardAssociationId: ${dataguardAssociations.autonomousContainerDatabaseDataguardAssociations[0].id}
    

    Create AutonomousContainerDatabaseDataguardAssociationOperation Resource

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

    Constructor syntax

    new AutonomousContainerDatabaseDataguardAssociationOperation(name: string, args: AutonomousContainerDatabaseDataguardAssociationOperationArgs, opts?: CustomResourceOptions);
    @overload
    def AutonomousContainerDatabaseDataguardAssociationOperation(resource_name: str,
                                                                 args: AutonomousContainerDatabaseDataguardAssociationOperationArgs,
                                                                 opts: Optional[ResourceOptions] = None)
    
    @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)
    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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var autonomousContainerDatabaseDataguardAssociationOperationResource = new Oci.Database.AutonomousContainerDatabaseDataguardAssociationOperation("autonomousContainerDatabaseDataguardAssociationOperationResource", new()
    {
        AutonomousContainerDatabaseDataguardAssociationId = "string",
        AutonomousContainerDatabaseId = "string",
        Operation = "string",
    });
    
    example, err := Database.NewAutonomousContainerDatabaseDataguardAssociationOperation(ctx, "autonomousContainerDatabaseDataguardAssociationOperationResource", &Database.AutonomousContainerDatabaseDataguardAssociationOperationArgs{
    	AutonomousContainerDatabaseDataguardAssociationId: pulumi.String("string"),
    	AutonomousContainerDatabaseId:                     pulumi.String("string"),
    	Operation:                                         pulumi.String("string"),
    })
    
    var autonomousContainerDatabaseDataguardAssociationOperationResource = new AutonomousContainerDatabaseDataguardAssociationOperation("autonomousContainerDatabaseDataguardAssociationOperationResource", AutonomousContainerDatabaseDataguardAssociationOperationArgs.builder()
        .autonomousContainerDatabaseDataguardAssociationId("string")
        .autonomousContainerDatabaseId("string")
        .operation("string")
        .build());
    
    autonomous_container_database_dataguard_association_operation_resource = oci.database.AutonomousContainerDatabaseDataguardAssociationOperation("autonomousContainerDatabaseDataguardAssociationOperationResource",
        autonomous_container_database_dataguard_association_id="string",
        autonomous_container_database_id="string",
        operation="string")
    
    const autonomousContainerDatabaseDataguardAssociationOperationResource = new oci.database.AutonomousContainerDatabaseDataguardAssociationOperation("autonomousContainerDatabaseDataguardAssociationOperationResource", {
        autonomousContainerDatabaseDataguardAssociationId: "string",
        autonomousContainerDatabaseId: "string",
        operation: "string",
    });
    
    type: oci:Database:AutonomousContainerDatabaseDataguardAssociationOperation
    properties:
        autonomousContainerDatabaseDataguardAssociationId: string
        autonomousContainerDatabaseId: string
        operation: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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.

    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