aws.workspacesweb.UserAccessLoggingSettingsAssociation
Explore with Pulumi AI
Resource for managing an AWS WorkSpaces Web User Access Logging Settings Association.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.workspacesweb.Portal("example", {displayName: "example"});
const exampleStream = new aws.kinesis.Stream("example", {
name: "amazon-workspaces-web-example",
shardCount: 1,
});
const exampleUserAccessLoggingSettings = new aws.workspacesweb.UserAccessLoggingSettings("example", {kinesisStreamArn: exampleStream.arn});
const exampleUserAccessLoggingSettingsAssociation = new aws.workspacesweb.UserAccessLoggingSettingsAssociation("example", {
userAccessLoggingSettingsArn: exampleUserAccessLoggingSettings.userAccessLoggingSettingsArn,
portalArn: example.portalArn,
});
import pulumi
import pulumi_aws as aws
example = aws.workspacesweb.Portal("example", display_name="example")
example_stream = aws.kinesis.Stream("example",
name="amazon-workspaces-web-example",
shard_count=1)
example_user_access_logging_settings = aws.workspacesweb.UserAccessLoggingSettings("example", kinesis_stream_arn=example_stream.arn)
example_user_access_logging_settings_association = aws.workspacesweb.UserAccessLoggingSettingsAssociation("example",
user_access_logging_settings_arn=example_user_access_logging_settings.user_access_logging_settings_arn,
portal_arn=example.portal_arn)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/kinesis"
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/workspacesweb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := workspacesweb.NewPortal(ctx, "example", &workspacesweb.PortalArgs{
DisplayName: pulumi.String("example"),
})
if err != nil {
return err
}
exampleStream, err := kinesis.NewStream(ctx, "example", &kinesis.StreamArgs{
Name: pulumi.String("amazon-workspaces-web-example"),
ShardCount: pulumi.Int(1),
})
if err != nil {
return err
}
exampleUserAccessLoggingSettings, err := workspacesweb.NewUserAccessLoggingSettings(ctx, "example", &workspacesweb.UserAccessLoggingSettingsArgs{
KinesisStreamArn: exampleStream.Arn,
})
if err != nil {
return err
}
_, err = workspacesweb.NewUserAccessLoggingSettingsAssociation(ctx, "example", &workspacesweb.UserAccessLoggingSettingsAssociationArgs{
UserAccessLoggingSettingsArn: exampleUserAccessLoggingSettings.UserAccessLoggingSettingsArn,
PortalArn: example.PortalArn,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.WorkSpacesWeb.Portal("example", new()
{
DisplayName = "example",
});
var exampleStream = new Aws.Kinesis.Stream("example", new()
{
Name = "amazon-workspaces-web-example",
ShardCount = 1,
});
var exampleUserAccessLoggingSettings = new Aws.WorkSpacesWeb.UserAccessLoggingSettings("example", new()
{
KinesisStreamArn = exampleStream.Arn,
});
var exampleUserAccessLoggingSettingsAssociation = new Aws.WorkSpacesWeb.UserAccessLoggingSettingsAssociation("example", new()
{
UserAccessLoggingSettingsArn = exampleUserAccessLoggingSettings.UserAccessLoggingSettingsArn,
PortalArn = example.PortalArn,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.workspacesweb.Portal;
import com.pulumi.aws.workspacesweb.PortalArgs;
import com.pulumi.aws.kinesis.Stream;
import com.pulumi.aws.kinesis.StreamArgs;
import com.pulumi.aws.workspacesweb.UserAccessLoggingSettings;
import com.pulumi.aws.workspacesweb.UserAccessLoggingSettingsArgs;
import com.pulumi.aws.workspacesweb.UserAccessLoggingSettingsAssociation;
import com.pulumi.aws.workspacesweb.UserAccessLoggingSettingsAssociationArgs;
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 Portal("example", PortalArgs.builder()
.displayName("example")
.build());
var exampleStream = new Stream("exampleStream", StreamArgs.builder()
.name("amazon-workspaces-web-example")
.shardCount(1)
.build());
var exampleUserAccessLoggingSettings = new UserAccessLoggingSettings("exampleUserAccessLoggingSettings", UserAccessLoggingSettingsArgs.builder()
.kinesisStreamArn(exampleStream.arn())
.build());
var exampleUserAccessLoggingSettingsAssociation = new UserAccessLoggingSettingsAssociation("exampleUserAccessLoggingSettingsAssociation", UserAccessLoggingSettingsAssociationArgs.builder()
.userAccessLoggingSettingsArn(exampleUserAccessLoggingSettings.userAccessLoggingSettingsArn())
.portalArn(example.portalArn())
.build());
}
}
resources:
example:
type: aws:workspacesweb:Portal
properties:
displayName: example
exampleStream:
type: aws:kinesis:Stream
name: example
properties:
name: amazon-workspaces-web-example
shardCount: 1
exampleUserAccessLoggingSettings:
type: aws:workspacesweb:UserAccessLoggingSettings
name: example
properties:
kinesisStreamArn: ${exampleStream.arn}
exampleUserAccessLoggingSettingsAssociation:
type: aws:workspacesweb:UserAccessLoggingSettingsAssociation
name: example
properties:
userAccessLoggingSettingsArn: ${exampleUserAccessLoggingSettings.userAccessLoggingSettingsArn}
portalArn: ${example.portalArn}
Create UserAccessLoggingSettingsAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UserAccessLoggingSettingsAssociation(name: string, args: UserAccessLoggingSettingsAssociationArgs, opts?: CustomResourceOptions);
@overload
def UserAccessLoggingSettingsAssociation(resource_name: str,
args: UserAccessLoggingSettingsAssociationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def UserAccessLoggingSettingsAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
portal_arn: Optional[str] = None,
user_access_logging_settings_arn: Optional[str] = None,
region: Optional[str] = None)
func NewUserAccessLoggingSettingsAssociation(ctx *Context, name string, args UserAccessLoggingSettingsAssociationArgs, opts ...ResourceOption) (*UserAccessLoggingSettingsAssociation, error)
public UserAccessLoggingSettingsAssociation(string name, UserAccessLoggingSettingsAssociationArgs args, CustomResourceOptions? opts = null)
public UserAccessLoggingSettingsAssociation(String name, UserAccessLoggingSettingsAssociationArgs args)
public UserAccessLoggingSettingsAssociation(String name, UserAccessLoggingSettingsAssociationArgs args, CustomResourceOptions options)
type: aws:workspacesweb:UserAccessLoggingSettingsAssociation
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 UserAccessLoggingSettingsAssociationArgs
- 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 UserAccessLoggingSettingsAssociationArgs
- 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 UserAccessLoggingSettingsAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserAccessLoggingSettingsAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserAccessLoggingSettingsAssociationArgs
- 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 userAccessLoggingSettingsAssociationResource = new Aws.WorkSpacesWeb.UserAccessLoggingSettingsAssociation("userAccessLoggingSettingsAssociationResource", new()
{
PortalArn = "string",
UserAccessLoggingSettingsArn = "string",
Region = "string",
});
example, err := workspacesweb.NewUserAccessLoggingSettingsAssociation(ctx, "userAccessLoggingSettingsAssociationResource", &workspacesweb.UserAccessLoggingSettingsAssociationArgs{
PortalArn: pulumi.String("string"),
UserAccessLoggingSettingsArn: pulumi.String("string"),
Region: pulumi.String("string"),
})
var userAccessLoggingSettingsAssociationResource = new UserAccessLoggingSettingsAssociation("userAccessLoggingSettingsAssociationResource", UserAccessLoggingSettingsAssociationArgs.builder()
.portalArn("string")
.userAccessLoggingSettingsArn("string")
.region("string")
.build());
user_access_logging_settings_association_resource = aws.workspacesweb.UserAccessLoggingSettingsAssociation("userAccessLoggingSettingsAssociationResource",
portal_arn="string",
user_access_logging_settings_arn="string",
region="string")
const userAccessLoggingSettingsAssociationResource = new aws.workspacesweb.UserAccessLoggingSettingsAssociation("userAccessLoggingSettingsAssociationResource", {
portalArn: "string",
userAccessLoggingSettingsArn: "string",
region: "string",
});
type: aws:workspacesweb:UserAccessLoggingSettingsAssociation
properties:
portalArn: string
region: string
userAccessLoggingSettingsArn: string
UserAccessLoggingSettingsAssociation 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 UserAccessLoggingSettingsAssociation resource accepts the following input properties:
- Portal
Arn string ARN of the portal to associate with the user access logging settings. Forces replacement if changed.
The following arguments are optional:
- User
Access stringLogging Settings Arn - ARN of the user access logging settings to associate with the portal. Forces replacement if changed.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Portal
Arn string ARN of the portal to associate with the user access logging settings. Forces replacement if changed.
The following arguments are optional:
- User
Access stringLogging Settings Arn - ARN of the user access logging settings to associate with the portal. Forces replacement if changed.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- portal
Arn String ARN of the portal to associate with the user access logging settings. Forces replacement if changed.
The following arguments are optional:
- user
Access StringLogging Settings Arn - ARN of the user access logging settings to associate with the portal. Forces replacement if changed.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- portal
Arn string ARN of the portal to associate with the user access logging settings. Forces replacement if changed.
The following arguments are optional:
- user
Access stringLogging Settings Arn - ARN of the user access logging settings to associate with the portal. Forces replacement if changed.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- portal_
arn str ARN of the portal to associate with the user access logging settings. Forces replacement if changed.
The following arguments are optional:
- user_
access_ strlogging_ settings_ arn - ARN of the user access logging settings to associate with the portal. Forces replacement if changed.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- portal
Arn String ARN of the portal to associate with the user access logging settings. Forces replacement if changed.
The following arguments are optional:
- user
Access StringLogging Settings Arn - ARN of the user access logging settings to associate with the portal. Forces replacement if changed.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
Outputs
All input properties are implicitly available as output properties. Additionally, the UserAccessLoggingSettingsAssociation 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 UserAccessLoggingSettingsAssociation Resource
Get an existing UserAccessLoggingSettingsAssociation 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?: UserAccessLoggingSettingsAssociationState, opts?: CustomResourceOptions): UserAccessLoggingSettingsAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
portal_arn: Optional[str] = None,
region: Optional[str] = None,
user_access_logging_settings_arn: Optional[str] = None) -> UserAccessLoggingSettingsAssociation
func GetUserAccessLoggingSettingsAssociation(ctx *Context, name string, id IDInput, state *UserAccessLoggingSettingsAssociationState, opts ...ResourceOption) (*UserAccessLoggingSettingsAssociation, error)
public static UserAccessLoggingSettingsAssociation Get(string name, Input<string> id, UserAccessLoggingSettingsAssociationState? state, CustomResourceOptions? opts = null)
public static UserAccessLoggingSettingsAssociation get(String name, Output<String> id, UserAccessLoggingSettingsAssociationState state, CustomResourceOptions options)
resources: _: type: aws:workspacesweb:UserAccessLoggingSettingsAssociation 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.
- Portal
Arn string ARN of the portal to associate with the user access logging settings. Forces replacement if changed.
The following arguments are optional:
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- User
Access stringLogging Settings Arn - ARN of the user access logging settings to associate with the portal. Forces replacement if changed.
- Portal
Arn string ARN of the portal to associate with the user access logging settings. Forces replacement if changed.
The following arguments are optional:
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- User
Access stringLogging Settings Arn - ARN of the user access logging settings to associate with the portal. Forces replacement if changed.
- portal
Arn String ARN of the portal to associate with the user access logging settings. Forces replacement if changed.
The following arguments are optional:
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- user
Access StringLogging Settings Arn - ARN of the user access logging settings to associate with the portal. Forces replacement if changed.
- portal
Arn string ARN of the portal to associate with the user access logging settings. Forces replacement if changed.
The following arguments are optional:
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- user
Access stringLogging Settings Arn - ARN of the user access logging settings to associate with the portal. Forces replacement if changed.
- portal_
arn str ARN of the portal to associate with the user access logging settings. Forces replacement if changed.
The following arguments are optional:
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- user_
access_ strlogging_ settings_ arn - ARN of the user access logging settings to associate with the portal. Forces replacement if changed.
- portal
Arn String ARN of the portal to associate with the user access logging settings. Forces replacement if changed.
The following arguments are optional:
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- user
Access StringLogging Settings Arn - ARN of the user access logging settings to associate with the portal. Forces replacement if changed.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.