Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.ecs.getActivations
Explore with Pulumi AI
This data source provides the Ecs Activations of the current Alibaba Cloud user.
NOTE: Available in v1.177.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.ecs.getActivations({});
export const ecsActivationId1 = ids.then(ids => ids.activations?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.ecs.get_activations()
pulumi.export("ecsActivationId1", ids.activations[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := ecs.GetActivations(ctx, nil, nil)
if err != nil {
return err
}
ctx.Export("ecsActivationId1", ids.Activations[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Ecs.GetActivations.Invoke();
return new Dictionary<string, object?>
{
["ecsActivationId1"] = ids.Apply(getActivationsResult => getActivationsResult.Activations[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetActivationsArgs;
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 = EcsFunctions.getActivations();
ctx.export("ecsActivationId1", ids.applyValue(getActivationsResult -> getActivationsResult.activations()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:ecs:getActivations
Arguments: {}
outputs:
ecsActivationId1: ${ids.activations[0].id}
Using getActivations
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 getActivations(args: GetActivationsArgs, opts?: InvokeOptions): Promise<GetActivationsResult>
function getActivationsOutput(args: GetActivationsOutputArgs, opts?: InvokeOptions): Output<GetActivationsResult>
def get_activations(ids: Optional[Sequence[str]] = None,
instance_name: Optional[str] = None,
output_file: Optional[str] = None,
page_number: Optional[int] = None,
page_size: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetActivationsResult
def get_activations_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
instance_name: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
page_number: Optional[pulumi.Input[int]] = None,
page_size: Optional[pulumi.Input[int]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetActivationsResult]
func GetActivations(ctx *Context, args *GetActivationsArgs, opts ...InvokeOption) (*GetActivationsResult, error)
func GetActivationsOutput(ctx *Context, args *GetActivationsOutputArgs, opts ...InvokeOption) GetActivationsResultOutput
> Note: This function is named GetActivations
in the Go SDK.
public static class GetActivations
{
public static Task<GetActivationsResult> InvokeAsync(GetActivationsArgs args, InvokeOptions? opts = null)
public static Output<GetActivationsResult> Invoke(GetActivationsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetActivationsResult> getActivations(GetActivationsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:ecs/getActivations:getActivations
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Activation IDs.
- Instance
Name string - The default prefix of the instance name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Number int - Page
Size int
- Ids []string
- A list of Activation IDs.
- Instance
Name string - The default prefix of the instance name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Number int - Page
Size int
- ids List<String>
- A list of Activation IDs.
- instance
Name String - The default prefix of the instance name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Integer - page
Size Integer
- ids string[]
- A list of Activation IDs.
- instance
Name string - The default prefix of the instance name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - page
Number number - page
Size number
- ids Sequence[str]
- A list of Activation IDs.
- instance_
name str - The default prefix of the instance name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - page_
number int - page_
size int
- ids List<String>
- A list of Activation IDs.
- instance
Name String - The default prefix of the instance name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Number - page
Size Number
getActivations Result
The following output properties are available:
- Activations
List<Pulumi.
Ali Cloud. Ecs. Outputs. Get Activations Activation> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Total
Count int - Instance
Name string - Output
File string - Page
Number int - Page
Size int
- Activations
[]Get
Activations Activation - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Total
Count int - Instance
Name string - Output
File string - Page
Number int - Page
Size int
- activations
List<Get
Activations Activation> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- total
Count Integer - instance
Name String - output
File String - page
Number Integer - page
Size Integer
- activations
Get
Activations Activation[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- total
Count number - instance
Name string - output
File string - page
Number number - page
Size number
- activations
Sequence[Get
Activations Activation] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- total_
count int - instance_
name str - output_
file str - page_
number int - page_
size int
- activations List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- total
Count Number - instance
Name String - output
File String - page
Number Number - page
Size Number
Supporting Types
GetActivationsActivation
- Activation
Id string - The ID of the activation code.
- Create
Time string - The time when the activation code was created.
- Deregistered
Count int - The number of instances that have been logged out.
- Description string
- Description of the corresponding activation code.
- Disabled bool
- Indicates whether the activation code is disabled.
- Id string
- The ID of the Activation.
- Instance
Count int - The maximum number of times the activation code is used to register a managed instance.
- Instance
Name string - The default prefix of the instance name.
- Ip
Address stringRange - The IP address of the host that allows the activation code to be used.
- Registered
Count int - The number of instances that were registered.
- Time
To intLive In Hours - The validity period of the activation code. Unit: hours.
- Activation
Id string - The ID of the activation code.
- Create
Time string - The time when the activation code was created.
- Deregistered
Count int - The number of instances that have been logged out.
- Description string
- Description of the corresponding activation code.
- Disabled bool
- Indicates whether the activation code is disabled.
- Id string
- The ID of the Activation.
- Instance
Count int - The maximum number of times the activation code is used to register a managed instance.
- Instance
Name string - The default prefix of the instance name.
- Ip
Address stringRange - The IP address of the host that allows the activation code to be used.
- Registered
Count int - The number of instances that were registered.
- Time
To intLive In Hours - The validity period of the activation code. Unit: hours.
- activation
Id String - The ID of the activation code.
- create
Time String - The time when the activation code was created.
- deregistered
Count Integer - The number of instances that have been logged out.
- description String
- Description of the corresponding activation code.
- disabled Boolean
- Indicates whether the activation code is disabled.
- id String
- The ID of the Activation.
- instance
Count Integer - The maximum number of times the activation code is used to register a managed instance.
- instance
Name String - The default prefix of the instance name.
- ip
Address StringRange - The IP address of the host that allows the activation code to be used.
- registered
Count Integer - The number of instances that were registered.
- time
To IntegerLive In Hours - The validity period of the activation code. Unit: hours.
- activation
Id string - The ID of the activation code.
- create
Time string - The time when the activation code was created.
- deregistered
Count number - The number of instances that have been logged out.
- description string
- Description of the corresponding activation code.
- disabled boolean
- Indicates whether the activation code is disabled.
- id string
- The ID of the Activation.
- instance
Count number - The maximum number of times the activation code is used to register a managed instance.
- instance
Name string - The default prefix of the instance name.
- ip
Address stringRange - The IP address of the host that allows the activation code to be used.
- registered
Count number - The number of instances that were registered.
- time
To numberLive In Hours - The validity period of the activation code. Unit: hours.
- activation_
id str - The ID of the activation code.
- create_
time str - The time when the activation code was created.
- deregistered_
count int - The number of instances that have been logged out.
- description str
- Description of the corresponding activation code.
- disabled bool
- Indicates whether the activation code is disabled.
- id str
- The ID of the Activation.
- instance_
count int - The maximum number of times the activation code is used to register a managed instance.
- instance_
name str - The default prefix of the instance name.
- ip_
address_ strrange - The IP address of the host that allows the activation code to be used.
- registered_
count int - The number of instances that were registered.
- time_
to_ intlive_ in_ hours - The validity period of the activation code. Unit: hours.
- activation
Id String - The ID of the activation code.
- create
Time String - The time when the activation code was created.
- deregistered
Count Number - The number of instances that have been logged out.
- description String
- Description of the corresponding activation code.
- disabled Boolean
- Indicates whether the activation code is disabled.
- id String
- The ID of the Activation.
- instance
Count Number - The maximum number of times the activation code is used to register a managed instance.
- instance
Name String - The default prefix of the instance name.
- ip
Address StringRange - The IP address of the host that allows the activation code to be used.
- registered
Count Number - The number of instances that were registered.
- time
To NumberLive In Hours - The validity period of the activation code. Unit: hours.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.