1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Mysql
  5. getShapes
Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi

oci.Mysql.getShapes

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi

This data source provides the list of Shapes in Oracle Cloud Infrastructure MySQL Database service.

Gets a list of the shapes you can use to create a new MySQL DB System. The shape determines the 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.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testShapes = oci.Mysql.getShapes({
    compartmentId: compartmentId,
    availabilityDomain: shapeAvailabilityDomain,
    isSupportedFors: shapeIsSupportedFor,
    name: shapeName,
});
Copy
import pulumi
import pulumi_oci as oci

test_shapes = oci.Mysql.get_shapes(compartment_id=compartment_id,
    availability_domain=shape_availability_domain,
    is_supported_fors=shape_is_supported_for,
    name=shape_name)
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/mysql"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := mysql.GetShapes(ctx, &mysql.GetShapesArgs{
			CompartmentId:      compartmentId,
			AvailabilityDomain: pulumi.StringRef(shapeAvailabilityDomain),
			IsSupportedFors:    shapeIsSupportedFor,
			Name:               pulumi.StringRef(shapeName),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testShapes = Oci.Mysql.GetShapes.Invoke(new()
    {
        CompartmentId = compartmentId,
        AvailabilityDomain = shapeAvailabilityDomain,
        IsSupportedFors = shapeIsSupportedFor,
        Name = shapeName,
    });

});
Copy
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.GetShapesArgs;
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) {
        final var testShapes = MysqlFunctions.getShapes(GetShapesArgs.builder()
            .compartmentId(compartmentId)
            .availabilityDomain(shapeAvailabilityDomain)
            .isSupportedFors(shapeIsSupportedFor)
            .name(shapeName)
            .build());

    }
}
Copy
variables:
  testShapes:
    fn::invoke:
      function: oci:Mysql:getShapes
      arguments:
        compartmentId: ${compartmentId}
        availabilityDomain: ${shapeAvailabilityDomain}
        isSupportedFors: ${shapeIsSupportedFor}
        name: ${shapeName}
Copy

Using getShapes

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 getShapes(args: GetShapesArgs, opts?: InvokeOptions): Promise<GetShapesResult>
function getShapesOutput(args: GetShapesOutputArgs, opts?: InvokeOptions): Output<GetShapesResult>
Copy
def get_shapes(availability_domain: Optional[str] = None,
               compartment_id: Optional[str] = None,
               filters: Optional[Sequence[_mysql.GetShapesFilter]] = None,
               is_supported_fors: Optional[Sequence[str]] = None,
               name: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetShapesResult
def get_shapes_output(availability_domain: Optional[pulumi.Input[str]] = None,
               compartment_id: Optional[pulumi.Input[str]] = None,
               filters: Optional[pulumi.Input[Sequence[pulumi.Input[_mysql.GetShapesFilterArgs]]]] = None,
               is_supported_fors: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
               name: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetShapesResult]
Copy
func GetShapes(ctx *Context, args *GetShapesArgs, opts ...InvokeOption) (*GetShapesResult, error)
func GetShapesOutput(ctx *Context, args *GetShapesOutputArgs, opts ...InvokeOption) GetShapesResultOutput
Copy

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

public static class GetShapes 
{
    public static Task<GetShapesResult> InvokeAsync(GetShapesArgs args, InvokeOptions? opts = null)
    public static Output<GetShapesResult> Invoke(GetShapesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetShapesResult> getShapes(GetShapesArgs args, InvokeOptions options)
public static Output<GetShapesResult> getShapes(GetShapesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Mysql/getShapes:getShapes
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
The compartment OCID.
AvailabilityDomain string
The name of the Availability Domain.
Filters Changes to this property will trigger replacement. List<GetShapesFilter>
IsSupportedFors List<string>
Return shapes that are supported by the service feature.
Name string
Name
CompartmentId This property is required. string
The compartment OCID.
AvailabilityDomain string
The name of the Availability Domain.
Filters Changes to this property will trigger replacement. []GetShapesFilter
IsSupportedFors []string
Return shapes that are supported by the service feature.
Name string
Name
compartmentId This property is required. String
The compartment OCID.
availabilityDomain String
The name of the Availability Domain.
filters Changes to this property will trigger replacement. List<GetShapesFilter>
isSupportedFors List<String>
Return shapes that are supported by the service feature.
name String
Name
compartmentId This property is required. string
The compartment OCID.
availabilityDomain string
The name of the Availability Domain.
filters Changes to this property will trigger replacement. GetShapesFilter[]
isSupportedFors string[]
Return shapes that are supported by the service feature.
name string
Name
compartment_id This property is required. str
The compartment OCID.
availability_domain str
The name of the Availability Domain.
filters Changes to this property will trigger replacement. Sequence[mysql.GetShapesFilter]
is_supported_fors Sequence[str]
Return shapes that are supported by the service feature.
name str
Name
compartmentId This property is required. String
The compartment OCID.
availabilityDomain String
The name of the Availability Domain.
filters Changes to this property will trigger replacement. List<Property Map>
isSupportedFors List<String>
Return shapes that are supported by the service feature.
name String
Name

getShapes Result

The following output properties are available:

CompartmentId string
Id string
The provider-assigned unique ID for this managed resource.
Shapes List<GetShapesShape>
The list of shapes.
AvailabilityDomain string
Filters List<GetShapesFilter>
IsSupportedFors List<string>
What service features the shape is supported for.
Name string
The name of the shape used for the DB System.
CompartmentId string
Id string
The provider-assigned unique ID for this managed resource.
Shapes []GetShapesShape
The list of shapes.
AvailabilityDomain string
Filters []GetShapesFilter
IsSupportedFors []string
What service features the shape is supported for.
Name string
The name of the shape used for the DB System.
compartmentId String
id String
The provider-assigned unique ID for this managed resource.
shapes List<GetShapesShape>
The list of shapes.
availabilityDomain String
filters List<GetShapesFilter>
isSupportedFors List<String>
What service features the shape is supported for.
name String
The name of the shape used for the DB System.
compartmentId string
id string
The provider-assigned unique ID for this managed resource.
shapes GetShapesShape[]
The list of shapes.
availabilityDomain string
filters GetShapesFilter[]
isSupportedFors string[]
What service features the shape is supported for.
name string
The name of the shape used for the DB System.
compartment_id str
id str
The provider-assigned unique ID for this managed resource.
shapes Sequence[mysql.GetShapesShape]
The list of shapes.
availability_domain str
filters Sequence[mysql.GetShapesFilter]
is_supported_fors Sequence[str]
What service features the shape is supported for.
name str
The name of the shape used for the DB System.
compartmentId String
id String
The provider-assigned unique ID for this managed resource.
shapes List<Property Map>
The list of shapes.
availabilityDomain String
filters List<Property Map>
isSupportedFors List<String>
What service features the shape is supported for.
name String
The name of the shape used for the DB System.

Supporting Types

GetShapesFilter

Name This property is required. string
Name
Values This property is required. List<string>
Regex bool
Name This property is required. string
Name
Values This property is required. []string
Regex bool
name This property is required. String
Name
values This property is required. List<String>
regex Boolean
name This property is required. string
Name
values This property is required. string[]
regex boolean
name This property is required. str
Name
values This property is required. Sequence[str]
regex bool
name This property is required. String
Name
values This property is required. List<String>
regex Boolean

GetShapesShape

CpuCoreCount This property is required. int
The number of CPU Cores the Instance provides. These are "OCPU"s.
IsSupportedFors This property is required. List<string>
Return shapes that are supported by the service feature.
MemorySizeInGbs This property is required. int
The amount of RAM the Instance provides. This is an IEC base-2 number.
Name This property is required. string
Name
CpuCoreCount This property is required. int
The number of CPU Cores the Instance provides. These are "OCPU"s.
IsSupportedFors This property is required. []string
Return shapes that are supported by the service feature.
MemorySizeInGbs This property is required. int
The amount of RAM the Instance provides. This is an IEC base-2 number.
Name This property is required. string
Name
cpuCoreCount This property is required. Integer
The number of CPU Cores the Instance provides. These are "OCPU"s.
isSupportedFors This property is required. List<String>
Return shapes that are supported by the service feature.
memorySizeInGbs This property is required. Integer
The amount of RAM the Instance provides. This is an IEC base-2 number.
name This property is required. String
Name
cpuCoreCount This property is required. number
The number of CPU Cores the Instance provides. These are "OCPU"s.
isSupportedFors This property is required. string[]
Return shapes that are supported by the service feature.
memorySizeInGbs This property is required. number
The amount of RAM the Instance provides. This is an IEC base-2 number.
name This property is required. string
Name
cpu_core_count This property is required. int
The number of CPU Cores the Instance provides. These are "OCPU"s.
is_supported_fors This property is required. Sequence[str]
Return shapes that are supported by the service feature.
memory_size_in_gbs This property is required. int
The amount of RAM the Instance provides. This is an IEC base-2 number.
name This property is required. str
Name
cpuCoreCount This property is required. Number
The number of CPU Cores the Instance provides. These are "OCPU"s.
isSupportedFors This property is required. List<String>
Return shapes that are supported by the service feature.
memorySizeInGbs This property is required. Number
The amount of RAM the Instance provides. This is an IEC base-2 number.
name This property is required. String
Name

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi