alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.apigateway.LogConfig

Provides a Api Gateway Log Config resource.

For information about Api Gateway Log Config and how to use it, see What is Log Config.

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 @default = new AliCloud.ApiGateway.LogConfig("default", new()
    {
        LogType = "PROVIDER",
        SlsLogStore = "example_value",
        SlsProject = "example_value",
    });

});
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 {
		_, err := apigateway.NewLogConfig(ctx, "default", &apigateway.LogConfigArgs{
			LogType:     pulumi.String("PROVIDER"),
			SlsLogStore: pulumi.String("example_value"),
			SlsProject:  pulumi.String("example_value"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.apigateway.LogConfig;
import com.pulumi.alicloud.apigateway.LogConfigArgs;
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) {
        var default_ = new LogConfig("default", LogConfigArgs.builder()        
            .logType("PROVIDER")
            .slsLogStore("example_value")
            .slsProject("example_value")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.apigateway.LogConfig("default",
    log_type="PROVIDER",
    sls_log_store="example_value",
    sls_project="example_value")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = new alicloud.apigateway.LogConfig("default", {
    logType: "PROVIDER",
    slsLogStore: "example_value",
    slsProject: "example_value",
});
resources:
  default:
    type: alicloud:apigateway:LogConfig
    properties:
      logType: PROVIDER
      slsLogStore: example_value
      slsProject: example_value

Create LogConfig Resource

new LogConfig(name: string, args: LogConfigArgs, opts?: CustomResourceOptions);
@overload
def LogConfig(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              log_type: Optional[str] = None,
              sls_log_store: Optional[str] = None,
              sls_project: Optional[str] = None)
@overload
def LogConfig(resource_name: str,
              args: LogConfigArgs,
              opts: Optional[ResourceOptions] = None)
func NewLogConfig(ctx *Context, name string, args LogConfigArgs, opts ...ResourceOption) (*LogConfig, error)
public LogConfig(string name, LogConfigArgs args, CustomResourceOptions? opts = null)
public LogConfig(String name, LogConfigArgs args)
public LogConfig(String name, LogConfigArgs args, CustomResourceOptions options)
type: alicloud:apigateway:LogConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args LogConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args LogConfigArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args LogConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LogConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args LogConfigArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

LogConfig Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The LogConfig resource accepts the following input properties:

LogType string

The type the of log. Valid values: PROVIDER.

SlsLogStore string

The name of the Log Store.

SlsProject string

The name of the Project.

LogType string

The type the of log. Valid values: PROVIDER.

SlsLogStore string

The name of the Log Store.

SlsProject string

The name of the Project.

logType String

The type the of log. Valid values: PROVIDER.

slsLogStore String

The name of the Log Store.

slsProject String

The name of the Project.

logType string

The type the of log. Valid values: PROVIDER.

slsLogStore string

The name of the Log Store.

slsProject string

The name of the Project.

log_type str

The type the of log. Valid values: PROVIDER.

sls_log_store str

The name of the Log Store.

sls_project str

The name of the Project.

logType String

The type the of log. Valid values: PROVIDER.

slsLogStore String

The name of the Log Store.

slsProject String

The name of the Project.

Outputs

All input properties are implicitly available as output properties. Additionally, the LogConfig resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing LogConfig Resource

Get an existing LogConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: LogConfigState, opts?: CustomResourceOptions): LogConfig
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        log_type: Optional[str] = None,
        sls_log_store: Optional[str] = None,
        sls_project: Optional[str] = None) -> LogConfig
func GetLogConfig(ctx *Context, name string, id IDInput, state *LogConfigState, opts ...ResourceOption) (*LogConfig, error)
public static LogConfig Get(string name, Input<string> id, LogConfigState? state, CustomResourceOptions? opts = null)
public static LogConfig get(String name, Output<String> id, LogConfigState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
LogType string

The type the of log. Valid values: PROVIDER.

SlsLogStore string

The name of the Log Store.

SlsProject string

The name of the Project.

LogType string

The type the of log. Valid values: PROVIDER.

SlsLogStore string

The name of the Log Store.

SlsProject string

The name of the Project.

logType String

The type the of log. Valid values: PROVIDER.

slsLogStore String

The name of the Log Store.

slsProject String

The name of the Project.

logType string

The type the of log. Valid values: PROVIDER.

slsLogStore string

The name of the Log Store.

slsProject string

The name of the Project.

log_type str

The type the of log. Valid values: PROVIDER.

sls_log_store str

The name of the Log Store.

sls_project str

The name of the Project.

logType String

The type the of log. Valid values: PROVIDER.

slsLogStore String

The name of the Log Store.

slsProject String

The name of the Project.

Import

Api Gateway Log Config can be imported using the id, e.g.

 $ pulumi import alicloud:apigateway/logConfig:LogConfig example <log_type>

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.