com.pulumi.alicloud.log.kotlin.ProjectArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-alicloud-kotlin Show documentation
Show all versions of pulumi-alicloud-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.alicloud.log.kotlin
import com.pulumi.alicloud.log.ProjectArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Deprecated
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides a SLS Project resource.
* For information about SLS Project and how to use it, see [What is Project](https://www.alibabacloud.com/help/en/sls/developer-reference/api-createproject).
* > **NOTE:** Available since v1.9.5.
* ## Example Usage
* Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as alicloud from "@pulumi/alicloud";
* import * as random from "@pulumi/random";
* const _default = new random.index.Integer("default", {
* max: 99999,
* min: 10000,
* });
* const example = new alicloud.log.Project("example", {
* projectName: `terraform-example-${_default.result}`,
* description: "terraform-example",
* tags: {
* Created: "TF",
* For: "example",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_alicloud as alicloud
* import pulumi_random as random
* default = random.index.Integer("default",
* max=99999,
* min=10000)
* example = alicloud.log.Project("example",
* project_name=f"terraform-example-{default['result']}",
* description="terraform-example",
* tags={
* "Created": "TF",
* "For": "example",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AliCloud = Pulumi.AliCloud;
* using Random = Pulumi.Random;
* return await Deployment.RunAsync(() =>
* {
* var @default = new Random.Index.Integer("default", new()
* {
* Max = 99999,
* Min = 10000,
* });
* var example = new AliCloud.Log.Project("example", new()
* {
* ProjectName = $"terraform-example-{@default.Result}",
* Description = "terraform-example",
* Tags =
* {
* { "Created", "TF" },
* { "For", "example" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
* "github.com/pulumi/pulumi-random/sdk/v4/go/random"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
* Max: 99999,
* Min: 10000,
* })
* if err != nil {
* return err
* }
* _, err = log.NewProject(ctx, "example", &log.ProjectArgs{
* ProjectName: pulumi.Sprintf("terraform-example-%v", _default.Result),
* Description: pulumi.String("terraform-example"),
* Tags: pulumi.StringMap{
* "Created": pulumi.String("TF"),
* "For": pulumi.String("example"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.random.integer;
* import com.pulumi.random.IntegerArgs;
* import com.pulumi.alicloud.log.Project;
* import com.pulumi.alicloud.log.ProjectArgs;
* 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 Integer("default", IntegerArgs.builder()
* .max(99999)
* .min(10000)
* .build());
* var example = new Project("example", ProjectArgs.builder()
* .projectName(String.format("terraform-example-%s", default_.result()))
* .description("terraform-example")
* .tags(Map.ofEntries(
* Map.entry("Created", "TF"),
* Map.entry("For", "example")
* ))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: random:integer
* properties:
* max: 99999
* min: 10000
* example:
* type: alicloud:log:Project
* properties:
* projectName: terraform-example-${default.result}
* description: terraform-example
* tags:
* Created: TF
* For: example
* ```
*
* Project With Policy Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as alicloud from "@pulumi/alicloud";
* import * as random from "@pulumi/random";
* const _default = new random.index.Integer("default", {
* max: 99999,
* min: 10000,
* });
* const examplePolicy = new alicloud.log.Project("example_policy", {
* projectName: `terraform-example-${_default.result}`,
* description: "terraform-example",
* policy: `{
* "Statement": [
* {
* "Action": [
* "log:PostLogStoreLogs"
* ],
* "Condition": {
* "StringNotLike": {
* "acs:SourceVpc": [
* "vpc-*"
* ]
* }
* },
* "Effect": "Deny",
* "Resource": "acs:log:*:*:project/tf-log/*"
* }
* ],
* "Version": "1"
* }
* `,
* });
* ```
* ```python
* import pulumi
* import pulumi_alicloud as alicloud
* import pulumi_random as random
* default = random.index.Integer("default",
* max=99999,
* min=10000)
* example_policy = alicloud.log.Project("example_policy",
* project_name=f"terraform-example-{default['result']}",
* description="terraform-example",
* policy="""{
* "Statement": [
* {
* "Action": [
* "log:PostLogStoreLogs"
* ],
* "Condition": {
* "StringNotLike": {
* "acs:SourceVpc": [
* "vpc-*"
* ]
* }
* },
* "Effect": "Deny",
* "Resource": "acs:log:*:*:project/tf-log/*"
* }
* ],
* "Version": "1"
* }
* """)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AliCloud = Pulumi.AliCloud;
* using Random = Pulumi.Random;
* return await Deployment.RunAsync(() =>
* {
* var @default = new Random.Index.Integer("default", new()
* {
* Max = 99999,
* Min = 10000,
* });
* var examplePolicy = new AliCloud.Log.Project("example_policy", new()
* {
* ProjectName = $"terraform-example-{@default.Result}",
* Description = "terraform-example",
* Policy = @"{
* ""Statement"": [
* {
* ""Action"": [
* ""log:PostLogStoreLogs""
* ],
* ""Condition"": {
* ""StringNotLike"": {
* ""acs:SourceVpc"": [
* ""vpc-*""
* ]
* }
* },
* ""Effect"": ""Deny"",
* ""Resource"": ""acs:log:*:*:project/tf-log/*""
* }
* ],
* ""Version"": ""1""
* }
* ",
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
* "github.com/pulumi/pulumi-random/sdk/v4/go/random"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
* Max: 99999,
* Min: 10000,
* })
* if err != nil {
* return err
* }
* _, err = log.NewProject(ctx, "example_policy", &log.ProjectArgs{
* ProjectName: pulumi.Sprintf("terraform-example-%v", _default.Result),
* Description: pulumi.String("terraform-example"),
* Policy: pulumi.String(`{
* "Statement": [
* {
* "Action": [
* "log:PostLogStoreLogs"
* ],
* "Condition": {
* "StringNotLike": {
* "acs:SourceVpc": [
* "vpc-*"
* ]
* }
* },
* "Effect": "Deny",
* "Resource": "acs:log:*:*:project/tf-log/*"
* }
* ],
* "Version": "1"
* }
* `),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.random.integer;
* import com.pulumi.random.IntegerArgs;
* import com.pulumi.alicloud.log.Project;
* import com.pulumi.alicloud.log.ProjectArgs;
* 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 Integer("default", IntegerArgs.builder()
* .max(99999)
* .min(10000)
* .build());
* var examplePolicy = new Project("examplePolicy", ProjectArgs.builder()
* .projectName(String.format("terraform-example-%s", default_.result()))
* .description("terraform-example")
* .policy("""
* {
* "Statement": [
* {
* "Action": [
* "log:PostLogStoreLogs"
* ],
* "Condition": {
* "StringNotLike": {
* "acs:SourceVpc": [
* "vpc-*"
* ]
* }
* },
* "Effect": "Deny",
* "Resource": "acs:log:*:*:project/tf-log/*"
* }
* ],
* "Version": "1"
* }
* """)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: random:integer
* properties:
* max: 99999
* min: 10000
* examplePolicy:
* type: alicloud:log:Project
* name: example_policy
* properties:
* projectName: terraform-example-${default.result}
* description: terraform-example
* policy: |
* {
* "Statement": [
* {
* "Action": [
* "log:PostLogStoreLogs"
* ],
* "Condition": {
* "StringNotLike": {
* "acs:SourceVpc": [
* "vpc-*"
* ]
* }
* },
* "Effect": "Deny",
* "Resource": "acs:log:*:*:project/tf-log/*"
* }
* ],
* "Version": "1"
* }
* ```
*
* ## Module Support
* You can use the existing sls module
* to create SLS project, store and store index one-click, like ECS instances.
* ## Import
* SLS Project can be imported using the id, e.g.
* ```sh
* $ pulumi import alicloud:log/project:Project example
* ```
* @property description Description.
* @property name . Field 'name' has been deprecated from provider version 1.223.0. New field 'project_name' instead.
* @property policy Log project policy, used to set a policy for a project.
* @property projectName The name of the log project. It is the only in one Alicloud account. The project name is globally unique in Alibaba Cloud and cannot be modified after it is created. The naming rules are as follows:
* - The project name must be globally unique.
* - The name can contain only lowercase letters, digits, and hyphens (-).
* - It must start and end with a lowercase letter or number.
* - The value contains 3 to 63 characters.
* @property resourceGroupId The ID of the resource group.
* @property tags Tag.
* The following arguments will be discarded. Please use new fields as soon as possible:
* */*/*/*/*/*/
*/
public data class ProjectArgs(
public val description: Output? = null,
@Deprecated(
message = """
Field 'name' has been deprecated since provider version 1.223.0. New field 'project_name' instead.
""",
)
public val name: Output? = null,
public val policy: Output? = null,
public val projectName: Output? = null,
public val resourceGroupId: Output? = null,
public val tags: Output