azure-native-v2.insights.LogProfile
Explore with Pulumi AI
The log profile resource. Azure REST API version: 2016-03-01. Prior API version in Azure Native 1.x: 2016-03-01.
Create LogProfile Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LogProfile(name: string, args: LogProfileArgs, opts?: CustomResourceOptions);
@overload
def LogProfile(resource_name: str,
args: LogProfileArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LogProfile(resource_name: str,
opts: Optional[ResourceOptions] = None,
categories: Optional[Sequence[str]] = None,
locations: Optional[Sequence[str]] = None,
retention_policy: Optional[RetentionPolicyArgs] = None,
location: Optional[str] = None,
log_profile_name: Optional[str] = None,
service_bus_rule_id: Optional[str] = None,
storage_account_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewLogProfile(ctx *Context, name string, args LogProfileArgs, opts ...ResourceOption) (*LogProfile, error)
public LogProfile(string name, LogProfileArgs args, CustomResourceOptions? opts = null)
public LogProfile(String name, LogProfileArgs args)
public LogProfile(String name, LogProfileArgs args, CustomResourceOptions options)
type: azure-native:insights:LogProfile
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. LogProfileArgs - 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. LogProfileArgs - 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. LogProfileArgs - 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. LogProfileArgs - 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. LogProfileArgs - 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 logProfileResource = new AzureNative.Insights.LogProfile("logProfileResource", new()
{
Categories = new[]
{
"string",
},
Locations = new[]
{
"string",
},
RetentionPolicy =
{
{ "days", 0 },
{ "enabled", false },
},
Location = "string",
LogProfileName = "string",
ServiceBusRuleId = "string",
StorageAccountId = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := insights.NewLogProfile(ctx, "logProfileResource", &insights.LogProfileArgs{
Categories: []string{
"string",
},
Locations: []string{
"string",
},
RetentionPolicy: map[string]interface{}{
"days": 0,
"enabled": false,
},
Location: "string",
LogProfileName: "string",
ServiceBusRuleId: "string",
StorageAccountId: "string",
Tags: map[string]interface{}{
"string": "string",
},
})
var logProfileResource = new LogProfile("logProfileResource", LogProfileArgs.builder()
.categories("string")
.locations("string")
.retentionPolicy(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.location("string")
.logProfileName("string")
.serviceBusRuleId("string")
.storageAccountId("string")
.tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
log_profile_resource = azure_native.insights.LogProfile("logProfileResource",
categories=[string],
locations=[string],
retention_policy={
days: 0,
enabled: False,
},
location=string,
log_profile_name=string,
service_bus_rule_id=string,
storage_account_id=string,
tags={
string: string,
})
const logProfileResource = new azure_native.insights.LogProfile("logProfileResource", {
categories: ["string"],
locations: ["string"],
retentionPolicy: {
days: 0,
enabled: false,
},
location: "string",
logProfileName: "string",
serviceBusRuleId: "string",
storageAccountId: "string",
tags: {
string: "string",
},
});
type: azure-native:insights:LogProfile
properties:
categories:
- string
location: string
locations:
- string
logProfileName: string
retentionPolicy:
days: 0
enabled: false
serviceBusRuleId: string
storageAccountId: string
tags:
string: string
LogProfile 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 LogProfile resource accepts the following input properties:
- Categories
This property is required. List<string> - the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.'
- Locations
This property is required. List<string> - List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid ARM locations including the 'global' location.
- Retention
Policy This property is required. Pulumi.Azure Native. Insights. Inputs. Retention Policy - the retention policy for the events in the log.
- Location
Changes to this property will trigger replacement.
- Resource location
- Log
Profile Name Changes to this property will trigger replacement.
- The name of the log profile.
- Service
Bus stringRule Id - The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'.
- Storage
Account stringId - the resource id of the storage account to which you would like to send the Activity Log.
- Dictionary<string, string>
- Resource tags
- Categories
This property is required. []string - the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.'
- Locations
This property is required. []string - List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid ARM locations including the 'global' location.
- Retention
Policy This property is required. RetentionPolicy Args - the retention policy for the events in the log.
- Location
Changes to this property will trigger replacement.
- Resource location
- Log
Profile Name Changes to this property will trigger replacement.
- The name of the log profile.
- Service
Bus stringRule Id - The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'.
- Storage
Account stringId - the resource id of the storage account to which you would like to send the Activity Log.
- map[string]string
- Resource tags
- categories
This property is required. List<String> - the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.'
- locations
This property is required. List<String> - List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid ARM locations including the 'global' location.
- retention
Policy This property is required. RetentionPolicy - the retention policy for the events in the log.
- location
Changes to this property will trigger replacement.
- Resource location
- log
Profile Name Changes to this property will trigger replacement.
- The name of the log profile.
- service
Bus StringRule Id - The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'.
- storage
Account StringId - the resource id of the storage account to which you would like to send the Activity Log.
- Map<String,String>
- Resource tags
- categories
This property is required. string[] - the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.'
- locations
This property is required. string[] - List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid ARM locations including the 'global' location.
- retention
Policy This property is required. RetentionPolicy - the retention policy for the events in the log.
- location
Changes to this property will trigger replacement.
- Resource location
- log
Profile Name Changes to this property will trigger replacement.
- The name of the log profile.
- service
Bus stringRule Id - The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'.
- storage
Account stringId - the resource id of the storage account to which you would like to send the Activity Log.
- {[key: string]: string}
- Resource tags
- categories
This property is required. Sequence[str] - the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.'
- locations
This property is required. Sequence[str] - List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid ARM locations including the 'global' location.
- retention_
policy This property is required. RetentionPolicy Args - the retention policy for the events in the log.
- location
Changes to this property will trigger replacement.
- Resource location
- log_
profile_ name Changes to this property will trigger replacement.
- The name of the log profile.
- service_
bus_ strrule_ id - The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'.
- storage_
account_ strid - the resource id of the storage account to which you would like to send the Activity Log.
- Mapping[str, str]
- Resource tags
- categories
This property is required. List<String> - the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.'
- locations
This property is required. List<String> - List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid ARM locations including the 'global' location.
- retention
Policy This property is required. Property Map - the retention policy for the events in the log.
- location
Changes to this property will trigger replacement.
- Resource location
- log
Profile Name Changes to this property will trigger replacement.
- The name of the log profile.
- service
Bus StringRule Id - The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'.
- storage
Account StringId - the resource id of the storage account to which you would like to send the Activity Log.
- Map<String>
- Resource tags
Outputs
All input properties are implicitly available as output properties. Additionally, the LogProfile resource produces the following output properties:
Supporting Types
RetentionPolicy, RetentionPolicyArgs
RetentionPolicyResponse, RetentionPolicyResponseArgs
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:insights:LogProfile default /subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v2 pulumi/pulumi-azure-native
- License
- Apache-2.0