1. Packages
  2. AWS
  3. API Docs
  4. vpclattice
  5. AccessLogSubscription
AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi

aws.vpclattice.AccessLogSubscription

Explore with Pulumi AI

Resource for managing an AWS VPC Lattice Service Network or Service Access log subscription.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.vpclattice.AccessLogSubscription("example", {
    resourceIdentifier: exampleAwsVpclatticeServiceNetwork.id,
    destinationArn: bucket.arn,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.vpclattice.AccessLogSubscription("example",
    resource_identifier=example_aws_vpclattice_service_network["id"],
    destination_arn=bucket["arn"])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpclattice"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vpclattice.NewAccessLogSubscription(ctx, "example", &vpclattice.AccessLogSubscriptionArgs{
			ResourceIdentifier: pulumi.Any(exampleAwsVpclatticeServiceNetwork.Id),
			DestinationArn:     pulumi.Any(bucket.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.VpcLattice.AccessLogSubscription("example", new()
    {
        ResourceIdentifier = exampleAwsVpclatticeServiceNetwork.Id,
        DestinationArn = bucket.Arn,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.vpclattice.AccessLogSubscription;
import com.pulumi.aws.vpclattice.AccessLogSubscriptionArgs;
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 example = new AccessLogSubscription("example", AccessLogSubscriptionArgs.builder()
            .resourceIdentifier(exampleAwsVpclatticeServiceNetwork.id())
            .destinationArn(bucket.arn())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:vpclattice:AccessLogSubscription
    properties:
      resourceIdentifier: ${exampleAwsVpclatticeServiceNetwork.id}
      destinationArn: ${bucket.arn}
Copy

Create AccessLogSubscription Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new AccessLogSubscription(name: string, args: AccessLogSubscriptionArgs, opts?: CustomResourceOptions);
@overload
def AccessLogSubscription(resource_name: str,
                          args: AccessLogSubscriptionArgs,
                          opts: Optional[ResourceOptions] = None)

@overload
def AccessLogSubscription(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          destination_arn: Optional[str] = None,
                          resource_identifier: Optional[str] = None,
                          service_network_log_type: Optional[str] = None,
                          tags: Optional[Mapping[str, str]] = None)
func NewAccessLogSubscription(ctx *Context, name string, args AccessLogSubscriptionArgs, opts ...ResourceOption) (*AccessLogSubscription, error)
public AccessLogSubscription(string name, AccessLogSubscriptionArgs args, CustomResourceOptions? opts = null)
public AccessLogSubscription(String name, AccessLogSubscriptionArgs args)
public AccessLogSubscription(String name, AccessLogSubscriptionArgs args, CustomResourceOptions options)
type: aws:vpclattice:AccessLogSubscription
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AccessLogSubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AccessLogSubscriptionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AccessLogSubscriptionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AccessLogSubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AccessLogSubscriptionArgs
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 accessLogSubscriptionResource = new Aws.VpcLattice.AccessLogSubscription("accessLogSubscriptionResource", new()
{
    DestinationArn = "string",
    ResourceIdentifier = "string",
    ServiceNetworkLogType = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := vpclattice.NewAccessLogSubscription(ctx, "accessLogSubscriptionResource", &vpclattice.AccessLogSubscriptionArgs{
	DestinationArn:        pulumi.String("string"),
	ResourceIdentifier:    pulumi.String("string"),
	ServiceNetworkLogType: pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var accessLogSubscriptionResource = new AccessLogSubscription("accessLogSubscriptionResource", AccessLogSubscriptionArgs.builder()
    .destinationArn("string")
    .resourceIdentifier("string")
    .serviceNetworkLogType("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
access_log_subscription_resource = aws.vpclattice.AccessLogSubscription("accessLogSubscriptionResource",
    destination_arn="string",
    resource_identifier="string",
    service_network_log_type="string",
    tags={
        "string": "string",
    })
Copy
const accessLogSubscriptionResource = new aws.vpclattice.AccessLogSubscription("accessLogSubscriptionResource", {
    destinationArn: "string",
    resourceIdentifier: "string",
    serviceNetworkLogType: "string",
    tags: {
        string: "string",
    },
});
Copy
type: aws:vpclattice:AccessLogSubscription
properties:
    destinationArn: string
    resourceIdentifier: string
    serviceNetworkLogType: string
    tags:
        string: string
Copy

AccessLogSubscription 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 AccessLogSubscription resource accepts the following input properties:

DestinationArn
This property is required.
Changes to this property will trigger replacement.
string
Amazon Resource Name (ARN) of the log destination.
ResourceIdentifier
This property is required.
Changes to this property will trigger replacement.
string

The ID or Amazon Resource Identifier (ARN) of the service network or service. You must use the ARN if the resources specified in the operation are in different accounts.

The following arguments are optional:

ServiceNetworkLogType Changes to this property will trigger replacement. string
Type of log that monitors your Amazon VPC Lattice service networks. Valid values are: SERVICE, RESOURCE. Defaults to SERVICE.
Tags Dictionary<string, string>
DestinationArn
This property is required.
Changes to this property will trigger replacement.
string
Amazon Resource Name (ARN) of the log destination.
ResourceIdentifier
This property is required.
Changes to this property will trigger replacement.
string

The ID or Amazon Resource Identifier (ARN) of the service network or service. You must use the ARN if the resources specified in the operation are in different accounts.

The following arguments are optional:

ServiceNetworkLogType Changes to this property will trigger replacement. string
Type of log that monitors your Amazon VPC Lattice service networks. Valid values are: SERVICE, RESOURCE. Defaults to SERVICE.
Tags map[string]string
destinationArn
This property is required.
Changes to this property will trigger replacement.
String
Amazon Resource Name (ARN) of the log destination.
resourceIdentifier
This property is required.
Changes to this property will trigger replacement.
String

The ID or Amazon Resource Identifier (ARN) of the service network or service. You must use the ARN if the resources specified in the operation are in different accounts.

The following arguments are optional:

serviceNetworkLogType Changes to this property will trigger replacement. String
Type of log that monitors your Amazon VPC Lattice service networks. Valid values are: SERVICE, RESOURCE. Defaults to SERVICE.
tags Map<String,String>
destinationArn
This property is required.
Changes to this property will trigger replacement.
string
Amazon Resource Name (ARN) of the log destination.
resourceIdentifier
This property is required.
Changes to this property will trigger replacement.
string

The ID or Amazon Resource Identifier (ARN) of the service network or service. You must use the ARN if the resources specified in the operation are in different accounts.

The following arguments are optional:

serviceNetworkLogType Changes to this property will trigger replacement. string
Type of log that monitors your Amazon VPC Lattice service networks. Valid values are: SERVICE, RESOURCE. Defaults to SERVICE.
tags {[key: string]: string}
destination_arn
This property is required.
Changes to this property will trigger replacement.
str
Amazon Resource Name (ARN) of the log destination.
resource_identifier
This property is required.
Changes to this property will trigger replacement.
str

The ID or Amazon Resource Identifier (ARN) of the service network or service. You must use the ARN if the resources specified in the operation are in different accounts.

The following arguments are optional:

service_network_log_type Changes to this property will trigger replacement. str
Type of log that monitors your Amazon VPC Lattice service networks. Valid values are: SERVICE, RESOURCE. Defaults to SERVICE.
tags Mapping[str, str]
destinationArn
This property is required.
Changes to this property will trigger replacement.
String
Amazon Resource Name (ARN) of the log destination.
resourceIdentifier
This property is required.
Changes to this property will trigger replacement.
String

The ID or Amazon Resource Identifier (ARN) of the service network or service. You must use the ARN if the resources specified in the operation are in different accounts.

The following arguments are optional:

serviceNetworkLogType Changes to this property will trigger replacement. String
Type of log that monitors your Amazon VPC Lattice service networks. Valid values are: SERVICE, RESOURCE. Defaults to SERVICE.
tags Map<String>

Outputs

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

Arn string
Amazon Resource Name (ARN) of the access log subscription.
Id string
The provider-assigned unique ID for this managed resource.
ResourceArn string
Amazon Resource Name (ARN) of the service network or service.
TagsAll Dictionary<string, string>

Deprecated: Please use tags instead.

Arn string
Amazon Resource Name (ARN) of the access log subscription.
Id string
The provider-assigned unique ID for this managed resource.
ResourceArn string
Amazon Resource Name (ARN) of the service network or service.
TagsAll map[string]string

Deprecated: Please use tags instead.

arn String
Amazon Resource Name (ARN) of the access log subscription.
id String
The provider-assigned unique ID for this managed resource.
resourceArn String
Amazon Resource Name (ARN) of the service network or service.
tagsAll Map<String,String>

Deprecated: Please use tags instead.

arn string
Amazon Resource Name (ARN) of the access log subscription.
id string
The provider-assigned unique ID for this managed resource.
resourceArn string
Amazon Resource Name (ARN) of the service network or service.
tagsAll {[key: string]: string}

Deprecated: Please use tags instead.

arn str
Amazon Resource Name (ARN) of the access log subscription.
id str
The provider-assigned unique ID for this managed resource.
resource_arn str
Amazon Resource Name (ARN) of the service network or service.
tags_all Mapping[str, str]

Deprecated: Please use tags instead.

arn String
Amazon Resource Name (ARN) of the access log subscription.
id String
The provider-assigned unique ID for this managed resource.
resourceArn String
Amazon Resource Name (ARN) of the service network or service.
tagsAll Map<String>

Deprecated: Please use tags instead.

Look up Existing AccessLogSubscription Resource

Get an existing AccessLogSubscription 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?: AccessLogSubscriptionState, opts?: CustomResourceOptions): AccessLogSubscription
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        destination_arn: Optional[str] = None,
        resource_arn: Optional[str] = None,
        resource_identifier: Optional[str] = None,
        service_network_log_type: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> AccessLogSubscription
func GetAccessLogSubscription(ctx *Context, name string, id IDInput, state *AccessLogSubscriptionState, opts ...ResourceOption) (*AccessLogSubscription, error)
public static AccessLogSubscription Get(string name, Input<string> id, AccessLogSubscriptionState? state, CustomResourceOptions? opts = null)
public static AccessLogSubscription get(String name, Output<String> id, AccessLogSubscriptionState state, CustomResourceOptions options)
resources:  _:    type: aws:vpclattice:AccessLogSubscription    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Arn string
Amazon Resource Name (ARN) of the access log subscription.
DestinationArn Changes to this property will trigger replacement. string
Amazon Resource Name (ARN) of the log destination.
ResourceArn string
Amazon Resource Name (ARN) of the service network or service.
ResourceIdentifier Changes to this property will trigger replacement. string

The ID or Amazon Resource Identifier (ARN) of the service network or service. You must use the ARN if the resources specified in the operation are in different accounts.

The following arguments are optional:

ServiceNetworkLogType Changes to this property will trigger replacement. string
Type of log that monitors your Amazon VPC Lattice service networks. Valid values are: SERVICE, RESOURCE. Defaults to SERVICE.
Tags Dictionary<string, string>
TagsAll Dictionary<string, string>

Deprecated: Please use tags instead.

Arn string
Amazon Resource Name (ARN) of the access log subscription.
DestinationArn Changes to this property will trigger replacement. string
Amazon Resource Name (ARN) of the log destination.
ResourceArn string
Amazon Resource Name (ARN) of the service network or service.
ResourceIdentifier Changes to this property will trigger replacement. string

The ID or Amazon Resource Identifier (ARN) of the service network or service. You must use the ARN if the resources specified in the operation are in different accounts.

The following arguments are optional:

ServiceNetworkLogType Changes to this property will trigger replacement. string
Type of log that monitors your Amazon VPC Lattice service networks. Valid values are: SERVICE, RESOURCE. Defaults to SERVICE.
Tags map[string]string
TagsAll map[string]string

Deprecated: Please use tags instead.

arn String
Amazon Resource Name (ARN) of the access log subscription.
destinationArn Changes to this property will trigger replacement. String
Amazon Resource Name (ARN) of the log destination.
resourceArn String
Amazon Resource Name (ARN) of the service network or service.
resourceIdentifier Changes to this property will trigger replacement. String

The ID or Amazon Resource Identifier (ARN) of the service network or service. You must use the ARN if the resources specified in the operation are in different accounts.

The following arguments are optional:

serviceNetworkLogType Changes to this property will trigger replacement. String
Type of log that monitors your Amazon VPC Lattice service networks. Valid values are: SERVICE, RESOURCE. Defaults to SERVICE.
tags Map<String,String>
tagsAll Map<String,String>

Deprecated: Please use tags instead.

arn string
Amazon Resource Name (ARN) of the access log subscription.
destinationArn Changes to this property will trigger replacement. string
Amazon Resource Name (ARN) of the log destination.
resourceArn string
Amazon Resource Name (ARN) of the service network or service.
resourceIdentifier Changes to this property will trigger replacement. string

The ID or Amazon Resource Identifier (ARN) of the service network or service. You must use the ARN if the resources specified in the operation are in different accounts.

The following arguments are optional:

serviceNetworkLogType Changes to this property will trigger replacement. string
Type of log that monitors your Amazon VPC Lattice service networks. Valid values are: SERVICE, RESOURCE. Defaults to SERVICE.
tags {[key: string]: string}
tagsAll {[key: string]: string}

Deprecated: Please use tags instead.

arn str
Amazon Resource Name (ARN) of the access log subscription.
destination_arn Changes to this property will trigger replacement. str
Amazon Resource Name (ARN) of the log destination.
resource_arn str
Amazon Resource Name (ARN) of the service network or service.
resource_identifier Changes to this property will trigger replacement. str

The ID or Amazon Resource Identifier (ARN) of the service network or service. You must use the ARN if the resources specified in the operation are in different accounts.

The following arguments are optional:

service_network_log_type Changes to this property will trigger replacement. str
Type of log that monitors your Amazon VPC Lattice service networks. Valid values are: SERVICE, RESOURCE. Defaults to SERVICE.
tags Mapping[str, str]
tags_all Mapping[str, str]

Deprecated: Please use tags instead.

arn String
Amazon Resource Name (ARN) of the access log subscription.
destinationArn Changes to this property will trigger replacement. String
Amazon Resource Name (ARN) of the log destination.
resourceArn String
Amazon Resource Name (ARN) of the service network or service.
resourceIdentifier Changes to this property will trigger replacement. String

The ID or Amazon Resource Identifier (ARN) of the service network or service. You must use the ARN if the resources specified in the operation are in different accounts.

The following arguments are optional:

serviceNetworkLogType Changes to this property will trigger replacement. String
Type of log that monitors your Amazon VPC Lattice service networks. Valid values are: SERVICE, RESOURCE. Defaults to SERVICE.
tags Map<String>
tagsAll Map<String>

Deprecated: Please use tags instead.

Import

Using pulumi import, import VPC Lattice Access Log Subscription using the access log subscription ID. For example:

$ pulumi import aws:vpclattice/accessLogSubscription:AccessLogSubscription example rft-8012925589
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.