1. Packages
  2. Alicloud Provider
  3. API Docs
  4. oos
  5. getStateConfigurations
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.oos.getStateConfigurations

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    This data source provides the Oos State Configurations of the current Alibaba Cloud user.

    NOTE: Available in v1.147.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.oos.getStateConfigurations({});
    export const oosStateConfigurationId1 = ids.then(ids => ids.configurations?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.oos.get_state_configurations()
    pulumi.export("oosStateConfigurationId1", ids.configurations[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oos"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := oos.GetStateConfigurations(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("oosStateConfigurationId1", ids.Configurations[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Oos.GetStateConfigurations.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["oosStateConfigurationId1"] = ids.Apply(getStateConfigurationsResult => getStateConfigurationsResult.Configurations[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.oos.OosFunctions;
    import com.pulumi.alicloud.oos.inputs.GetStateConfigurationsArgs;
    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 ids = OosFunctions.getStateConfigurations();
    
            ctx.export("oosStateConfigurationId1", ids.applyValue(getStateConfigurationsResult -> getStateConfigurationsResult.configurations()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:oos:getStateConfigurations
          Arguments: {}
    outputs:
      oosStateConfigurationId1: ${ids.configurations[0].id}
    

    Using getStateConfigurations

    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 getStateConfigurations(args: GetStateConfigurationsArgs, opts?: InvokeOptions): Promise<GetStateConfigurationsResult>
    function getStateConfigurationsOutput(args: GetStateConfigurationsOutputArgs, opts?: InvokeOptions): Output<GetStateConfigurationsResult>
    def get_state_configurations(ids: Optional[Sequence[str]] = None,
                                 output_file: Optional[str] = None,
                                 resource_group_id: Optional[str] = None,
                                 tags: Optional[Mapping[str, str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetStateConfigurationsResult
    def get_state_configurations_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                 output_file: Optional[pulumi.Input[str]] = None,
                                 resource_group_id: Optional[pulumi.Input[str]] = None,
                                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetStateConfigurationsResult]
    func GetStateConfigurations(ctx *Context, args *GetStateConfigurationsArgs, opts ...InvokeOption) (*GetStateConfigurationsResult, error)
    func GetStateConfigurationsOutput(ctx *Context, args *GetStateConfigurationsOutputArgs, opts ...InvokeOption) GetStateConfigurationsResultOutput

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

    public static class GetStateConfigurations 
    {
        public static Task<GetStateConfigurationsResult> InvokeAsync(GetStateConfigurationsArgs args, InvokeOptions? opts = null)
        public static Output<GetStateConfigurationsResult> Invoke(GetStateConfigurationsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStateConfigurationsResult> getStateConfigurations(GetStateConfigurationsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:oos/getStateConfigurations:getStateConfigurations
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of State Configuration IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ResourceGroupId string
    The ID of the resource group.
    Tags Dictionary<string, string>
    The tag of the resource.
    Ids []string
    A list of State Configuration IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ResourceGroupId string
    The ID of the resource group.
    Tags map[string]string
    The tag of the resource.
    ids List<String>
    A list of State Configuration IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    resourceGroupId String
    The ID of the resource group.
    tags Map<String,String>
    The tag of the resource.
    ids string[]
    A list of State Configuration IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    resourceGroupId string
    The ID of the resource group.
    tags {[key: string]: string}
    The tag of the resource.
    ids Sequence[str]
    A list of State Configuration IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    resource_group_id str
    The ID of the resource group.
    tags Mapping[str, str]
    The tag of the resource.
    ids List<String>
    A list of State Configuration IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    resourceGroupId String
    The ID of the resource group.
    tags Map<String>
    The tag of the resource.

    getStateConfigurations Result

    The following output properties are available:

    Configurations List<Pulumi.AliCloud.Oos.Outputs.GetStateConfigurationsConfiguration>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    OutputFile string
    ResourceGroupId string
    Tags Dictionary<string, string>
    Configurations []GetStateConfigurationsConfiguration
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    OutputFile string
    ResourceGroupId string
    Tags map[string]string
    configurations List<GetStateConfigurationsConfiguration>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    outputFile String
    resourceGroupId String
    tags Map<String,String>
    configurations GetStateConfigurationsConfiguration[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    outputFile string
    resourceGroupId string
    tags {[key: string]: string}
    configurations Sequence[GetStateConfigurationsConfiguration]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    output_file str
    resource_group_id str
    tags Mapping[str, str]
    configurations List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    outputFile String
    resourceGroupId String
    tags Map<String>

    Supporting Types

    GetStateConfigurationsConfiguration

    ConfigureMode string
    The configuration mode.
    CreateTime string
    The creation time.
    Description string
    The description.
    Id string
    The ID of the State Configuration.
    Parameters string
    The parameters.
    ResourceGroupId string
    The ID of the resource group.
    ScheduleExpression string
    The schedule expression.
    ScheduleType string
    The schedule type.
    StateConfigurationId string
    The ID of the final state configuration.
    Tags Dictionary<string, string>
    The tag of the resource.
    Targets string
    The target resource.
    TemplateId string
    The ID of the template.
    TemplateName string
    The name of the template.
    TemplateVersion string
    The version of the template.
    UpdateTime string
    The time when the configuration is updated.
    ConfigureMode string
    The configuration mode.
    CreateTime string
    The creation time.
    Description string
    The description.
    Id string
    The ID of the State Configuration.
    Parameters string
    The parameters.
    ResourceGroupId string
    The ID of the resource group.
    ScheduleExpression string
    The schedule expression.
    ScheduleType string
    The schedule type.
    StateConfigurationId string
    The ID of the final state configuration.
    Tags map[string]string
    The tag of the resource.
    Targets string
    The target resource.
    TemplateId string
    The ID of the template.
    TemplateName string
    The name of the template.
    TemplateVersion string
    The version of the template.
    UpdateTime string
    The time when the configuration is updated.
    configureMode String
    The configuration mode.
    createTime String
    The creation time.
    description String
    The description.
    id String
    The ID of the State Configuration.
    parameters String
    The parameters.
    resourceGroupId String
    The ID of the resource group.
    scheduleExpression String
    The schedule expression.
    scheduleType String
    The schedule type.
    stateConfigurationId String
    The ID of the final state configuration.
    tags Map<String,String>
    The tag of the resource.
    targets String
    The target resource.
    templateId String
    The ID of the template.
    templateName String
    The name of the template.
    templateVersion String
    The version of the template.
    updateTime String
    The time when the configuration is updated.
    configureMode string
    The configuration mode.
    createTime string
    The creation time.
    description string
    The description.
    id string
    The ID of the State Configuration.
    parameters string
    The parameters.
    resourceGroupId string
    The ID of the resource group.
    scheduleExpression string
    The schedule expression.
    scheduleType string
    The schedule type.
    stateConfigurationId string
    The ID of the final state configuration.
    tags {[key: string]: string}
    The tag of the resource.
    targets string
    The target resource.
    templateId string
    The ID of the template.
    templateName string
    The name of the template.
    templateVersion string
    The version of the template.
    updateTime string
    The time when the configuration is updated.
    configure_mode str
    The configuration mode.
    create_time str
    The creation time.
    description str
    The description.
    id str
    The ID of the State Configuration.
    parameters str
    The parameters.
    resource_group_id str
    The ID of the resource group.
    schedule_expression str
    The schedule expression.
    schedule_type str
    The schedule type.
    state_configuration_id str
    The ID of the final state configuration.
    tags Mapping[str, str]
    The tag of the resource.
    targets str
    The target resource.
    template_id str
    The ID of the template.
    template_name str
    The name of the template.
    template_version str
    The version of the template.
    update_time str
    The time when the configuration is updated.
    configureMode String
    The configuration mode.
    createTime String
    The creation time.
    description String
    The description.
    id String
    The ID of the State Configuration.
    parameters String
    The parameters.
    resourceGroupId String
    The ID of the resource group.
    scheduleExpression String
    The schedule expression.
    scheduleType String
    The schedule type.
    stateConfigurationId String
    The ID of the final state configuration.
    tags Map<String>
    The tag of the resource.
    targets String
    The target resource.
    templateId String
    The ID of the template.
    templateName String
    The name of the template.
    templateVersion String
    The version of the template.
    updateTime String
    The time when the configuration is updated.

    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.62.1 published on Monday, Sep 16, 2024 by Pulumi