log_analytics_workspace#
State module for managing Compute Log Analytics Workspace.
- async idem_azure.states.azure.compute.log_analytics_workspace.present(hub, ctx, name: str, resource_group_name: str, subscription_id: str, workspace_name: str, location: str, eTag: str = None, default_data_collection_rule_resourceId: str = None, features: Dict = None, force_cmk_for_query: bool = False, public_network_access_for_ingestion: str = None, public_network_access_for_query: str = None, retention_in_days: int = None, sku: Dict = None, workspace_capping: Dict = None, tags: Dict = None, resource_id: str = None) Dict [source]#
Create or update Log Analytics Workspace.
- Parameters:
name (str) – The identifier for this state.
resource_group_name (str) – The name of the resource group. The name is case insensitive.
workspace_name (str) – The name of the workspace. Regex pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$
eTag (str) – The ETag of the workspace.
location (str) – Resource location. This field can not be updated.
resource_id (str, Optional) – Workspace resource id on Azure
default_data_collection_rule_resourceId (str) – The resource ID of the default Data Collection Rule to use for this workspace.
features (dict, Optional) – Workspace features.
force_cmk_for_query (dict, Optional) – Indicates whether customer managed storage is mandatory for query management.
public_network_access_for_ingestion (str, Optional) – The network access type for accessing Log Analytics ingestion.
public_network_access_for_query (str, Optional) – The network access type for accessing Log Analytics query.
retention_in_days (int, Optional) – The workspace data retention in days. Allowed values are per pricing plan. See pricing tiers documentation for details.
sku (dict, Optional) – The SKU of the workspace.
workspace_capping (dict) – The daily volume cap for ingestion.
tags (dict, Optional) – Resource tags.
subscription_id (str) – Subscription Unique id.
- Returns:
dict
Examples
workspaces/sb-instance: azure.compute.log_analytics_workspace.present: - name: /subscriptions/98bf10bb-cf16-49eb-9ef3-7ccc82e5d45e/resourcegroups/sb-resource-group/providers/Microsoft.OperationalInsights/workspaces/sb-workspace - resource_id: /subscriptions/98bf10bb-cf16-49eb-9ef3-7ccc82e5d45e/resourcegroups/sb-resource-group/providers/Microsoft.OperationalInsights/workspaces/sb-workspace - resource_group_name: sb-resource-group - workspace_name: sb-workspace - location: westus - subscription_id: 98bf10bb-cf16-49eb-9ef3-7ccc82e5d45e - tags: E2ETag: E2EValue Environment: Next env: next - sku: lastSkuUpdate: '2022-12-13T05:51:07.1724412Z' name: pergb2018 - features: enableLogAccessUsingOnlyResourcePermissions: true legacy: 0 searchVersion: 1 - workspace_capping: dailyQuotaGb: -1.0 dataIngestionStatus: RespectQuota quotaNextResetTime: '2022-12-13T08:00:00Z' - retention_in_days: 30 - public_network_access_for_ingestion: Enabled - public_network_access_for_query: Enabled
- async idem_azure.states.azure.compute.log_analytics_workspace.absent(hub, ctx, name: str, resource_group_name: str, workspace_name: str, subscription_id: str = None) Dict [source]#
Delete a Log Analytics Workspace.
- Parameters:
- Returns:
Dict
Examples
resource_is_absent: azure.compute.log_analytics_workspace.absent: - name: my-workspace - resource_group_name: my-resource-group - workspace_name: my-workspace - subscription_id: my-subscription
- async idem_azure.states.azure.compute.log_analytics_workspace.describe(hub, ctx) Dict[str, Dict[str, Any]] [source]#
Describe the resource in a way that can be recreated/managed with the corresponding “present” function.
Lists all Log Analytics Workspace under the same subscription
- Returns:
Dict[str, Any]
Examples
$ idem describe azure.compute.log_analytics_workspace