1. Packages
  2. Spotinst
  3. API Docs
  4. aws
  5. OceanExtendedResourceDefinition
Spotinst v3.81.0 published on Monday, Jun 24, 2024 by Pulumi

spotinst.aws.OceanExtendedResourceDefinition

Explore with Pulumi AI

spotinst logo
Spotinst v3.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Provides a Spotinst Ocean AWS Extended Resource Definition resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as spotinst from "@pulumi/spotinst";
    
    const example = new spotinst.aws.OceanExtendedResourceDefinition("example", {
        name: "terraform_extended_resource_definition",
        resourceMapping: {
            "c3.large": "2Ki",
            "c3.xlarge": "4Ki",
        },
    });
    
    import pulumi
    import pulumi_spotinst as spotinst
    
    example = spotinst.aws.OceanExtendedResourceDefinition("example",
        name="terraform_extended_resource_definition",
        resource_mapping={
            "c3.large": "2Ki",
            "c3.xlarge": "4Ki",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-spotinst/sdk/v3/go/spotinst/aws"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aws.NewOceanExtendedResourceDefinition(ctx, "example", &aws.OceanExtendedResourceDefinitionArgs{
    			Name: pulumi.String("terraform_extended_resource_definition"),
    			ResourceMapping: pulumi.Map{
    				"c3.large":  pulumi.Any("2Ki"),
    				"c3.xlarge": pulumi.Any("4Ki"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using SpotInst = Pulumi.SpotInst;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new SpotInst.Aws.OceanExtendedResourceDefinition("example", new()
        {
            Name = "terraform_extended_resource_definition",
            ResourceMapping = 
            {
                { "c3.large", "2Ki" },
                { "c3.xlarge", "4Ki" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.spotinst.aws.OceanExtendedResourceDefinition;
    import com.pulumi.spotinst.aws.OceanExtendedResourceDefinitionArgs;
    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 example = new OceanExtendedResourceDefinition("example", OceanExtendedResourceDefinitionArgs.builder()
                .name("terraform_extended_resource_definition")
                .resourceMapping(Map.ofEntries(
                    Map.entry("c3.large", "2Ki"),
                    Map.entry("c3.xlarge", "4Ki")
                ))
                .build());
    
        }
    }
    
    resources:
      example:
        type: spotinst:aws:OceanExtendedResourceDefinition
        properties:
          name: terraform_extended_resource_definition
          resourceMapping:
            c3.large: 2Ki
            c3.xlarge: 4Ki
    

    Create OceanExtendedResourceDefinition Resource

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

    Constructor syntax

    new OceanExtendedResourceDefinition(name: string, args: OceanExtendedResourceDefinitionArgs, opts?: CustomResourceOptions);
    @overload
    def OceanExtendedResourceDefinition(resource_name: str,
                                        args: OceanExtendedResourceDefinitionArgs,
                                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def OceanExtendedResourceDefinition(resource_name: str,
                                        opts: Optional[ResourceOptions] = None,
                                        resource_mapping: Optional[Mapping[str, Any]] = None,
                                        name: Optional[str] = None)
    func NewOceanExtendedResourceDefinition(ctx *Context, name string, args OceanExtendedResourceDefinitionArgs, opts ...ResourceOption) (*OceanExtendedResourceDefinition, error)
    public OceanExtendedResourceDefinition(string name, OceanExtendedResourceDefinitionArgs args, CustomResourceOptions? opts = null)
    public OceanExtendedResourceDefinition(String name, OceanExtendedResourceDefinitionArgs args)
    public OceanExtendedResourceDefinition(String name, OceanExtendedResourceDefinitionArgs args, CustomResourceOptions options)
    
    type: spotinst:aws:OceanExtendedResourceDefinition
    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 OceanExtendedResourceDefinitionArgs
    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 OceanExtendedResourceDefinitionArgs
    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 OceanExtendedResourceDefinitionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OceanExtendedResourceDefinitionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OceanExtendedResourceDefinitionArgs
    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 oceanExtendedResourceDefinitionResource = new SpotInst.Aws.OceanExtendedResourceDefinition("oceanExtendedResourceDefinitionResource", new()
    {
        ResourceMapping = 
        {
            { "string", "any" },
        },
        Name = "string",
    });
    
    example, err := aws.NewOceanExtendedResourceDefinition(ctx, "oceanExtendedResourceDefinitionResource", &aws.OceanExtendedResourceDefinitionArgs{
    	ResourceMapping: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Name: pulumi.String("string"),
    })
    
    var oceanExtendedResourceDefinitionResource = new OceanExtendedResourceDefinition("oceanExtendedResourceDefinitionResource", OceanExtendedResourceDefinitionArgs.builder()
        .resourceMapping(Map.of("string", "any"))
        .name("string")
        .build());
    
    ocean_extended_resource_definition_resource = spotinst.aws.OceanExtendedResourceDefinition("oceanExtendedResourceDefinitionResource",
        resource_mapping={
            "string": "any",
        },
        name="string")
    
    const oceanExtendedResourceDefinitionResource = new spotinst.aws.OceanExtendedResourceDefinition("oceanExtendedResourceDefinitionResource", {
        resourceMapping: {
            string: "any",
        },
        name: "string",
    });
    
    type: spotinst:aws:OceanExtendedResourceDefinition
    properties:
        name: string
        resourceMapping:
            string: any
    

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

    ResourceMapping Dictionary<string, object>
    A mapping between AWS instanceType or * as default and its value for the given extended resource.
    Name string
    The extended resource name as should be requested by your pods and registered to the nodes. Cannot be updated. The name should be a valid Kubernetes extended resource name.
    ResourceMapping map[string]interface{}
    A mapping between AWS instanceType or * as default and its value for the given extended resource.
    Name string
    The extended resource name as should be requested by your pods and registered to the nodes. Cannot be updated. The name should be a valid Kubernetes extended resource name.
    resourceMapping Map<String,Object>
    A mapping between AWS instanceType or * as default and its value for the given extended resource.
    name String
    The extended resource name as should be requested by your pods and registered to the nodes. Cannot be updated. The name should be a valid Kubernetes extended resource name.
    resourceMapping {[key: string]: any}
    A mapping between AWS instanceType or * as default and its value for the given extended resource.
    name string
    The extended resource name as should be requested by your pods and registered to the nodes. Cannot be updated. The name should be a valid Kubernetes extended resource name.
    resource_mapping Mapping[str, Any]
    A mapping between AWS instanceType or * as default and its value for the given extended resource.
    name str
    The extended resource name as should be requested by your pods and registered to the nodes. Cannot be updated. The name should be a valid Kubernetes extended resource name.
    resourceMapping Map<Any>
    A mapping between AWS instanceType or * as default and its value for the given extended resource.
    name String
    The extended resource name as should be requested by your pods and registered to the nodes. Cannot be updated. The name should be a valid Kubernetes extended resource name.

    Outputs

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

    Get an existing OceanExtendedResourceDefinition 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?: OceanExtendedResourceDefinitionState, opts?: CustomResourceOptions): OceanExtendedResourceDefinition
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            resource_mapping: Optional[Mapping[str, Any]] = None) -> OceanExtendedResourceDefinition
    func GetOceanExtendedResourceDefinition(ctx *Context, name string, id IDInput, state *OceanExtendedResourceDefinitionState, opts ...ResourceOption) (*OceanExtendedResourceDefinition, error)
    public static OceanExtendedResourceDefinition Get(string name, Input<string> id, OceanExtendedResourceDefinitionState? state, CustomResourceOptions? opts = null)
    public static OceanExtendedResourceDefinition get(String name, Output<String> id, OceanExtendedResourceDefinitionState 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:
    Name string
    The extended resource name as should be requested by your pods and registered to the nodes. Cannot be updated. The name should be a valid Kubernetes extended resource name.
    ResourceMapping Dictionary<string, object>
    A mapping between AWS instanceType or * as default and its value for the given extended resource.
    Name string
    The extended resource name as should be requested by your pods and registered to the nodes. Cannot be updated. The name should be a valid Kubernetes extended resource name.
    ResourceMapping map[string]interface{}
    A mapping between AWS instanceType or * as default and its value for the given extended resource.
    name String
    The extended resource name as should be requested by your pods and registered to the nodes. Cannot be updated. The name should be a valid Kubernetes extended resource name.
    resourceMapping Map<String,Object>
    A mapping between AWS instanceType or * as default and its value for the given extended resource.
    name string
    The extended resource name as should be requested by your pods and registered to the nodes. Cannot be updated. The name should be a valid Kubernetes extended resource name.
    resourceMapping {[key: string]: any}
    A mapping between AWS instanceType or * as default and its value for the given extended resource.
    name str
    The extended resource name as should be requested by your pods and registered to the nodes. Cannot be updated. The name should be a valid Kubernetes extended resource name.
    resource_mapping Mapping[str, Any]
    A mapping between AWS instanceType or * as default and its value for the given extended resource.
    name String
    The extended resource name as should be requested by your pods and registered to the nodes. Cannot be updated. The name should be a valid Kubernetes extended resource name.
    resourceMapping Map<Any>
    A mapping between AWS instanceType or * as default and its value for the given extended resource.

    Package Details

    Repository
    Spotinst pulumi/pulumi-spotinst
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the spotinst Terraform Provider.
    spotinst logo
    Spotinst v3.81.0 published on Monday, Jun 24, 2024 by Pulumi