1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. eds
  5. CustomProperty
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.eds.CustomProperty

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Provides a ECD Custom Property resource.

    For information about ECD Custom Property and how to use it, see What is Custom Property.

    NOTE: Available since v1.176.0.

    NOTE: Up to 10 different attributes can be created under an alibaba cloud account. Up to 50 different attribute values can be added under an attribute.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = new alicloud.eds.CustomProperty("example", {
        propertyKey: "example_key",
        propertyValues: [{
            propertyValue: "example_value",
        }],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.eds.CustomProperty("example",
        property_key="example_key",
        property_values=[alicloud.eds.CustomPropertyPropertyValueArgs(
            property_value="example_value",
        )])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eds"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := eds.NewCustomProperty(ctx, "example", &eds.CustomPropertyArgs{
    			PropertyKey: pulumi.String("example_key"),
    			PropertyValues: eds.CustomPropertyPropertyValueArray{
    				&eds.CustomPropertyPropertyValueArgs{
    					PropertyValue: pulumi.String("example_value"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AliCloud.Eds.CustomProperty("example", new()
        {
            PropertyKey = "example_key",
            PropertyValues = new[]
            {
                new AliCloud.Eds.Inputs.CustomPropertyPropertyValueArgs
                {
                    PropertyValue = "example_value",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.eds.CustomProperty;
    import com.pulumi.alicloud.eds.CustomPropertyArgs;
    import com.pulumi.alicloud.eds.inputs.CustomPropertyPropertyValueArgs;
    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 CustomProperty("example", CustomPropertyArgs.builder()        
                .propertyKey("example_key")
                .propertyValues(CustomPropertyPropertyValueArgs.builder()
                    .propertyValue("example_value")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: alicloud:eds:CustomProperty
        properties:
          propertyKey: example_key
          propertyValues:
            - propertyValue: example_value
    

    Create CustomProperty Resource

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

    Constructor syntax

    new CustomProperty(name: string, args: CustomPropertyArgs, opts?: CustomResourceOptions);
    @overload
    def CustomProperty(resource_name: str,
                       args: CustomPropertyArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def CustomProperty(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       property_key: Optional[str] = None,
                       property_values: Optional[Sequence[CustomPropertyPropertyValueArgs]] = None)
    func NewCustomProperty(ctx *Context, name string, args CustomPropertyArgs, opts ...ResourceOption) (*CustomProperty, error)
    public CustomProperty(string name, CustomPropertyArgs args, CustomResourceOptions? opts = null)
    public CustomProperty(String name, CustomPropertyArgs args)
    public CustomProperty(String name, CustomPropertyArgs args, CustomResourceOptions options)
    
    type: alicloud:eds:CustomProperty
    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 CustomPropertyArgs
    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 CustomPropertyArgs
    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 CustomPropertyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CustomPropertyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CustomPropertyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var customPropertyResource = new AliCloud.Eds.CustomProperty("customPropertyResource", new()
    {
        PropertyKey = "string",
        PropertyValues = new[]
        {
            new AliCloud.Eds.Inputs.CustomPropertyPropertyValueArgs
            {
                PropertyValue = "string",
                PropertyValueId = "string",
            },
        },
    });
    
    example, err := eds.NewCustomProperty(ctx, "customPropertyResource", &eds.CustomPropertyArgs{
    	PropertyKey: pulumi.String("string"),
    	PropertyValues: eds.CustomPropertyPropertyValueArray{
    		&eds.CustomPropertyPropertyValueArgs{
    			PropertyValue:   pulumi.String("string"),
    			PropertyValueId: pulumi.String("string"),
    		},
    	},
    })
    
    var customPropertyResource = new CustomProperty("customPropertyResource", CustomPropertyArgs.builder()        
        .propertyKey("string")
        .propertyValues(CustomPropertyPropertyValueArgs.builder()
            .propertyValue("string")
            .propertyValueId("string")
            .build())
        .build());
    
    custom_property_resource = alicloud.eds.CustomProperty("customPropertyResource",
        property_key="string",
        property_values=[alicloud.eds.CustomPropertyPropertyValueArgs(
            property_value="string",
            property_value_id="string",
        )])
    
    const customPropertyResource = new alicloud.eds.CustomProperty("customPropertyResource", {
        propertyKey: "string",
        propertyValues: [{
            propertyValue: "string",
            propertyValueId: "string",
        }],
    });
    
    type: alicloud:eds:CustomProperty
    properties:
        propertyKey: string
        propertyValues:
            - propertyValue: string
              propertyValueId: string
    

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

    PropertyKey string
    The Custom attribute key.
    PropertyValues List<Pulumi.AliCloud.Eds.Inputs.CustomPropertyPropertyValue>
    Custom attribute sets the value of. See property_values below.
    PropertyKey string
    The Custom attribute key.
    PropertyValues []CustomPropertyPropertyValueArgs
    Custom attribute sets the value of. See property_values below.
    propertyKey String
    The Custom attribute key.
    propertyValues List<CustomPropertyPropertyValue>
    Custom attribute sets the value of. See property_values below.
    propertyKey string
    The Custom attribute key.
    propertyValues CustomPropertyPropertyValue[]
    Custom attribute sets the value of. See property_values below.
    property_key str
    The Custom attribute key.
    property_values Sequence[CustomPropertyPropertyValueArgs]
    Custom attribute sets the value of. See property_values below.
    propertyKey String
    The Custom attribute key.
    propertyValues List<Property Map>
    Custom attribute sets the value of. See property_values below.

    Outputs

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

    Get an existing CustomProperty 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?: CustomPropertyState, opts?: CustomResourceOptions): CustomProperty
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            property_key: Optional[str] = None,
            property_values: Optional[Sequence[CustomPropertyPropertyValueArgs]] = None) -> CustomProperty
    func GetCustomProperty(ctx *Context, name string, id IDInput, state *CustomPropertyState, opts ...ResourceOption) (*CustomProperty, error)
    public static CustomProperty Get(string name, Input<string> id, CustomPropertyState? state, CustomResourceOptions? opts = null)
    public static CustomProperty get(String name, Output<String> id, CustomPropertyState 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:
    PropertyKey string
    The Custom attribute key.
    PropertyValues List<Pulumi.AliCloud.Eds.Inputs.CustomPropertyPropertyValue>
    Custom attribute sets the value of. See property_values below.
    PropertyKey string
    The Custom attribute key.
    PropertyValues []CustomPropertyPropertyValueArgs
    Custom attribute sets the value of. See property_values below.
    propertyKey String
    The Custom attribute key.
    propertyValues List<CustomPropertyPropertyValue>
    Custom attribute sets the value of. See property_values below.
    propertyKey string
    The Custom attribute key.
    propertyValues CustomPropertyPropertyValue[]
    Custom attribute sets the value of. See property_values below.
    property_key str
    The Custom attribute key.
    property_values Sequence[CustomPropertyPropertyValueArgs]
    Custom attribute sets the value of. See property_values below.
    propertyKey String
    The Custom attribute key.
    propertyValues List<Property Map>
    Custom attribute sets the value of. See property_values below.

    Supporting Types

    CustomPropertyPropertyValue, CustomPropertyPropertyValueArgs

    PropertyValue string
    The value of an attribute.
    PropertyValueId string
    The value of an attribute id.
    PropertyValue string
    The value of an attribute.
    PropertyValueId string
    The value of an attribute id.
    propertyValue String
    The value of an attribute.
    propertyValueId String
    The value of an attribute id.
    propertyValue string
    The value of an attribute.
    propertyValueId string
    The value of an attribute id.
    property_value str
    The value of an attribute.
    property_value_id str
    The value of an attribute id.
    propertyValue String
    The value of an attribute.
    propertyValueId String
    The value of an attribute id.

    Import

    ECD Custom Property can be imported using the id, e.g.

    $ pulumi import alicloud:eds/customProperty:CustomProperty example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi