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

oci.Mysql.getShapes

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 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,
    });
    
    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)
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      testShapes:
        fn::invoke:
          Function: oci:Mysql:getShapes
          Arguments:
            compartmentId: ${compartmentId}
            availabilityDomain: ${shapeAvailabilityDomain}
            isSupportedFors: ${shapeIsSupportedFor}
            name: ${shapeName}
    

    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>
    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]
    func GetShapes(ctx *Context, args *GetShapesArgs, opts ...InvokeOption) (*GetShapesResult, error)
    func GetShapesOutput(ctx *Context, args *GetShapesOutputArgs, opts ...InvokeOption) GetShapesResultOutput

    > 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)
    }
    public static CompletableFuture<GetShapesResult> getShapes(GetShapesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Mysql/getShapes:getShapes
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The compartment OCID.
    AvailabilityDomain string
    The name of the Availability Domain.
    Filters List<GetShapesFilter>
    IsSupportedFors List<string>
    Return shapes that are supported by the service feature.
    Name string
    Name
    CompartmentId string
    The compartment OCID.
    AvailabilityDomain string
    The name of the Availability Domain.
    Filters []GetShapesFilter
    IsSupportedFors []string
    Return shapes that are supported by the service feature.
    Name string
    Name
    compartmentId String
    The compartment OCID.
    availabilityDomain String
    The name of the Availability Domain.
    filters List<GetShapesFilter>
    isSupportedFors List<String>
    Return shapes that are supported by the service feature.
    name String
    Name
    compartmentId string
    The compartment OCID.
    availabilityDomain string
    The name of the Availability Domain.
    filters GetShapesFilter[]
    isSupportedFors string[]
    Return shapes that are supported by the service feature.
    name string
    Name
    compartment_id str
    The compartment OCID.
    availability_domain str
    The name of the Availability Domain.
    filters Sequence[mysql.GetShapesFilter]
    is_supported_fors Sequence[str]
    Return shapes that are supported by the service feature.
    name str
    Name
    compartmentId String
    The compartment OCID.
    availabilityDomain String
    The name of the Availability Domain.
    filters 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 string
    Name
    Values List<string>
    Regex bool
    Name string
    Name
    Values []string
    Regex bool
    name String
    Name
    values List<String>
    regex Boolean
    name string
    Name
    values string[]
    regex boolean
    name str
    Name
    values Sequence[str]
    regex bool
    name String
    Name
    values List<String>
    regex Boolean

    GetShapesShape

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

    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