gcore.CdnLogsUploaderConfig
Explore with Pulumi AI
Represent CDN logs uploader config
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
const policy1 = new gcore.CdnLogsUploaderPolicy("policy1", {fields: [
"remote_addr",
"remote_user",
"time_local",
]});
const target1 = new gcore.CdnLogsUploaderTarget("target1", {config: {
ftp: {
hostname: "ftp.example.com",
user: "user",
password: "password",
},
}});
const config1 = new gcore.CdnLogsUploaderConfig("config1", {
policy: policy1.cdnLogsUploaderPolicyId,
target: target1.cdnLogsUploaderTargetId,
forAllResources: true,
});
import pulumi
import pulumi_gcore as gcore
policy1 = gcore.CdnLogsUploaderPolicy("policy1", fields=[
"remote_addr",
"remote_user",
"time_local",
])
target1 = gcore.CdnLogsUploaderTarget("target1", config={
"ftp": {
"hostname": "ftp.example.com",
"user": "user",
"password": "password",
},
})
config1 = gcore.CdnLogsUploaderConfig("config1",
policy=policy1.cdn_logs_uploader_policy_id,
target=target1.cdn_logs_uploader_target_id,
for_all_resources=True)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
policy1, err := gcore.NewCdnLogsUploaderPolicy(ctx, "policy1", &gcore.CdnLogsUploaderPolicyArgs{
Fields: pulumi.StringArray{
pulumi.String("remote_addr"),
pulumi.String("remote_user"),
pulumi.String("time_local"),
},
})
if err != nil {
return err
}
target1, err := gcore.NewCdnLogsUploaderTarget(ctx, "target1", &gcore.CdnLogsUploaderTargetArgs{
Config: &gcore.CdnLogsUploaderTargetConfigArgs{
Ftp: &gcore.CdnLogsUploaderTargetConfigFtpArgs{
Hostname: pulumi.String("ftp.example.com"),
User: pulumi.String("user"),
Password: pulumi.String("password"),
},
},
})
if err != nil {
return err
}
_, err = gcore.NewCdnLogsUploaderConfig(ctx, "config1", &gcore.CdnLogsUploaderConfigArgs{
Policy: policy1.CdnLogsUploaderPolicyId,
Target: target1.CdnLogsUploaderTargetId,
ForAllResources: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
var policy1 = new Gcore.CdnLogsUploaderPolicy("policy1", new()
{
Fields = new[]
{
"remote_addr",
"remote_user",
"time_local",
},
});
var target1 = new Gcore.CdnLogsUploaderTarget("target1", new()
{
Config = new Gcore.Inputs.CdnLogsUploaderTargetConfigArgs
{
Ftp = new Gcore.Inputs.CdnLogsUploaderTargetConfigFtpArgs
{
Hostname = "ftp.example.com",
User = "user",
Password = "password",
},
},
});
var config1 = new Gcore.CdnLogsUploaderConfig("config1", new()
{
Policy = policy1.CdnLogsUploaderPolicyId,
Target = target1.CdnLogsUploaderTargetId,
ForAllResources = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.CdnLogsUploaderPolicy;
import com.pulumi.gcore.CdnLogsUploaderPolicyArgs;
import com.pulumi.gcore.CdnLogsUploaderTarget;
import com.pulumi.gcore.CdnLogsUploaderTargetArgs;
import com.pulumi.gcore.inputs.CdnLogsUploaderTargetConfigArgs;
import com.pulumi.gcore.inputs.CdnLogsUploaderTargetConfigFtpArgs;
import com.pulumi.gcore.CdnLogsUploaderConfig;
import com.pulumi.gcore.CdnLogsUploaderConfigArgs;
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 policy1 = new CdnLogsUploaderPolicy("policy1", CdnLogsUploaderPolicyArgs.builder()
.fields(
"remote_addr",
"remote_user",
"time_local")
.build());
var target1 = new CdnLogsUploaderTarget("target1", CdnLogsUploaderTargetArgs.builder()
.config(CdnLogsUploaderTargetConfigArgs.builder()
.ftp(CdnLogsUploaderTargetConfigFtpArgs.builder()
.hostname("ftp.example.com")
.user("user")
.password("password")
.build())
.build())
.build());
var config1 = new CdnLogsUploaderConfig("config1", CdnLogsUploaderConfigArgs.builder()
.policy(policy1.cdnLogsUploaderPolicyId())
.target(target1.cdnLogsUploaderTargetId())
.forAllResources(true)
.build());
}
}
resources:
policy1:
type: gcore:CdnLogsUploaderPolicy
properties:
fields:
- remote_addr
- remote_user
- time_local
target1:
type: gcore:CdnLogsUploaderTarget
properties:
config:
ftp:
hostname: ftp.example.com
user: user
password: password
config1:
type: gcore:CdnLogsUploaderConfig
properties:
policy: ${policy1.cdnLogsUploaderPolicyId}
target: ${target1.cdnLogsUploaderTargetId}
forAllResources: true
Create CdnLogsUploaderConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CdnLogsUploaderConfig(name: string, args: CdnLogsUploaderConfigArgs, opts?: CustomResourceOptions);
@overload
def CdnLogsUploaderConfig(resource_name: str,
args: CdnLogsUploaderConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CdnLogsUploaderConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
policy: Optional[float] = None,
target: Optional[float] = None,
cdn_logs_uploader_config_id: Optional[str] = None,
enabled: Optional[bool] = None,
for_all_resources: Optional[bool] = None,
name: Optional[str] = None,
resources: Optional[Sequence[float]] = None)
func NewCdnLogsUploaderConfig(ctx *Context, name string, args CdnLogsUploaderConfigArgs, opts ...ResourceOption) (*CdnLogsUploaderConfig, error)
public CdnLogsUploaderConfig(string name, CdnLogsUploaderConfigArgs args, CustomResourceOptions? opts = null)
public CdnLogsUploaderConfig(String name, CdnLogsUploaderConfigArgs args)
public CdnLogsUploaderConfig(String name, CdnLogsUploaderConfigArgs args, CustomResourceOptions options)
type: gcore:CdnLogsUploaderConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CdnLogsUploaderConfigArgs
- 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 CdnLogsUploaderConfigArgs
- 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 CdnLogsUploaderConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CdnLogsUploaderConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CdnLogsUploaderConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var cdnLogsUploaderConfigResource = new Gcore.CdnLogsUploaderConfig("cdnLogsUploaderConfigResource", new()
{
Policy = 0,
Target = 0,
CdnLogsUploaderConfigId = "string",
Enabled = false,
ForAllResources = false,
Name = "string",
Resources = new[]
{
0,
},
});
example, err := gcore.NewCdnLogsUploaderConfig(ctx, "cdnLogsUploaderConfigResource", &gcore.CdnLogsUploaderConfigArgs{
Policy: pulumi.Float64(0),
Target: pulumi.Float64(0),
CdnLogsUploaderConfigId: pulumi.String("string"),
Enabled: pulumi.Bool(false),
ForAllResources: pulumi.Bool(false),
Name: pulumi.String("string"),
Resources: pulumi.Float64Array{
pulumi.Float64(0),
},
})
var cdnLogsUploaderConfigResource = new CdnLogsUploaderConfig("cdnLogsUploaderConfigResource", CdnLogsUploaderConfigArgs.builder()
.policy(0.0)
.target(0.0)
.cdnLogsUploaderConfigId("string")
.enabled(false)
.forAllResources(false)
.name("string")
.resources(0.0)
.build());
cdn_logs_uploader_config_resource = gcore.CdnLogsUploaderConfig("cdnLogsUploaderConfigResource",
policy=0,
target=0,
cdn_logs_uploader_config_id="string",
enabled=False,
for_all_resources=False,
name="string",
resources=[0])
const cdnLogsUploaderConfigResource = new gcore.CdnLogsUploaderConfig("cdnLogsUploaderConfigResource", {
policy: 0,
target: 0,
cdnLogsUploaderConfigId: "string",
enabled: false,
forAllResources: false,
name: "string",
resources: [0],
});
type: gcore:CdnLogsUploaderConfig
properties:
cdnLogsUploaderConfigId: string
enabled: false
forAllResources: false
name: string
policy: 0
resources:
- 0
target: 0
CdnLogsUploaderConfig Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CdnLogsUploaderConfig resource accepts the following input properties:
- Policy double
- ID of the policy that should be assigned to given config.
- Target double
- ID of the target to which logs should be uploaded.
- Cdn
Logs stringUploader Config Id - The ID of this resource.
- Enabled bool
- Enables or disables the config. Default value is true.
- For
All boolResources - If set to true, the config will be applied to all CDN resources. If set to false, the config will be applied to the resources specified in the resources field. Default value is false.
- Name string
- Name of the config.
- Resources List<double>
- List of resource IDs to which the config should be applied.
- Policy float64
- ID of the policy that should be assigned to given config.
- Target float64
- ID of the target to which logs should be uploaded.
- Cdn
Logs stringUploader Config Id - The ID of this resource.
- Enabled bool
- Enables or disables the config. Default value is true.
- For
All boolResources - If set to true, the config will be applied to all CDN resources. If set to false, the config will be applied to the resources specified in the resources field. Default value is false.
- Name string
- Name of the config.
- Resources []float64
- List of resource IDs to which the config should be applied.
- policy Double
- ID of the policy that should be assigned to given config.
- target Double
- ID of the target to which logs should be uploaded.
- cdn
Logs StringUploader Config Id - The ID of this resource.
- enabled Boolean
- Enables or disables the config. Default value is true.
- for
All BooleanResources - If set to true, the config will be applied to all CDN resources. If set to false, the config will be applied to the resources specified in the resources field. Default value is false.
- name String
- Name of the config.
- resources List<Double>
- List of resource IDs to which the config should be applied.
- policy number
- ID of the policy that should be assigned to given config.
- target number
- ID of the target to which logs should be uploaded.
- cdn
Logs stringUploader Config Id - The ID of this resource.
- enabled boolean
- Enables or disables the config. Default value is true.
- for
All booleanResources - If set to true, the config will be applied to all CDN resources. If set to false, the config will be applied to the resources specified in the resources field. Default value is false.
- name string
- Name of the config.
- resources number[]
- List of resource IDs to which the config should be applied.
- policy float
- ID of the policy that should be assigned to given config.
- target float
- ID of the target to which logs should be uploaded.
- cdn_
logs_ struploader_ config_ id - The ID of this resource.
- enabled bool
- Enables or disables the config. Default value is true.
- for_
all_ boolresources - If set to true, the config will be applied to all CDN resources. If set to false, the config will be applied to the resources specified in the resources field. Default value is false.
- name str
- Name of the config.
- resources Sequence[float]
- List of resource IDs to which the config should be applied.
- policy Number
- ID of the policy that should be assigned to given config.
- target Number
- ID of the target to which logs should be uploaded.
- cdn
Logs StringUploader Config Id - The ID of this resource.
- enabled Boolean
- Enables or disables the config. Default value is true.
- for
All BooleanResources - If set to true, the config will be applied to all CDN resources. If set to false, the config will be applied to the resources specified in the resources field. Default value is false.
- name String
- Name of the config.
- resources List<Number>
- List of resource IDs to which the config should be applied.
Outputs
All input properties are implicitly available as output properties. Additionally, the CdnLogsUploaderConfig 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 CdnLogsUploaderConfig Resource
Get an existing CdnLogsUploaderConfig 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?: CdnLogsUploaderConfigState, opts?: CustomResourceOptions): CdnLogsUploaderConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cdn_logs_uploader_config_id: Optional[str] = None,
enabled: Optional[bool] = None,
for_all_resources: Optional[bool] = None,
name: Optional[str] = None,
policy: Optional[float] = None,
resources: Optional[Sequence[float]] = None,
target: Optional[float] = None) -> CdnLogsUploaderConfig
func GetCdnLogsUploaderConfig(ctx *Context, name string, id IDInput, state *CdnLogsUploaderConfigState, opts ...ResourceOption) (*CdnLogsUploaderConfig, error)
public static CdnLogsUploaderConfig Get(string name, Input<string> id, CdnLogsUploaderConfigState? state, CustomResourceOptions? opts = null)
public static CdnLogsUploaderConfig get(String name, Output<String> id, CdnLogsUploaderConfigState state, CustomResourceOptions options)
resources: _: type: gcore:CdnLogsUploaderConfig get: id: ${id}
- 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.
- Cdn
Logs stringUploader Config Id - The ID of this resource.
- Enabled bool
- Enables or disables the config. Default value is true.
- For
All boolResources - If set to true, the config will be applied to all CDN resources. If set to false, the config will be applied to the resources specified in the resources field. Default value is false.
- Name string
- Name of the config.
- Policy double
- ID of the policy that should be assigned to given config.
- Resources List<double>
- List of resource IDs to which the config should be applied.
- Target double
- ID of the target to which logs should be uploaded.
- Cdn
Logs stringUploader Config Id - The ID of this resource.
- Enabled bool
- Enables or disables the config. Default value is true.
- For
All boolResources - If set to true, the config will be applied to all CDN resources. If set to false, the config will be applied to the resources specified in the resources field. Default value is false.
- Name string
- Name of the config.
- Policy float64
- ID of the policy that should be assigned to given config.
- Resources []float64
- List of resource IDs to which the config should be applied.
- Target float64
- ID of the target to which logs should be uploaded.
- cdn
Logs StringUploader Config Id - The ID of this resource.
- enabled Boolean
- Enables or disables the config. Default value is true.
- for
All BooleanResources - If set to true, the config will be applied to all CDN resources. If set to false, the config will be applied to the resources specified in the resources field. Default value is false.
- name String
- Name of the config.
- policy Double
- ID of the policy that should be assigned to given config.
- resources List<Double>
- List of resource IDs to which the config should be applied.
- target Double
- ID of the target to which logs should be uploaded.
- cdn
Logs stringUploader Config Id - The ID of this resource.
- enabled boolean
- Enables or disables the config. Default value is true.
- for
All booleanResources - If set to true, the config will be applied to all CDN resources. If set to false, the config will be applied to the resources specified in the resources field. Default value is false.
- name string
- Name of the config.
- policy number
- ID of the policy that should be assigned to given config.
- resources number[]
- List of resource IDs to which the config should be applied.
- target number
- ID of the target to which logs should be uploaded.
- cdn_
logs_ struploader_ config_ id - The ID of this resource.
- enabled bool
- Enables or disables the config. Default value is true.
- for_
all_ boolresources - If set to true, the config will be applied to all CDN resources. If set to false, the config will be applied to the resources specified in the resources field. Default value is false.
- name str
- Name of the config.
- policy float
- ID of the policy that should be assigned to given config.
- resources Sequence[float]
- List of resource IDs to which the config should be applied.
- target float
- ID of the target to which logs should be uploaded.
- cdn
Logs StringUploader Config Id - The ID of this resource.
- enabled Boolean
- Enables or disables the config. Default value is true.
- for
All BooleanResources - If set to true, the config will be applied to all CDN resources. If set to false, the config will be applied to the resources specified in the resources field. Default value is false.
- name String
- Name of the config.
- policy Number
- ID of the policy that should be assigned to given config.
- resources List<Number>
- List of resource IDs to which the config should be applied.
- target Number
- ID of the target to which logs should be uploaded.
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcore
Terraform Provider.