LogProfile

Manages a Log Profile. A Log Profile configures how Activity Logs are exported.

NOTE: It’s only possible to configure one Log Profile per Subscription. If you are trying to create more than one Log Profile, an error with StatusCode=409 will occur.

Create a LogProfile Resource

def LogProfile(resource_name, opts=None, categories=None, locations=None, name=None, retention_policy=None, servicebus_rule_id=None, storage_account_id=None, __props__=None);
func NewLogProfile(ctx *Context, name string, args LogProfileArgs, opts ...ResourceOption) (*LogProfile, error)
public LogProfile(string name, LogProfileArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args LogProfileArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args LogProfileArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LogProfileArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

LogProfile Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The LogProfile resource accepts the following input properties:

Categories List<string>

List of categories of the logs.

Locations List<string>

List of regions for which Activity Log events are stored or streamed.

RetentionPolicy LogProfileRetentionPolicyArgs

A retention_policy block as documented below. A retention policy for how long Activity Logs are retained in the storage account.

Name string

The name of the Log Profile. Changing this forces a new resource to be created.

ServicebusRuleId string

The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to. At least one of storage_account_id or servicebus_rule_id must be set.

StorageAccountId string

The resource ID of the storage account in which the Activity Log is stored. At least one of storage_account_id or servicebus_rule_id must be set.

Categories []string

List of categories of the logs.

Locations []string

List of regions for which Activity Log events are stored or streamed.

RetentionPolicy LogProfileRetentionPolicy

A retention_policy block as documented below. A retention policy for how long Activity Logs are retained in the storage account.

Name string

The name of the Log Profile. Changing this forces a new resource to be created.

ServicebusRuleId string

The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to. At least one of storage_account_id or servicebus_rule_id must be set.

StorageAccountId string

The resource ID of the storage account in which the Activity Log is stored. At least one of storage_account_id or servicebus_rule_id must be set.

categories string[]

List of categories of the logs.

locations string[]

List of regions for which Activity Log events are stored or streamed.

retentionPolicy LogProfileRetentionPolicy

A retention_policy block as documented below. A retention policy for how long Activity Logs are retained in the storage account.

name string

The name of the Log Profile. Changing this forces a new resource to be created.

servicebusRuleId string

The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to. At least one of storage_account_id or servicebus_rule_id must be set.

storageAccountId string

The resource ID of the storage account in which the Activity Log is stored. At least one of storage_account_id or servicebus_rule_id must be set.

categories List[str]

List of categories of the logs.

locations List[str]

List of regions for which Activity Log events are stored or streamed.

retention_policy Dict[LogProfileRetentionPolicy]

A retention_policy block as documented below. A retention policy for how long Activity Logs are retained in the storage account.

name str

The name of the Log Profile. Changing this forces a new resource to be created.

servicebus_rule_id str

The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to. At least one of storage_account_id or servicebus_rule_id must be set.

storage_account_id str

The resource ID of the storage account in which the Activity Log is stored. At least one of storage_account_id or servicebus_rule_id must be set.

Outputs

All input properties are implicitly available as output properties. Additionally, the LogProfile 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing LogProfile Resource

Get an existing LogProfile 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?: LogProfileState, opts?: CustomResourceOptions): LogProfile
static get(resource_name, id, opts=None, categories=None, locations=None, name=None, retention_policy=None, servicebus_rule_id=None, storage_account_id=None, __props__=None);
func GetLogProfile(ctx *Context, name string, id IDInput, state *LogProfileState, opts ...ResourceOption) (*LogProfile, error)
public static LogProfile Get(string name, Input<string> id, LogProfileState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Categories List<string>

List of categories of the logs.

Locations List<string>

List of regions for which Activity Log events are stored or streamed.

Name string

The name of the Log Profile. Changing this forces a new resource to be created.

RetentionPolicy LogProfileRetentionPolicyArgs

A retention_policy block as documented below. A retention policy for how long Activity Logs are retained in the storage account.

ServicebusRuleId string

The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to. At least one of storage_account_id or servicebus_rule_id must be set.

StorageAccountId string

The resource ID of the storage account in which the Activity Log is stored. At least one of storage_account_id or servicebus_rule_id must be set.

Categories []string

List of categories of the logs.

Locations []string

List of regions for which Activity Log events are stored or streamed.

Name string

The name of the Log Profile. Changing this forces a new resource to be created.

RetentionPolicy LogProfileRetentionPolicy

A retention_policy block as documented below. A retention policy for how long Activity Logs are retained in the storage account.

ServicebusRuleId string

The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to. At least one of storage_account_id or servicebus_rule_id must be set.

StorageAccountId string

The resource ID of the storage account in which the Activity Log is stored. At least one of storage_account_id or servicebus_rule_id must be set.

categories string[]

List of categories of the logs.

locations string[]

List of regions for which Activity Log events are stored or streamed.

name string

The name of the Log Profile. Changing this forces a new resource to be created.

retentionPolicy LogProfileRetentionPolicy

A retention_policy block as documented below. A retention policy for how long Activity Logs are retained in the storage account.

servicebusRuleId string

The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to. At least one of storage_account_id or servicebus_rule_id must be set.

storageAccountId string

The resource ID of the storage account in which the Activity Log is stored. At least one of storage_account_id or servicebus_rule_id must be set.

categories List[str]

List of categories of the logs.

locations List[str]

List of regions for which Activity Log events are stored or streamed.

name str

The name of the Log Profile. Changing this forces a new resource to be created.

retention_policy Dict[LogProfileRetentionPolicy]

A retention_policy block as documented below. A retention policy for how long Activity Logs are retained in the storage account.

servicebus_rule_id str

The service bus (or event hub) rule ID of the service bus (or event hub) namespace in which the Activity Log is streamed to. At least one of storage_account_id or servicebus_rule_id must be set.

storage_account_id str

The resource ID of the storage account in which the Activity Log is stored. At least one of storage_account_id or servicebus_rule_id must be set.

Supporting Types

LogProfileRetentionPolicy

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Enabled bool

A boolean value to indicate whether the retention policy is enabled.

Days int

The number of days for the retention policy. Defaults to 0.

Enabled bool

A boolean value to indicate whether the retention policy is enabled.

Days int

The number of days for the retention policy. Defaults to 0.

enabled boolean

A boolean value to indicate whether the retention policy is enabled.

days number

The number of days for the retention policy. Defaults to 0.

enabled bool

A boolean value to indicate whether the retention policy is enabled.

days float

The number of days for the retention policy. Defaults to 0.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.