Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.ecs.getInstanceKeywords
Explore with Pulumi AI
Operation to query the reserved keywords of an ApsaraDB RDS instance. The reserved keywords cannot be used for the usernames of accounts or the names of databases.
NOTE: Available in v1.196.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const resources = alicloud.ecs.getInstanceKeywords({
key: "account",
outputFile: "./classes.txt",
});
export const accountKeywords = resources.then(resources => resources.keywords?.[0]);
import pulumi
import pulumi_alicloud as alicloud
resources = alicloud.ecs.get_instance_keywords(key="account",
output_file="./classes.txt")
pulumi.export("accountKeywords", resources.keywords[0])
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 {
resources, err := ecs.GetInstanceKeywords(ctx, &ecs.GetInstanceKeywordsArgs{
Key: "account",
OutputFile: pulumi.StringRef("./classes.txt"),
}, nil)
if err != nil {
return err
}
ctx.Export("accountKeywords", resources.Keywords[0])
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var resources = AliCloud.Ecs.GetInstanceKeywords.Invoke(new()
{
Key = "account",
OutputFile = "./classes.txt",
});
return new Dictionary<string, object?>
{
["accountKeywords"] = resources.Apply(getInstanceKeywordsResult => getInstanceKeywordsResult.Keywords[0]),
};
});
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.GetInstanceKeywordsArgs;
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 resources = EcsFunctions.getInstanceKeywords(GetInstanceKeywordsArgs.builder()
.key("account")
.outputFile("./classes.txt")
.build());
ctx.export("accountKeywords", resources.applyValue(getInstanceKeywordsResult -> getInstanceKeywordsResult.keywords()[0]));
}
}
variables:
resources:
fn::invoke:
Function: alicloud:ecs:getInstanceKeywords
Arguments:
key: account
outputFile: ./classes.txt
outputs:
accountKeywords: ${resources.keywords[0]}
Using getInstanceKeywords
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 getInstanceKeywords(args: GetInstanceKeywordsArgs, opts?: InvokeOptions): Promise<GetInstanceKeywordsResult>
function getInstanceKeywordsOutput(args: GetInstanceKeywordsOutputArgs, opts?: InvokeOptions): Output<GetInstanceKeywordsResult>
def get_instance_keywords(key: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInstanceKeywordsResult
def get_instance_keywords_output(key: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstanceKeywordsResult]
func GetInstanceKeywords(ctx *Context, args *GetInstanceKeywordsArgs, opts ...InvokeOption) (*GetInstanceKeywordsResult, error)
func GetInstanceKeywordsOutput(ctx *Context, args *GetInstanceKeywordsOutputArgs, opts ...InvokeOption) GetInstanceKeywordsResultOutput
> Note: This function is named GetInstanceKeywords
in the Go SDK.
public static class GetInstanceKeywords
{
public static Task<GetInstanceKeywordsResult> InvokeAsync(GetInstanceKeywordsArgs args, InvokeOptions? opts = null)
public static Output<GetInstanceKeywordsResult> Invoke(GetInstanceKeywordsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstanceKeywordsResult> getInstanceKeywords(GetInstanceKeywordsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:ecs/getInstanceKeywords:getInstanceKeywords
arguments:
# arguments dictionary
The following arguments are supported:
- Key string
- The type of reserved keyword to query. Valid values:
account
,database
. - Output
File string - File name where to save data source results (after running
pulumi up
).
- Key string
- The type of reserved keyword to query. Valid values:
account
,database
. - Output
File string - File name where to save data source results (after running
pulumi up
).
- key String
- The type of reserved keyword to query. Valid values:
account
,database
. - output
File String - File name where to save data source results (after running
pulumi up
).
- key string
- The type of reserved keyword to query. Valid values:
account
,database
. - output
File string - File name where to save data source results (after running
pulumi up
).
- key str
- The type of reserved keyword to query. Valid values:
account
,database
. - output_
file str - File name where to save data source results (after running
pulumi up
).
- key String
- The type of reserved keyword to query. Valid values:
account
,database
. - output
File String - File name where to save data source results (after running
pulumi up
).
getInstanceKeywords Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of keywords.
- Key string
- Keywords List<string>
- An array that consists of reserved keywords.
- Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of keywords.
- Key string
- Keywords []string
- An array that consists of reserved keywords.
- Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of keywords.
- key String
- keywords List<String>
- An array that consists of reserved keywords.
- output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of keywords.
- key string
- keywords string[]
- An array that consists of reserved keywords.
- output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of keywords.
- key str
- keywords Sequence[str]
- An array that consists of reserved keywords.
- output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of keywords.
- key String
- keywords List<String>
- An array that consists of reserved keywords.
- output
File String
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.