Provides information about a list of Image Share Group Tokens that match a set of filters. For more information, see the Linode APIv4 docs. May not be currently available to all users even under v4beta.
Example Usage
The following example shows how one might use this data source to list Image Share Groups.
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
export = async () => {
const all = await linode.getConsumerImageShareGroupTokens({});
const filtered = await linode.getConsumerImageShareGroupTokens({
filters: [{
name: "label",
values: ["my-label"],
}],
});
return {
"all-share-group-tokens": all.tokens,
"filtered-share-group-tokens": filtered.tokens,
};
}
import pulumi
import pulumi_linode as linode
all = linode.get_consumer_image_share_group_tokens()
filtered = linode.get_consumer_image_share_group_tokens(filters=[{
"name": "label",
"values": ["my-label"],
}])
pulumi.export("all-share-group-tokens", all.tokens)
pulumi.export("filtered-share-group-tokens", filtered.tokens)
package main
import (
"github.com/pulumi/pulumi-linode/sdk/v5/go/linode"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
all, err := linode.GetConsumerImageShareGroupTokens(ctx, &linode.GetConsumerImageShareGroupTokensArgs{}, nil)
if err != nil {
return err
}
filtered, err := linode.GetConsumerImageShareGroupTokens(ctx, &linode.GetConsumerImageShareGroupTokensArgs{
Filters: []linode.GetConsumerImageShareGroupTokensFilter{
{
Name: "label",
Values: []string{
"my-label",
},
},
},
}, nil)
if err != nil {
return err
}
ctx.Export("all-share-group-tokens", all.Tokens)
ctx.Export("filtered-share-group-tokens", filtered.Tokens)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() =>
{
var all = Linode.GetConsumerImageShareGroupTokens.Invoke();
var filtered = Linode.GetConsumerImageShareGroupTokens.Invoke(new()
{
Filters = new[]
{
new Linode.Inputs.GetConsumerImageShareGroupTokensFilterInputArgs
{
Name = "label",
Values = new[]
{
"my-label",
},
},
},
});
return new Dictionary<string, object?>
{
["all-share-group-tokens"] = all.Apply(getConsumerImageShareGroupTokensResult => getConsumerImageShareGroupTokensResult.Tokens),
["filtered-share-group-tokens"] = filtered.Apply(getConsumerImageShareGroupTokensResult => getConsumerImageShareGroupTokensResult.Tokens),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetConsumerImageShareGroupTokensArgs;
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 all = LinodeFunctions.getConsumerImageShareGroupTokens(GetConsumerImageShareGroupTokensArgs.builder()
.build());
final var filtered = LinodeFunctions.getConsumerImageShareGroupTokens(GetConsumerImageShareGroupTokensArgs.builder()
.filters(GetConsumerImageShareGroupTokensFilterArgs.builder()
.name("label")
.values("my-label")
.build())
.build());
ctx.export("all-share-group-tokens", all.tokens());
ctx.export("filtered-share-group-tokens", filtered.tokens());
}
}
variables:
all:
fn::invoke:
function: linode:getConsumerImageShareGroupTokens
arguments: {}
filtered:
fn::invoke:
function: linode:getConsumerImageShareGroupTokens
arguments:
filters:
- name: label
values:
- my-label
outputs:
all-share-group-tokens: ${all.tokens}
filtered-share-group-tokens: ${filtered.tokens}
Filterable Fields
token_uuidlabelstatusvalid_for_sharegroup_uuidsharegroup_uuidsharegroup_label
Using getConsumerImageShareGroupTokens
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 getConsumerImageShareGroupTokens(args: GetConsumerImageShareGroupTokensArgs, opts?: InvokeOptions): Promise<GetConsumerImageShareGroupTokensResult>
function getConsumerImageShareGroupTokensOutput(args: GetConsumerImageShareGroupTokensOutputArgs, opts?: InvokeOptions): Output<GetConsumerImageShareGroupTokensResult>def get_consumer_image_share_group_tokens(filters: Optional[Sequence[GetConsumerImageShareGroupTokensFilter]] = None,
order: Optional[str] = None,
order_by: Optional[str] = None,
tokens: Optional[Sequence[GetConsumerImageShareGroupTokensToken]] = None,
opts: Optional[InvokeOptions] = None) -> GetConsumerImageShareGroupTokensResult
def get_consumer_image_share_group_tokens_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetConsumerImageShareGroupTokensFilterArgs]]]] = None,
order: Optional[pulumi.Input[str]] = None,
order_by: Optional[pulumi.Input[str]] = None,
tokens: Optional[pulumi.Input[Sequence[pulumi.Input[GetConsumerImageShareGroupTokensTokenArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetConsumerImageShareGroupTokensResult]func GetConsumerImageShareGroupTokens(ctx *Context, args *GetConsumerImageShareGroupTokensArgs, opts ...InvokeOption) (*GetConsumerImageShareGroupTokensResult, error)
func GetConsumerImageShareGroupTokensOutput(ctx *Context, args *GetConsumerImageShareGroupTokensOutputArgs, opts ...InvokeOption) GetConsumerImageShareGroupTokensResultOutput> Note: This function is named GetConsumerImageShareGroupTokens in the Go SDK.
public static class GetConsumerImageShareGroupTokens
{
public static Task<GetConsumerImageShareGroupTokensResult> InvokeAsync(GetConsumerImageShareGroupTokensArgs args, InvokeOptions? opts = null)
public static Output<GetConsumerImageShareGroupTokensResult> Invoke(GetConsumerImageShareGroupTokensInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetConsumerImageShareGroupTokensResult> getConsumerImageShareGroupTokens(GetConsumerImageShareGroupTokensArgs args, InvokeOptions options)
public static Output<GetConsumerImageShareGroupTokensResult> getConsumerImageShareGroupTokens(GetConsumerImageShareGroupTokensArgs args, InvokeOptions options)
fn::invoke:
function: linode:index/getConsumerImageShareGroupTokens:getConsumerImageShareGroupTokens
arguments:
# arguments dictionaryThe following arguments are supported:
- filters List<Property Map>
- order String
- order
By String - tokens List<Property Map>
getConsumerImageShareGroupTokens Result
The following output properties are available:
- id String
- filters List<Property Map>
- order String
- order
By String - tokens List<Property Map>
Supporting Types
GetConsumerImageShareGroupTokensFilter
- Name string
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- Values List<string>
- A list of values for the filter to allow. These values should all be in string form.
- Match
By string - The method to match the field by. (
exact,regex,substring; defaultexact)
- Name string
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- Values []string
- A list of values for the filter to allow. These values should all be in string form.
- Match
By string - The method to match the field by. (
exact,regex,substring; defaultexact)
- name String
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values List<String>
- A list of values for the filter to allow. These values should all be in string form.
- match
By String - The method to match the field by. (
exact,regex,substring; defaultexact)
- name string
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values string[]
- A list of values for the filter to allow. These values should all be in string form.
- match
By string - The method to match the field by. (
exact,regex,substring; defaultexact)
- name str
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values Sequence[str]
- A list of values for the filter to allow. These values should all be in string form.
- match_
by str - The method to match the field by. (
exact,regex,substring; defaultexact)
- name String
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values List<String>
- A list of values for the filter to allow. These values should all be in string form.
- match
By String - The method to match the field by. (
exact,regex,substring; defaultexact)
GetConsumerImageShareGroupTokensToken
- Created string
- When the token was created.
- Expiry string
- When the token will expire.
- Label string
- A label for the token.
- string
- The label of the Image Share Group that the token is for.
- string
- The UUID of the Image Share Group that the token is for.
- Status string
- The status of the token.
- Token
Uuid string - The UUID of the token.
- Updated string
- When the token was last updated.
- string
- The UUID of the Image Share Group for which to create a token.
- Created string
- When the token was created.
- Expiry string
- When the token will expire.
- Label string
- A label for the token.
- string
- The label of the Image Share Group that the token is for.
- string
- The UUID of the Image Share Group that the token is for.
- Status string
- The status of the token.
- Token
Uuid string - The UUID of the token.
- Updated string
- When the token was last updated.
- string
- The UUID of the Image Share Group for which to create a token.
- created String
- When the token was created.
- expiry String
- When the token will expire.
- label String
- A label for the token.
- String
- The label of the Image Share Group that the token is for.
- String
- The UUID of the Image Share Group that the token is for.
- status String
- The status of the token.
- token
Uuid String - The UUID of the token.
- updated String
- When the token was last updated.
- String
- The UUID of the Image Share Group for which to create a token.
- created string
- When the token was created.
- expiry string
- When the token will expire.
- label string
- A label for the token.
- string
- The label of the Image Share Group that the token is for.
- string
- The UUID of the Image Share Group that the token is for.
- status string
- The status of the token.
- token
Uuid string - The UUID of the token.
- updated string
- When the token was last updated.
- string
- The UUID of the Image Share Group for which to create a token.
- created str
- When the token was created.
- expiry str
- When the token will expire.
- label str
- A label for the token.
- str
- The label of the Image Share Group that the token is for.
- str
- The UUID of the Image Share Group that the token is for.
- status str
- The status of the token.
- token_
uuid str - The UUID of the token.
- updated str
- When the token was last updated.
- str
- The UUID of the Image Share Group for which to create a token.
- created String
- When the token was created.
- expiry String
- When the token will expire.
- label String
- A label for the token.
- String
- The label of the Image Share Group that the token is for.
- String
- The UUID of the Image Share Group that the token is for.
- status String
- The status of the token.
- token
Uuid String - The UUID of the token.
- updated String
- When the token was last updated.
- String
- The UUID of the Image Share Group for which to create a token.
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
linodeTerraform Provider.
