alicloud.apigateway.getLogConfigs
This data source provides the Api Gateway Log Configs of the current Alibaba Cloud user.
NOTE: Available in v1.185.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.ApiGateway.GetLogConfigs.Invoke(new()
{
Ids = new[]
{
"example_id",
},
});
var logType = AliCloud.ApiGateway.GetLogConfigs.Invoke(new()
{
LogType = "PROVIDER",
});
return new Dictionary<string, object?>
{
["apiGatewayLogConfigId1"] = ids.Apply(getLogConfigsResult => getLogConfigsResult.Configs[0]?.Id),
["apiGatewayLogConfigId2"] = logType.Apply(getLogConfigsResult => getLogConfigsResult.Configs[0]?.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/apigateway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := apigateway.GetLogConfigs(ctx, &apigateway.GetLogConfigsArgs{
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("apiGatewayLogConfigId1", ids.Configs[0].Id)
logType, err := apigateway.GetLogConfigs(ctx, &apigateway.GetLogConfigsArgs{
LogType: pulumi.StringRef("PROVIDER"),
}, nil)
if err != nil {
return err
}
ctx.Export("apiGatewayLogConfigId2", logType.Configs[0].Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.apigateway.ApigatewayFunctions;
import com.pulumi.alicloud.apigateway.inputs.GetLogConfigsArgs;
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 = ApigatewayFunctions.getLogConfigs(GetLogConfigsArgs.builder()
.ids("example_id")
.build());
ctx.export("apiGatewayLogConfigId1", ids.applyValue(getLogConfigsResult -> getLogConfigsResult.configs()[0].id()));
final var logType = ApigatewayFunctions.getLogConfigs(GetLogConfigsArgs.builder()
.logType("PROVIDER")
.build());
ctx.export("apiGatewayLogConfigId2", logType.applyValue(getLogConfigsResult -> getLogConfigsResult.configs()[0].id()));
}
}
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.apigateway.get_log_configs(ids=["example_id"])
pulumi.export("apiGatewayLogConfigId1", ids.configs[0].id)
log_type = alicloud.apigateway.get_log_configs(log_type="PROVIDER")
pulumi.export("apiGatewayLogConfigId2", log_type.configs[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.apigateway.getLogConfigs({
ids: ["example_id"],
});
export const apiGatewayLogConfigId1 = ids.then(ids => ids.configs?.[0]?.id);
const logType = alicloud.apigateway.getLogConfigs({
logType: "PROVIDER",
});
export const apiGatewayLogConfigId2 = logType.then(logType => logType.configs?.[0]?.id);
variables:
ids:
fn::invoke:
Function: alicloud:apigateway:getLogConfigs
Arguments:
ids:
- example_id
logType:
fn::invoke:
Function: alicloud:apigateway:getLogConfigs
Arguments:
logType: PROVIDER
outputs:
apiGatewayLogConfigId1: ${ids.configs[0].id}
apiGatewayLogConfigId2: ${logType.configs[0].id}
Using getLogConfigs
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 getLogConfigs(args: GetLogConfigsArgs, opts?: InvokeOptions): Promise<GetLogConfigsResult>
function getLogConfigsOutput(args: GetLogConfigsOutputArgs, opts?: InvokeOptions): Output<GetLogConfigsResult>
def get_log_configs(ids: Optional[Sequence[str]] = None,
log_type: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLogConfigsResult
def get_log_configs_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
log_type: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLogConfigsResult]
func GetLogConfigs(ctx *Context, args *GetLogConfigsArgs, opts ...InvokeOption) (*GetLogConfigsResult, error)
func GetLogConfigsOutput(ctx *Context, args *GetLogConfigsOutputArgs, opts ...InvokeOption) GetLogConfigsResultOutput
> Note: This function is named GetLogConfigs
in the Go SDK.
public static class GetLogConfigs
{
public static Task<GetLogConfigsResult> InvokeAsync(GetLogConfigsArgs args, InvokeOptions? opts = null)
public static Output<GetLogConfigsResult> Invoke(GetLogConfigsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetLogConfigsResult> getLogConfigs(GetLogConfigsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:apigateway/getLogConfigs:getLogConfigs
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
A list of Log Config IDs.
- Log
Type string The type the of log.
- Output
File string
- Ids []string
A list of Log Config IDs.
- Log
Type string The type the of log.
- Output
File string
- ids List<String>
A list of Log Config IDs.
- log
Type String The type the of log.
- output
File String
- ids string[]
A list of Log Config IDs.
- log
Type string The type the of log.
- output
File string
- ids Sequence[str]
A list of Log Config IDs.
- log_
type str The type the of log.
- output_
file str
- ids List<String>
A list of Log Config IDs.
- log
Type String The type the of log.
- output
File String
getLogConfigs Result
The following output properties are available:
- Configs
List<Pulumi.
Ali Cloud. Api Gateway. Outputs. Get Log Configs Config> - Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Log
Type string - Output
File string
- Configs
[]Get
Log Configs Config - Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Log
Type string - Output
File string
- configs
List<Get
Log Configs Config> - id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- log
Type String - output
File String
- configs
Get
Log Configs Config[] - id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- log
Type string - output
File string
- configs
Sequence[Get
Log Configs Config] - id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- log_
type str - output_
file str
- configs List<Property Map>
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- log
Type String - output
File String
Supporting Types
GetLogConfigsConfig
- Id string
The ID of the Log Config.
- Log
Type string The type the of log.
- Region
Id string The region ID of the Log Config.
- Sls
Log stringStore The name of the Log Store.
- Sls
Project string The name of the Project.
- Id string
The ID of the Log Config.
- Log
Type string The type the of log.
- Region
Id string The region ID of the Log Config.
- Sls
Log stringStore The name of the Log Store.
- Sls
Project string The name of the Project.
- id String
The ID of the Log Config.
- log
Type String The type the of log.
- region
Id String The region ID of the Log Config.
- sls
Log StringStore The name of the Log Store.
- sls
Project String The name of the Project.
- id string
The ID of the Log Config.
- log
Type string The type the of log.
- region
Id string The region ID of the Log Config.
- sls
Log stringStore The name of the Log Store.
- sls
Project string The name of the Project.
- id str
The ID of the Log Config.
- log_
type str The type the of log.
- region_
id str The region ID of the Log Config.
- sls_
log_ strstore The name of the Log Store.
- sls_
project str The name of the Project.
- id String
The ID of the Log Config.
- log
Type String The type the of log.
- region
Id String The region ID of the Log Config.
- sls
Log StringStore The name of the Log Store.
- sls
Project String The name of the Project.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.