1. Registry
  2. Packages
  3. Oracle Cloud Infrastructure
  4. API Docs
  5. Mysql
  6. getBlueGreenDeployment
Viewing docs for Oracle Cloud Infrastructure v4.22.0
published on Wednesday, Aug 26, 2026 by Pulumi
oci logo oci logo
Viewing docs for Oracle Cloud Infrastructure v4.22.0
published on Wednesday, Aug 26, 2026 by Pulumi

    This data source provides details about a specific Blue Green Deployment resource in Oracle Cloud Infrastructure MySQL Database service.

    Gets a blue/green deployment by identifier.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testBlueGreenDeployment = oci.mysql.getBlueGreenDeployment({
        blueGreenDeploymentId: testBlueGreenDeploymentOciMysqlBlueGreenDeployment.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_blue_green_deployment = oci.mysql.get_blue_green_deployment(blue_green_deployment_id=test_blue_green_deployment_oci_mysql_blue_green_deployment["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v4/go/oci/mysql"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mysql.GetBlueGreenDeployment(ctx, &mysql.GetBlueGreenDeploymentArgs{
    			BlueGreenDeploymentId: testBlueGreenDeploymentOciMysqlBlueGreenDeployment.Id,
    		}, nil)
    		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 testBlueGreenDeployment = Oci.Mysql.GetBlueGreenDeployment.Invoke(new()
        {
            BlueGreenDeploymentId = testBlueGreenDeploymentOciMysqlBlueGreenDeployment.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Mysql.MysqlFunctions;
    import com.pulumi.oci.Mysql.inputs.GetBlueGreenDeploymentArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            final var testBlueGreenDeployment = MysqlFunctions.getBlueGreenDeployment(GetBlueGreenDeploymentArgs.builder()
                .blueGreenDeploymentId(testBlueGreenDeploymentOciMysqlBlueGreenDeployment.id())
                .build());
    
        }
    }
    
    variables:
      testBlueGreenDeployment:
        fn::invoke:
          function: oci:Mysql:getBlueGreenDeployment
          arguments:
            blueGreenDeploymentId: ${testBlueGreenDeploymentOciMysqlBlueGreenDeployment.id}
    
    pulumi {
      required_providers {
        oci = {
          source = "pulumi/oci"
        }
      }
    }
    
    data "oci_mysql_getbluegreendeployment" "testBlueGreenDeployment" {
      blue_green_deployment_id = testBlueGreenDeploymentOciMysqlBlueGreenDeployment.id
    }
    

    Using getBlueGreenDeployment

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getBlueGreenDeployment(args: GetBlueGreenDeploymentArgs, opts?: InvokeOptions): Promise<GetBlueGreenDeploymentResult>
    function getBlueGreenDeploymentOutput(args: GetBlueGreenDeploymentOutputArgs, opts?: InvokeOutputOptions): Output<GetBlueGreenDeploymentResult>
    def get_blue_green_deployment(blue_green_deployment_id: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetBlueGreenDeploymentResult
    def get_blue_green_deployment_output(blue_green_deployment_id: pulumi.Input[Optional[str]] = None,
                                  opts: Optional[InvokeOutputOptions] = None) -> Output[GetBlueGreenDeploymentResult]
    func LookupBlueGreenDeployment(ctx *Context, args *LookupBlueGreenDeploymentArgs, opts ...InvokeOption) (*LookupBlueGreenDeploymentResult, error)
    func LookupBlueGreenDeploymentOutput(ctx *Context, args *LookupBlueGreenDeploymentOutputArgs, opts ...InvokeOption) LookupBlueGreenDeploymentResultOutput

    > Note: This function is named LookupBlueGreenDeployment in the Go SDK.

    public static class GetBlueGreenDeployment 
    {
        public static Task<GetBlueGreenDeploymentResult> InvokeAsync(GetBlueGreenDeploymentArgs args, InvokeOptions? opts = null)
        public static Output<GetBlueGreenDeploymentResult> Invoke(GetBlueGreenDeploymentInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetBlueGreenDeploymentResult> Invoke(GetBlueGreenDeploymentInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetBlueGreenDeploymentResult> getBlueGreenDeployment(GetBlueGreenDeploymentArgs args, InvokeOptions options)
    public static Output<GetBlueGreenDeploymentResult> getBlueGreenDeployment(GetBlueGreenDeploymentArgs args, InvokeOptions options)
    public static Output<GetBlueGreenDeploymentResult> getBlueGreenDeployment(GetBlueGreenDeploymentArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: oci:Mysql/getBlueGreenDeployment:getBlueGreenDeployment
      arguments:
        # arguments dictionary
    data "oci_mysql_get_blue_green_deployment" "name" {
        # arguments
    }

    The following arguments are supported:

    BlueGreenDeploymentId string
    The OCID of the blue/green deployment.
    BlueGreenDeploymentId string
    The OCID of the blue/green deployment.
    blue_green_deployment_id string
    The OCID of the blue/green deployment.
    blueGreenDeploymentId String
    The OCID of the blue/green deployment.
    blueGreenDeploymentId string
    The OCID of the blue/green deployment.
    blue_green_deployment_id str
    The OCID of the blue/green deployment.
    blueGreenDeploymentId String
    The OCID of the blue/green deployment.

    getBlueGreenDeployment Result

    The following output properties are available:

    ActiveDbSystemId string
    The DB system OCID that currently owns the client-facing VIP and serves traffic.
    BlueGreenDeploymentId string
    ChannelDetails List<GetBlueGreenDeploymentChannelDetail>
    CompartmentId string
    The OCID of the compartment.
    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    DeleteTargetDbSystemOnDelete bool
    DisplayName string
    The display name of the blue/green deployment.
    FreeformTags Dictionary<string, string>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    The OCID of the blue/green deployment.
    LifecycleDetails string
    Additional lifecycle details.
    ReplicationChannelId string
    Replication channel OCID.
    SourceDbSystemId string
    Blue/original source DB system OCID for the deployment pair.
    SslMode string
    SSL mode used for the replication channel created by the blue/green workflow.
    State string
    The current lifecycle state.
    SwitchoverStatus string
    Stage of the most recent switchover workflow. SWITCHOVER_FAILED indicates terminal switchover failure.
    SwitchoverTrigger int
    SystemTags Dictionary<string, string>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TargetDbSystemDetails List<GetBlueGreenDeploymentTargetDbSystemDetail>
    Target DB System details for a blue/green deployment.
    TargetDbSystemId string
    Green/target DB system OCID for the deployment pair.
    TimeCreated string
    The time the deployment was created.
    TimeUpdated string
    The time the deployment was last updated.
    ActiveDbSystemId string
    The DB system OCID that currently owns the client-facing VIP and serves traffic.
    BlueGreenDeploymentId string
    ChannelDetails []GetBlueGreenDeploymentChannelDetail
    CompartmentId string
    The OCID of the compartment.
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    DeleteTargetDbSystemOnDelete bool
    DisplayName string
    The display name of the blue/green deployment.
    FreeformTags map[string]string
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    The OCID of the blue/green deployment.
    LifecycleDetails string
    Additional lifecycle details.
    ReplicationChannelId string
    Replication channel OCID.
    SourceDbSystemId string
    Blue/original source DB system OCID for the deployment pair.
    SslMode string
    SSL mode used for the replication channel created by the blue/green workflow.
    State string
    The current lifecycle state.
    SwitchoverStatus string
    Stage of the most recent switchover workflow. SWITCHOVER_FAILED indicates terminal switchover failure.
    SwitchoverTrigger int
    SystemTags map[string]string
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TargetDbSystemDetails []GetBlueGreenDeploymentTargetDbSystemDetail
    Target DB System details for a blue/green deployment.
    TargetDbSystemId string
    Green/target DB system OCID for the deployment pair.
    TimeCreated string
    The time the deployment was created.
    TimeUpdated string
    The time the deployment was last updated.
    active_db_system_id string
    The DB system OCID that currently owns the client-facing VIP and serves traffic.
    blue_green_deployment_id string
    channel_details list(object)
    compartment_id string
    The OCID of the compartment.
    defined_tags map(string)
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    delete_target_db_system_on_delete bool
    display_name string
    The display name of the blue/green deployment.
    freeform_tags map(string)
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id string
    The OCID of the blue/green deployment.
    lifecycle_details string
    Additional lifecycle details.
    replication_channel_id string
    Replication channel OCID.
    source_db_system_id string
    Blue/original source DB system OCID for the deployment pair.
    ssl_mode string
    SSL mode used for the replication channel created by the blue/green workflow.
    state string
    The current lifecycle state.
    switchover_status string
    Stage of the most recent switchover workflow. SWITCHOVER_FAILED indicates terminal switchover failure.
    switchover_trigger number
    system_tags map(string)
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    target_db_system_details list(object)
    Target DB System details for a blue/green deployment.
    target_db_system_id string
    Green/target DB system OCID for the deployment pair.
    time_created string
    The time the deployment was created.
    time_updated string
    The time the deployment was last updated.
    activeDbSystemId String
    The DB system OCID that currently owns the client-facing VIP and serves traffic.
    blueGreenDeploymentId String
    channelDetails List<GetBlueGreenDeploymentChannelDetail>
    compartmentId String
    The OCID of the compartment.
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    deleteTargetDbSystemOnDelete Boolean
    displayName String
    The display name of the blue/green deployment.
    freeformTags Map<String,String>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    The OCID of the blue/green deployment.
    lifecycleDetails String
    Additional lifecycle details.
    replicationChannelId String
    Replication channel OCID.
    sourceDbSystemId String
    Blue/original source DB system OCID for the deployment pair.
    sslMode String
    SSL mode used for the replication channel created by the blue/green workflow.
    state String
    The current lifecycle state.
    switchoverStatus String
    Stage of the most recent switchover workflow. SWITCHOVER_FAILED indicates terminal switchover failure.
    switchoverTrigger Integer
    systemTags Map<String,String>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    targetDbSystemDetails List<GetBlueGreenDeploymentTargetDbSystemDetail>
    Target DB System details for a blue/green deployment.
    targetDbSystemId String
    Green/target DB system OCID for the deployment pair.
    timeCreated String
    The time the deployment was created.
    timeUpdated String
    The time the deployment was last updated.
    activeDbSystemId string
    The DB system OCID that currently owns the client-facing VIP and serves traffic.
    blueGreenDeploymentId string
    channelDetails GetBlueGreenDeploymentChannelDetail[]
    compartmentId string
    The OCID of the compartment.
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    deleteTargetDbSystemOnDelete boolean
    displayName string
    The display name of the blue/green deployment.
    freeformTags {[key: string]: string}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id string
    The OCID of the blue/green deployment.
    lifecycleDetails string
    Additional lifecycle details.
    replicationChannelId string
    Replication channel OCID.
    sourceDbSystemId string
    Blue/original source DB system OCID for the deployment pair.
    sslMode string
    SSL mode used for the replication channel created by the blue/green workflow.
    state string
    The current lifecycle state.
    switchoverStatus string
    Stage of the most recent switchover workflow. SWITCHOVER_FAILED indicates terminal switchover failure.
    switchoverTrigger number
    systemTags {[key: string]: string}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    targetDbSystemDetails GetBlueGreenDeploymentTargetDbSystemDetail[]
    Target DB System details for a blue/green deployment.
    targetDbSystemId string
    Green/target DB system OCID for the deployment pair.
    timeCreated string
    The time the deployment was created.
    timeUpdated string
    The time the deployment was last updated.
    active_db_system_id str
    The DB system OCID that currently owns the client-facing VIP and serves traffic.
    blue_green_deployment_id str
    channel_details Sequence[GetBlueGreenDeploymentChannelDetail]
    compartment_id str
    The OCID of the compartment.
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    delete_target_db_system_on_delete bool
    display_name str
    The display name of the blue/green deployment.
    freeform_tags Mapping[str, str]
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id str
    The OCID of the blue/green deployment.
    lifecycle_details str
    Additional lifecycle details.
    replication_channel_id str
    Replication channel OCID.
    source_db_system_id str
    Blue/original source DB system OCID for the deployment pair.
    ssl_mode str
    SSL mode used for the replication channel created by the blue/green workflow.
    state str
    The current lifecycle state.
    switchover_status str
    Stage of the most recent switchover workflow. SWITCHOVER_FAILED indicates terminal switchover failure.
    switchover_trigger int
    system_tags Mapping[str, str]
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    target_db_system_details Sequence[GetBlueGreenDeploymentTargetDbSystemDetail]
    Target DB System details for a blue/green deployment.
    target_db_system_id str
    Green/target DB system OCID for the deployment pair.
    time_created str
    The time the deployment was created.
    time_updated str
    The time the deployment was last updated.
    activeDbSystemId String
    The DB system OCID that currently owns the client-facing VIP and serves traffic.
    blueGreenDeploymentId String
    channelDetails List<Property Map>
    compartmentId String
    The OCID of the compartment.
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    deleteTargetDbSystemOnDelete Boolean
    displayName String
    The display name of the blue/green deployment.
    freeformTags Map<String>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    The OCID of the blue/green deployment.
    lifecycleDetails String
    Additional lifecycle details.
    replicationChannelId String
    Replication channel OCID.
    sourceDbSystemId String
    Blue/original source DB system OCID for the deployment pair.
    sslMode String
    SSL mode used for the replication channel created by the blue/green workflow.
    state String
    The current lifecycle state.
    switchoverStatus String
    Stage of the most recent switchover workflow. SWITCHOVER_FAILED indicates terminal switchover failure.
    switchoverTrigger Number
    systemTags Map<String>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    targetDbSystemDetails List<Property Map>
    Target DB System details for a blue/green deployment.
    targetDbSystemId String
    Green/target DB system OCID for the deployment pair.
    timeCreated String
    The time the deployment was created.
    timeUpdated String
    The time the deployment was last updated.

    Supporting Types

    GetBlueGreenDeploymentChannelDetail

    ApplierUsername string
    SourcePassword string
    SourceUsername string
    SslCaCertificates List<GetBlueGreenDeploymentChannelDetailSslCaCertificate>
    SslMode string
    SSL mode used for the replication channel created by the blue/green workflow.
    ApplierUsername string
    SourcePassword string
    SourceUsername string
    SslCaCertificates []GetBlueGreenDeploymentChannelDetailSslCaCertificate
    SslMode string
    SSL mode used for the replication channel created by the blue/green workflow.
    applier_username string
    source_password string
    source_username string
    ssl_ca_certificates list(object)
    ssl_mode string
    SSL mode used for the replication channel created by the blue/green workflow.
    applierUsername String
    sourcePassword String
    sourceUsername String
    sslCaCertificates List<GetBlueGreenDeploymentChannelDetailSslCaCertificate>
    sslMode String
    SSL mode used for the replication channel created by the blue/green workflow.
    applierUsername string
    sourcePassword string
    sourceUsername string
    sslCaCertificates GetBlueGreenDeploymentChannelDetailSslCaCertificate[]
    sslMode string
    SSL mode used for the replication channel created by the blue/green workflow.
    applier_username str
    source_password str
    source_username str
    ssl_ca_certificates Sequence[GetBlueGreenDeploymentChannelDetailSslCaCertificate]
    ssl_mode str
    SSL mode used for the replication channel created by the blue/green workflow.
    applierUsername String
    sourcePassword String
    sourceUsername String
    sslCaCertificates List<Property Map>
    sslMode String
    SSL mode used for the replication channel created by the blue/green workflow.

    GetBlueGreenDeploymentChannelDetailSslCaCertificate

    GetBlueGreenDeploymentTargetDbSystemDetail

    ConfigurationId string
    The OCID of the configuration applied to the target DB System.
    DataStorageSizeInGb int
    Initial data storage size in GiBs for the target DB System.
    MysqlVersion string
    Target MySQL engine version.
    ShapeName string
    The shape of the target DB System. The shape determines resources allocated to the DB System - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. To get a list of shapes, use the ListShapes operation.
    ConfigurationId string
    The OCID of the configuration applied to the target DB System.
    DataStorageSizeInGb int
    Initial data storage size in GiBs for the target DB System.
    MysqlVersion string
    Target MySQL engine version.
    ShapeName string
    The shape of the target DB System. The shape determines resources allocated to the DB System - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. To get a list of shapes, use the ListShapes operation.
    configuration_id string
    The OCID of the configuration applied to the target DB System.
    data_storage_size_in_gb number
    Initial data storage size in GiBs for the target DB System.
    mysql_version string
    Target MySQL engine version.
    shape_name string
    The shape of the target DB System. The shape determines resources allocated to the DB System - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. To get a list of shapes, use the ListShapes operation.
    configurationId String
    The OCID of the configuration applied to the target DB System.
    dataStorageSizeInGb Integer
    Initial data storage size in GiBs for the target DB System.
    mysqlVersion String
    Target MySQL engine version.
    shapeName String
    The shape of the target DB System. The shape determines resources allocated to the DB System - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. To get a list of shapes, use the ListShapes operation.
    configurationId string
    The OCID of the configuration applied to the target DB System.
    dataStorageSizeInGb number
    Initial data storage size in GiBs for the target DB System.
    mysqlVersion string
    Target MySQL engine version.
    shapeName string
    The shape of the target DB System. The shape determines resources allocated to the DB System - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. To get a list of shapes, use the ListShapes operation.
    configuration_id str
    The OCID of the configuration applied to the target DB System.
    data_storage_size_in_gb int
    Initial data storage size in GiBs for the target DB System.
    mysql_version str
    Target MySQL engine version.
    shape_name str
    The shape of the target DB System. The shape determines resources allocated to the DB System - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. To get a list of shapes, use the ListShapes operation.
    configurationId String
    The OCID of the configuration applied to the target DB System.
    dataStorageSizeInGb Number
    Initial data storage size in GiBs for the target DB System.
    mysqlVersion String
    Target MySQL engine version.
    shapeName String
    The shape of the target DB System. The shape determines resources allocated to the DB System - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes. To get a list of shapes, use the ListShapes operation.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo oci logo
    Viewing docs for Oracle Cloud Infrastructure v4.22.0
    published on Wednesday, Aug 26, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial