com.pulumi.gcp.networkservices.kotlin.EdgeCacheOrigin.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-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.gcp.networkservices.kotlin
import com.pulumi.core.Output
import com.pulumi.gcp.networkservices.kotlin.outputs.EdgeCacheOriginAwsV4Authentication
import com.pulumi.gcp.networkservices.kotlin.outputs.EdgeCacheOriginOriginOverrideAction
import com.pulumi.gcp.networkservices.kotlin.outputs.EdgeCacheOriginOriginRedirect
import com.pulumi.gcp.networkservices.kotlin.outputs.EdgeCacheOriginTimeout
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.gcp.networkservices.kotlin.outputs.EdgeCacheOriginAwsV4Authentication.Companion.toKotlin as edgeCacheOriginAwsV4AuthenticationToKotlin
import com.pulumi.gcp.networkservices.kotlin.outputs.EdgeCacheOriginOriginOverrideAction.Companion.toKotlin as edgeCacheOriginOriginOverrideActionToKotlin
import com.pulumi.gcp.networkservices.kotlin.outputs.EdgeCacheOriginOriginRedirect.Companion.toKotlin as edgeCacheOriginOriginRedirectToKotlin
import com.pulumi.gcp.networkservices.kotlin.outputs.EdgeCacheOriginTimeout.Companion.toKotlin as edgeCacheOriginTimeoutToKotlin
/**
* Builder for [EdgeCacheOrigin].
*/
@PulumiTagMarker
public class EdgeCacheOriginResourceBuilder internal constructor() {
public var name: String? = null
public var args: EdgeCacheOriginArgs = EdgeCacheOriginArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend EdgeCacheOriginArgsBuilder.() -> Unit) {
val builder = EdgeCacheOriginArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): EdgeCacheOrigin {
val builtJavaResource = com.pulumi.gcp.networkservices.EdgeCacheOrigin(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return EdgeCacheOrigin(builtJavaResource)
}
}
/**
* EdgeCacheOrigin represents a HTTP-reachable backend for an EdgeCacheService.
* To get more information about EdgeCacheOrigin, see:
* * [API documentation](https://cloud.google.com/media-cdn/docs/reference/rest/v1/projects.locations.edgeCacheOrigins)
* ## Example Usage
* ### Network Services Edge Cache Origin Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const _default = new gcp.networkservices.EdgeCacheOrigin("default", {
* name: "my-origin",
* originAddress: "gs://media-edge-default",
* description: "The default bucket for media edge test",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default = gcp.networkservices.EdgeCacheOrigin("default",
* name="my-origin",
* origin_address="gs://media-edge-default",
* description="The default bucket for media edge test")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var @default = new Gcp.NetworkServices.EdgeCacheOrigin("default", new()
* {
* Name = "my-origin",
* OriginAddress = "gs://media-edge-default",
* Description = "The default bucket for media edge test",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := networkservices.NewEdgeCacheOrigin(ctx, "default", &networkservices.EdgeCacheOriginArgs{
* Name: pulumi.String("my-origin"),
* OriginAddress: pulumi.String("gs://media-edge-default"),
* Description: pulumi.String("The default bucket for media edge test"),
* })
* 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.gcp.networkservices.EdgeCacheOrigin;
* import com.pulumi.gcp.networkservices.EdgeCacheOriginArgs;
* 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 EdgeCacheOrigin("default", EdgeCacheOriginArgs.builder()
* .name("my-origin")
* .originAddress("gs://media-edge-default")
* .description("The default bucket for media edge test")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: gcp:networkservices:EdgeCacheOrigin
* properties:
* name: my-origin
* originAddress: gs://media-edge-default
* description: The default bucket for media edge test
* ```
*
* ### Network Services Edge Cache Origin Advanced
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const fallback = new gcp.networkservices.EdgeCacheOrigin("fallback", {
* name: "my-fallback",
* originAddress: "fallback.example.com",
* description: "The default bucket for media edge test",
* maxAttempts: 3,
* protocol: "HTTP",
* port: 80,
* retryConditions: [
* "CONNECT_FAILURE",
* "NOT_FOUND",
* "HTTP_5XX",
* "FORBIDDEN",
* ],
* timeout: {
* connectTimeout: "10s",
* maxAttemptsTimeout: "20s",
* responseTimeout: "60s",
* readTimeout: "5s",
* },
* originOverrideAction: {
* urlRewrite: {
* hostRewrite: "example.com",
* },
* headerAction: {
* requestHeadersToAdds: [{
* headerName: "x-header",
* headerValue: "value",
* replace: true,
* }],
* },
* },
* originRedirect: {
* redirectConditions: [
* "MOVED_PERMANENTLY",
* "FOUND",
* "SEE_OTHER",
* "TEMPORARY_REDIRECT",
* "PERMANENT_REDIRECT",
* ],
* },
* });
* const _default = new gcp.networkservices.EdgeCacheOrigin("default", {
* name: "my-origin",
* originAddress: "gs://media-edge-default",
* failoverOrigin: fallback.id,
* description: "The default bucket for media edge test",
* maxAttempts: 2,
* labels: {
* a: "b",
* },
* timeout: {
* connectTimeout: "10s",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* fallback = gcp.networkservices.EdgeCacheOrigin("fallback",
* name="my-fallback",
* origin_address="fallback.example.com",
* description="The default bucket for media edge test",
* max_attempts=3,
* protocol="HTTP",
* port=80,
* retry_conditions=[
* "CONNECT_FAILURE",
* "NOT_FOUND",
* "HTTP_5XX",
* "FORBIDDEN",
* ],
* timeout=gcp.networkservices.EdgeCacheOriginTimeoutArgs(
* connect_timeout="10s",
* max_attempts_timeout="20s",
* response_timeout="60s",
* read_timeout="5s",
* ),
* origin_override_action=gcp.networkservices.EdgeCacheOriginOriginOverrideActionArgs(
* url_rewrite=gcp.networkservices.EdgeCacheOriginOriginOverrideActionUrlRewriteArgs(
* host_rewrite="example.com",
* ),
* header_action=gcp.networkservices.EdgeCacheOriginOriginOverrideActionHeaderActionArgs(
* request_headers_to_adds=[gcp.networkservices.EdgeCacheOriginOriginOverrideActionHeaderActionRequestHeadersToAddArgs(
* header_name="x-header",
* header_value="value",
* replace=True,
* )],
* ),
* ),
* origin_redirect=gcp.networkservices.EdgeCacheOriginOriginRedirectArgs(
* redirect_conditions=[
* "MOVED_PERMANENTLY",
* "FOUND",
* "SEE_OTHER",
* "TEMPORARY_REDIRECT",
* "PERMANENT_REDIRECT",
* ],
* ))
* default = gcp.networkservices.EdgeCacheOrigin("default",
* name="my-origin",
* origin_address="gs://media-edge-default",
* failover_origin=fallback.id,
* description="The default bucket for media edge test",
* max_attempts=2,
* labels={
* "a": "b",
* },
* timeout=gcp.networkservices.EdgeCacheOriginTimeoutArgs(
* connect_timeout="10s",
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var fallback = new Gcp.NetworkServices.EdgeCacheOrigin("fallback", new()
* {
* Name = "my-fallback",
* OriginAddress = "fallback.example.com",
* Description = "The default bucket for media edge test",
* MaxAttempts = 3,
* Protocol = "HTTP",
* Port = 80,
* RetryConditions = new[]
* {
* "CONNECT_FAILURE",
* "NOT_FOUND",
* "HTTP_5XX",
* "FORBIDDEN",
* },
* Timeout = new Gcp.NetworkServices.Inputs.EdgeCacheOriginTimeoutArgs
* {
* ConnectTimeout = "10s",
* MaxAttemptsTimeout = "20s",
* ResponseTimeout = "60s",
* ReadTimeout = "5s",
* },
* OriginOverrideAction = new Gcp.NetworkServices.Inputs.EdgeCacheOriginOriginOverrideActionArgs
* {
* UrlRewrite = new Gcp.NetworkServices.Inputs.EdgeCacheOriginOriginOverrideActionUrlRewriteArgs
* {
* HostRewrite = "example.com",
* },
* HeaderAction = new Gcp.NetworkServices.Inputs.EdgeCacheOriginOriginOverrideActionHeaderActionArgs
* {
* RequestHeadersToAdds = new[]
* {
* new Gcp.NetworkServices.Inputs.EdgeCacheOriginOriginOverrideActionHeaderActionRequestHeadersToAddArgs
* {
* HeaderName = "x-header",
* HeaderValue = "value",
* Replace = true,
* },
* },
* },
* },
* OriginRedirect = new Gcp.NetworkServices.Inputs.EdgeCacheOriginOriginRedirectArgs
* {
* RedirectConditions = new[]
* {
* "MOVED_PERMANENTLY",
* "FOUND",
* "SEE_OTHER",
* "TEMPORARY_REDIRECT",
* "PERMANENT_REDIRECT",
* },
* },
* });
* var @default = new Gcp.NetworkServices.EdgeCacheOrigin("default", new()
* {
* Name = "my-origin",
* OriginAddress = "gs://media-edge-default",
* FailoverOrigin = fallback.Id,
* Description = "The default bucket for media edge test",
* MaxAttempts = 2,
* Labels =
* {
* { "a", "b" },
* },
* Timeout = new Gcp.NetworkServices.Inputs.EdgeCacheOriginTimeoutArgs
* {
* ConnectTimeout = "10s",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* fallback, err := networkservices.NewEdgeCacheOrigin(ctx, "fallback", &networkservices.EdgeCacheOriginArgs{
* Name: pulumi.String("my-fallback"),
* OriginAddress: pulumi.String("fallback.example.com"),
* Description: pulumi.String("The default bucket for media edge test"),
* MaxAttempts: pulumi.Int(3),
* Protocol: pulumi.String("HTTP"),
* Port: pulumi.Int(80),
* RetryConditions: pulumi.StringArray{
* pulumi.String("CONNECT_FAILURE"),
* pulumi.String("NOT_FOUND"),
* pulumi.String("HTTP_5XX"),
* pulumi.String("FORBIDDEN"),
* },
* Timeout: &networkservices.EdgeCacheOriginTimeoutArgs{
* ConnectTimeout: pulumi.String("10s"),
* MaxAttemptsTimeout: pulumi.String("20s"),
* ResponseTimeout: pulumi.String("60s"),
* ReadTimeout: pulumi.String("5s"),
* },
* OriginOverrideAction: &networkservices.EdgeCacheOriginOriginOverrideActionArgs{
* UrlRewrite: &networkservices.EdgeCacheOriginOriginOverrideActionUrlRewriteArgs{
* HostRewrite: pulumi.String("example.com"),
* },
* HeaderAction: &networkservices.EdgeCacheOriginOriginOverrideActionHeaderActionArgs{
* RequestHeadersToAdds: networkservices.EdgeCacheOriginOriginOverrideActionHeaderActionRequestHeadersToAddArray{
* &networkservices.EdgeCacheOriginOriginOverrideActionHeaderActionRequestHeadersToAddArgs{
* HeaderName: pulumi.String("x-header"),
* HeaderValue: pulumi.String("value"),
* Replace: pulumi.Bool(true),
* },
* },
* },
* },
* OriginRedirect: &networkservices.EdgeCacheOriginOriginRedirectArgs{
* RedirectConditions: pulumi.StringArray{
* pulumi.String("MOVED_PERMANENTLY"),
* pulumi.String("FOUND"),
* pulumi.String("SEE_OTHER"),
* pulumi.String("TEMPORARY_REDIRECT"),
* pulumi.String("PERMANENT_REDIRECT"),
* },
* },
* })
* if err != nil {
* return err
* }
* _, err = networkservices.NewEdgeCacheOrigin(ctx, "default", &networkservices.EdgeCacheOriginArgs{
* Name: pulumi.String("my-origin"),
* OriginAddress: pulumi.String("gs://media-edge-default"),
* FailoverOrigin: fallback.ID(),
* Description: pulumi.String("The default bucket for media edge test"),
* MaxAttempts: pulumi.Int(2),
* Labels: pulumi.StringMap{
* "a": pulumi.String("b"),
* },
* Timeout: &networkservices.EdgeCacheOriginTimeoutArgs{
* ConnectTimeout: pulumi.String("10s"),
* },
* })
* 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.gcp.networkservices.EdgeCacheOrigin;
* import com.pulumi.gcp.networkservices.EdgeCacheOriginArgs;
* import com.pulumi.gcp.networkservices.inputs.EdgeCacheOriginTimeoutArgs;
* import com.pulumi.gcp.networkservices.inputs.EdgeCacheOriginOriginOverrideActionArgs;
* import com.pulumi.gcp.networkservices.inputs.EdgeCacheOriginOriginOverrideActionUrlRewriteArgs;
* import com.pulumi.gcp.networkservices.inputs.EdgeCacheOriginOriginOverrideActionHeaderActionArgs;
* import com.pulumi.gcp.networkservices.inputs.EdgeCacheOriginOriginRedirectArgs;
* 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 fallback = new EdgeCacheOrigin("fallback", EdgeCacheOriginArgs.builder()
* .name("my-fallback")
* .originAddress("fallback.example.com")
* .description("The default bucket for media edge test")
* .maxAttempts(3)
* .protocol("HTTP")
* .port(80)
* .retryConditions(
* "CONNECT_FAILURE",
* "NOT_FOUND",
* "HTTP_5XX",
* "FORBIDDEN")
* .timeout(EdgeCacheOriginTimeoutArgs.builder()
* .connectTimeout("10s")
* .maxAttemptsTimeout("20s")
* .responseTimeout("60s")
* .readTimeout("5s")
* .build())
* .originOverrideAction(EdgeCacheOriginOriginOverrideActionArgs.builder()
* .urlRewrite(EdgeCacheOriginOriginOverrideActionUrlRewriteArgs.builder()
* .hostRewrite("example.com")
* .build())
* .headerAction(EdgeCacheOriginOriginOverrideActionHeaderActionArgs.builder()
* .requestHeadersToAdds(EdgeCacheOriginOriginOverrideActionHeaderActionRequestHeadersToAddArgs.builder()
* .headerName("x-header")
* .headerValue("value")
* .replace(true)
* .build())
* .build())
* .build())
* .originRedirect(EdgeCacheOriginOriginRedirectArgs.builder()
* .redirectConditions(
* "MOVED_PERMANENTLY",
* "FOUND",
* "SEE_OTHER",
* "TEMPORARY_REDIRECT",
* "PERMANENT_REDIRECT")
* .build())
* .build());
* var default_ = new EdgeCacheOrigin("default", EdgeCacheOriginArgs.builder()
* .name("my-origin")
* .originAddress("gs://media-edge-default")
* .failoverOrigin(fallback.id())
* .description("The default bucket for media edge test")
* .maxAttempts(2)
* .labels(Map.of("a", "b"))
* .timeout(EdgeCacheOriginTimeoutArgs.builder()
* .connectTimeout("10s")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* fallback:
* type: gcp:networkservices:EdgeCacheOrigin
* properties:
* name: my-fallback
* originAddress: fallback.example.com
* description: The default bucket for media edge test
* maxAttempts: 3
* protocol: HTTP
* port: 80
* retryConditions:
* - CONNECT_FAILURE
* - NOT_FOUND
* - HTTP_5XX
* - FORBIDDEN
* timeout:
* connectTimeout: 10s
* maxAttemptsTimeout: 20s
* responseTimeout: 60s
* readTimeout: 5s
* originOverrideAction:
* urlRewrite:
* hostRewrite: example.com
* headerAction:
* requestHeadersToAdds:
* - headerName: x-header
* headerValue: value
* replace: true
* originRedirect:
* redirectConditions:
* - MOVED_PERMANENTLY
* - FOUND
* - SEE_OTHER
* - TEMPORARY_REDIRECT
* - PERMANENT_REDIRECT
* default:
* type: gcp:networkservices:EdgeCacheOrigin
* properties:
* name: my-origin
* originAddress: gs://media-edge-default
* failoverOrigin: ${fallback.id}
* description: The default bucket for media edge test
* maxAttempts: 2
* labels:
* a: b
* timeout:
* connectTimeout: 10s
* ```
*
* ### Network Services Edge Cache Origin V4auth
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const secret_basic = new gcp.secretmanager.Secret("secret-basic", {
* secretId: "secret-name",
* replication: {
* auto: {},
* },
* });
* const secret_version_basic = new gcp.secretmanager.SecretVersion("secret-version-basic", {
* secret: secret_basic.id,
* secretData: "secret-data",
* });
* const _default = new gcp.networkservices.EdgeCacheOrigin("default", {
* name: "my-origin",
* originAddress: "gs://media-edge-default",
* description: "The default bucket for V4 authentication",
* awsV4Authentication: {
* accessKeyId: "ACCESSKEYID",
* secretAccessKeyVersion: secret_version_basic.id,
* originRegion: "auto",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* secret_basic = gcp.secretmanager.Secret("secret-basic",
* secret_id="secret-name",
* replication=gcp.secretmanager.SecretReplicationArgs(
* auto=gcp.secretmanager.SecretReplicationAutoArgs(),
* ))
* secret_version_basic = gcp.secretmanager.SecretVersion("secret-version-basic",
* secret=secret_basic.id,
* secret_data="secret-data")
* default = gcp.networkservices.EdgeCacheOrigin("default",
* name="my-origin",
* origin_address="gs://media-edge-default",
* description="The default bucket for V4 authentication",
* aws_v4_authentication=gcp.networkservices.EdgeCacheOriginAwsV4AuthenticationArgs(
* access_key_id="ACCESSKEYID",
* secret_access_key_version=secret_version_basic.id,
* origin_region="auto",
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var secret_basic = new Gcp.SecretManager.Secret("secret-basic", new()
* {
* SecretId = "secret-name",
* Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
* {
* Auto = null,
* },
* });
* var secret_version_basic = new Gcp.SecretManager.SecretVersion("secret-version-basic", new()
* {
* Secret = secret_basic.Id,
* SecretData = "secret-data",
* });
* var @default = new Gcp.NetworkServices.EdgeCacheOrigin("default", new()
* {
* Name = "my-origin",
* OriginAddress = "gs://media-edge-default",
* Description = "The default bucket for V4 authentication",
* AwsV4Authentication = new Gcp.NetworkServices.Inputs.EdgeCacheOriginAwsV4AuthenticationArgs
* {
* AccessKeyId = "ACCESSKEYID",
* SecretAccessKeyVersion = secret_version_basic.Id,
* OriginRegion = "auto",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/secretmanager"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := secretmanager.NewSecret(ctx, "secret-basic", &secretmanager.SecretArgs{
* SecretId: pulumi.String("secret-name"),
* Replication: &secretmanager.SecretReplicationArgs{
* Auto: nil,
* },
* })
* if err != nil {
* return err
* }
* _, err = secretmanager.NewSecretVersion(ctx, "secret-version-basic", &secretmanager.SecretVersionArgs{
* Secret: secret_basic.ID(),
* SecretData: pulumi.String("secret-data"),
* })
* if err != nil {
* return err
* }
* _, err = networkservices.NewEdgeCacheOrigin(ctx, "default", &networkservices.EdgeCacheOriginArgs{
* Name: pulumi.String("my-origin"),
* OriginAddress: pulumi.String("gs://media-edge-default"),
* Description: pulumi.String("The default bucket for V4 authentication"),
* AwsV4Authentication: &networkservices.EdgeCacheOriginAwsV4AuthenticationArgs{
* AccessKeyId: pulumi.String("ACCESSKEYID"),
* SecretAccessKeyVersion: secret_version_basic.ID(),
* OriginRegion: pulumi.String("auto"),
* },
* })
* 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.gcp.secretmanager.Secret;
* import com.pulumi.gcp.secretmanager.SecretArgs;
* import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
* import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
* import com.pulumi.gcp.secretmanager.SecretVersion;
* import com.pulumi.gcp.secretmanager.SecretVersionArgs;
* import com.pulumi.gcp.networkservices.EdgeCacheOrigin;
* import com.pulumi.gcp.networkservices.EdgeCacheOriginArgs;
* import com.pulumi.gcp.networkservices.inputs.EdgeCacheOriginAwsV4AuthenticationArgs;
* 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 secret_basic = new Secret("secret-basic", SecretArgs.builder()
* .secretId("secret-name")
* .replication(SecretReplicationArgs.builder()
* .auto()
* .build())
* .build());
* var secret_version_basic = new SecretVersion("secret-version-basic", SecretVersionArgs.builder()
* .secret(secret_basic.id())
* .secretData("secret-data")
* .build());
* var default_ = new EdgeCacheOrigin("default", EdgeCacheOriginArgs.builder()
* .name("my-origin")
* .originAddress("gs://media-edge-default")
* .description("The default bucket for V4 authentication")
* .awsV4Authentication(EdgeCacheOriginAwsV4AuthenticationArgs.builder()
* .accessKeyId("ACCESSKEYID")
* .secretAccessKeyVersion(secret_version_basic.id())
* .originRegion("auto")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* secret-basic:
* type: gcp:secretmanager:Secret
* properties:
* secretId: secret-name
* replication:
* auto: {}
* secret-version-basic:
* type: gcp:secretmanager:SecretVersion
* properties:
* secret: ${["secret-basic"].id}
* secretData: secret-data
* default:
* type: gcp:networkservices:EdgeCacheOrigin
* properties:
* name: my-origin
* originAddress: gs://media-edge-default
* description: The default bucket for V4 authentication
* awsV4Authentication:
* accessKeyId: ACCESSKEYID
* secretAccessKeyVersion: ${["secret-version-basic"].id}
* originRegion: auto
* ```
*
* ## Import
* EdgeCacheOrigin can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/global/edgeCacheOrigins/{{name}}`
* * `{{project}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, EdgeCacheOrigin can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:networkservices/edgeCacheOrigin:EdgeCacheOrigin default projects/{{project}}/locations/global/edgeCacheOrigins/{{name}}
* ```
* ```sh
* $ pulumi import gcp:networkservices/edgeCacheOrigin:EdgeCacheOrigin default {{project}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:networkservices/edgeCacheOrigin:EdgeCacheOrigin default {{name}}
* ```
*/
public class EdgeCacheOrigin internal constructor(
override val javaResource: com.pulumi.gcp.networkservices.EdgeCacheOrigin,
) : KotlinCustomResource(javaResource, EdgeCacheOriginMapper) {
/**
* Enable AWS Signature Version 4 origin authentication.
* Structure is documented below.
*/
public val awsV4Authentication: Output?
get() = javaResource.awsV4Authentication().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> edgeCacheOriginAwsV4AuthenticationToKotlin(args0) })
}).orElse(null)
})
/**
* A human-readable description of the resource.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
public val effectiveLabels: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy