maccs
Creates, updates, deletes, gets or lists a maccs resource.
Overview
| Name | maccs |
| Type | Resource |
| Id | azure.billing_benefits.maccs |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list_by_subscription
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
allowContributors | boolean | Setting this to true means multi-entity. |
automaticShortfall | string | Setting this to 'Enable' enables automatic shortfall charging when commitment is not met. Known values are: "Unknown", "Enabled", and "Disabled". (Unknown, Enabled, Disabled) |
automaticShortfallSuppressReason | object | Optional field to record suppression reason for automatic shortfall. |
billingAccountResourceId | string | Fully-qualified identifier of the billing account where the MACC is applied. Present only for Enterprise Agreement customers. Format must be Azure Resource ID: /providers/Microsoft.Billing/billingAccounts/{acctId:orgId}. |
commitment | object | Commitment towards the benefit. |
displayName | string | Display name. |
endAt | string (date-time) | Must be end of month. Timestamp must be in the ISO date format YYYY-MM-DDT23:59:59Z. |
entityType | string | Represents type of the object being operated on. Possible values are primary or contributor. Required. Known values are: "Primary" and "Contributor". (Primary, Contributor) |
etag | string | The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. |
identity | object | Managed service identity (system assigned and/or user assigned identities). |
kind | string | Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. |
location | string | The geo-location where the resource lives. Required. |
managedBy | string | The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. |
milestones | array | List of milestones associated with this MACC. |
plan | object | Plan for the resource. |
primaryBillingAccountResourceId | string | Fully-qualified billing account resource identifier of the primary MACC. Format must be Azure Resource ID: /providers/Microsoft.Billing/billingAccounts/{acctId:orgId}. |
primaryResourceId | string | Fully-qualified resource identifier of the primary MACC. Format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BillingBenefits/maccs/{maccName}. |
productCode | string | Represents catalog UPN. |
provisioningState | string | Provisioning state of MACC as assigned by RPaaS. This indicates the last operation's status. For all practical purposes, this can be ignored. For current status of MACC resource, refer to MaccStatus. |
resourceId | string | This is the resource identifier of either the primary MACC or the contributor. Format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BillingBenefits/maccs/{maccName}. |
shortfall | object | MACC shortfall. |
sku | object | The resource model definition representing SKU. |
startAt | string (date-time) | Must be start of month. Timestamp must be in the ISO date format YYYY-MM-DDT00:00:00Z. |
status | string | Represents the current status of the MACC. Known values are: "Unknown", "Scheduled", "Active", "Pending", "Failed", "Canceled", "Completed", "Stopped", "PendingSettlement", "ShortfallCharged", and "ShortfallWaived". (Unknown, Scheduled, Active, Pending, Failed, Canceled, Completed, Stopped, PendingSettlement, ShortfallCharged, ShortfallWaived) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
systemId | string | This is the globally unique identifier of the MACC which will not change for the lifetime of the MACC. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
allowContributors | boolean | Setting this to true means multi-entity. |
automaticShortfall | string | Setting this to 'Enable' enables automatic shortfall charging when commitment is not met. Known values are: "Unknown", "Enabled", and "Disabled". (Unknown, Enabled, Disabled) |
automaticShortfallSuppressReason | object | Optional field to record suppression reason for automatic shortfall. |
billingAccountResourceId | string | Fully-qualified identifier of the billing account where the MACC is applied. Present only for Enterprise Agreement customers. Format must be Azure Resource ID: /providers/Microsoft.Billing/billingAccounts/{acctId:orgId}. |
commitment | object | Commitment towards the benefit. |
displayName | string | Display name. |
endAt | string (date-time) | Must be end of month. Timestamp must be in the ISO date format YYYY-MM-DDT23:59:59Z. |
entityType | string | Represents type of the object being operated on. Possible values are primary or contributor. Required. Known values are: "Primary" and "Contributor". (Primary, Contributor) |
etag | string | The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. |
identity | object | Managed service identity (system assigned and/or user assigned identities). |
kind | string | Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. |
location | string | The geo-location where the resource lives. Required. |
managedBy | string | The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. |
milestones | array | List of milestones associated with this MACC. |
plan | object | Plan for the resource. |
primaryBillingAccountResourceId | string | Fully-qualified billing account resource identifier of the primary MACC. Format must be Azure Resource ID: /providers/Microsoft.Billing/billingAccounts/{acctId:orgId}. |
primaryResourceId | string | Fully-qualified resource identifier of the primary MACC. Format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BillingBenefits/maccs/{maccName}. |
productCode | string | Represents catalog UPN. |
provisioningState | string | Provisioning state of MACC as assigned by RPaaS. This indicates the last operation's status. For all practical purposes, this can be ignored. For current status of MACC resource, refer to MaccStatus. |
resourceId | string | This is the resource identifier of either the primary MACC or the contributor. Format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BillingBenefits/maccs/{maccName}. |
shortfall | object | MACC shortfall. |
sku | object | The resource model definition representing SKU. |
startAt | string (date-time) | Must be start of month. Timestamp must be in the ISO date format YYYY-MM-DDT00:00:00Z. |
status | string | Represents the current status of the MACC. Known values are: "Unknown", "Scheduled", "Active", "Pending", "Failed", "Canceled", "Completed", "Stopped", "PendingSettlement", "ShortfallCharged", and "ShortfallWaived". (Unknown, Scheduled, Active, Pending, Failed, Canceled, Completed, Stopped, PendingSettlement, ShortfallCharged, ShortfallWaived) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
systemId | string | This is the globally unique identifier of the MACC which will not change for the lifetime of the MACC. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
allowContributors | boolean | Setting this to true means multi-entity. |
automaticShortfall | string | Setting this to 'Enable' enables automatic shortfall charging when commitment is not met. Known values are: "Unknown", "Enabled", and "Disabled". (Unknown, Enabled, Disabled) |
automaticShortfallSuppressReason | object | Optional field to record suppression reason for automatic shortfall. |
billingAccountResourceId | string | Fully-qualified identifier of the billing account where the MACC is applied. Present only for Enterprise Agreement customers. Format must be Azure Resource ID: /providers/Microsoft.Billing/billingAccounts/{acctId:orgId}. |
commitment | object | Commitment towards the benefit. |
displayName | string | Display name. |
endAt | string (date-time) | Must be end of month. Timestamp must be in the ISO date format YYYY-MM-DDT23:59:59Z. |
entityType | string | Represents type of the object being operated on. Possible values are primary or contributor. Required. Known values are: "Primary" and "Contributor". (Primary, Contributor) |
etag | string | The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. |
identity | object | Managed service identity (system assigned and/or user assigned identities). |
kind | string | Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. |
location | string | The geo-location where the resource lives. Required. |
managedBy | string | The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. |
milestones | array | List of milestones associated with this MACC. |
plan | object | Plan for the resource. |
primaryBillingAccountResourceId | string | Fully-qualified billing account resource identifier of the primary MACC. Format must be Azure Resource ID: /providers/Microsoft.Billing/billingAccounts/{acctId:orgId}. |
primaryResourceId | string | Fully-qualified resource identifier of the primary MACC. Format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BillingBenefits/maccs/{maccName}. |
productCode | string | Represents catalog UPN. |
provisioningState | string | Provisioning state of MACC as assigned by RPaaS. This indicates the last operation's status. For all practical purposes, this can be ignored. For current status of MACC resource, refer to MaccStatus. |
resourceId | string | This is the resource identifier of either the primary MACC or the contributor. Format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BillingBenefits/maccs/{maccName}. |
shortfall | object | MACC shortfall. |
sku | object | The resource model definition representing SKU. |
startAt | string (date-time) | Must be start of month. Timestamp must be in the ISO date format YYYY-MM-DDT00:00:00Z. |
status | string | Represents the current status of the MACC. Known values are: "Unknown", "Scheduled", "Active", "Pending", "Failed", "Canceled", "Completed", "Stopped", "PendingSettlement", "ShortfallCharged", and "ShortfallWaived". (Unknown, Scheduled, Active, Pending, Failed, Canceled, Completed, Stopped, PendingSettlement, ShortfallCharged, ShortfallWaived) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
systemId | string | This is the globally unique identifier of the MACC which will not change for the lifetime of the MACC. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, macc_name, subscription_id | Get a MACC. | |
list_by_resource_group | select | resource_group_name, subscription_id | List MACCs under a resource group for primary service admin. | |
list_by_subscription | select | subscription_id | List MACCs under a subscription from primary service tenant. | |
create | insert | resource_group_name, macc_name, subscription_id, location | Create MACC. | |
update | update | resource_group_name, macc_name, subscription_id | Update MACC. | |
delete | delete | resource_group_name, macc_name, subscription_id | Delete MACC. | |
cancel | exec | resource_group_name, macc_name, subscription_id | Represents an operation to cancel MACC contract. This operation does not indicate deletion of the MACC, but rather stops applying the benefit to the account. | |
write_off | exec | resource_group_name, macc_name, subscription_id | Operation to waive a customer's pending MACC balance (Shortfall) from their account, ensuring they are not charged for the outstanding amount. | |
charge_shortfall | exec | resource_group_name, macc_name, subscription_id | Operation to charge shortfall to a customer's account, ensuring they are charged for the outstanding amount of MACC credit. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
macc_name | string | Name of primary MACC. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_resource_group
- list_by_subscription
Get a MACC.
SELECT
id,
name,
allowContributors,
automaticShortfall,
automaticShortfallSuppressReason,
billingAccountResourceId,
commitment,
displayName,
endAt,
entityType,
etag,
identity,
kind,
location,
managedBy,
milestones,
plan,
primaryBillingAccountResourceId,
primaryResourceId,
productCode,
provisioningState,
resourceId,
shortfall,
sku,
startAt,
status,
systemData,
systemId,
tags,
type
FROM azure.billing_benefits.maccs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND macc_name = '{{ macc_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List MACCs under a resource group for primary service admin.
SELECT
id,
name,
allowContributors,
automaticShortfall,
automaticShortfallSuppressReason,
billingAccountResourceId,
commitment,
displayName,
endAt,
entityType,
etag,
identity,
kind,
location,
managedBy,
milestones,
plan,
primaryBillingAccountResourceId,
primaryResourceId,
productCode,
provisioningState,
resourceId,
shortfall,
sku,
startAt,
status,
systemData,
systemId,
tags,
type
FROM azure.billing_benefits.maccs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List MACCs under a subscription from primary service tenant.
SELECT
id,
name,
allowContributors,
automaticShortfall,
automaticShortfallSuppressReason,
billingAccountResourceId,
commitment,
displayName,
endAt,
entityType,
etag,
identity,
kind,
location,
managedBy,
milestones,
plan,
primaryBillingAccountResourceId,
primaryResourceId,
productCode,
provisioningState,
resourceId,
shortfall,
sku,
startAt,
status,
systemData,
systemId,
tags,
type
FROM azure.billing_benefits.maccs
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
Create MACC.
INSERT INTO azure.billing_benefits.maccs (
tags,
location,
properties,
managedBy,
kind,
identity,
sku,
plan,
resource_group_name,
macc_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ managedBy }}',
'{{ kind }}',
'{{ identity }}',
'{{ sku }}',
'{{ plan }}',
'{{ resource_group_name }}',
'{{ macc_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
identity,
kind,
location,
managedBy,
plan,
properties,
sku,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: maccs
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the maccs resource.
- name: macc_name
value: "{{ macc_name }}"
description: Required parameter for the maccs resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the maccs resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
MACC properties.
value:
provisioningState: "{{ provisioningState }}"
status: "{{ status }}"
entityType: "{{ entityType }}"
displayName: "{{ displayName }}"
productCode: "{{ productCode }}"
billingAccountResourceId: "{{ billingAccountResourceId }}"
commitment:
currencyCode: "{{ currencyCode }}"
amount: {{ amount }}
grain: "{{ grain }}"
startAt: "{{ startAt }}"
endAt: "{{ endAt }}"
systemId: "{{ systemId }}"
automaticShortfall: "{{ automaticShortfall }}"
automaticShortfallSuppressReason:
code: "{{ code }}"
message: "{{ message }}"
shortfall:
productCode: "{{ productCode }}"
charge:
currencyCode: "{{ currencyCode }}"
amount: {{ amount }}
grain: "{{ grain }}"
startAt: "{{ startAt }}"
endAt: "{{ endAt }}"
resourceId: "{{ resourceId }}"
balanceVersion: {{ balanceVersion }}
systemId: "{{ systemId }}"
milestones:
- milestoneId: "{{ milestoneId }}"
commitment:
currencyCode: "{{ currencyCode }}"
amount: {{ amount }}
endAt: "{{ endAt }}"
automaticShortfall: "{{ automaticShortfall }}"
automaticShortfallSuppressReason:
code: "{{ code }}"
message: "{{ message }}"
status: "{{ status }}"
shortfall:
productCode: "{{ productCode }}"
charge:
currencyCode: "{{ currencyCode }}"
amount: {{ amount }}
grain: "{{ grain }}"
startAt: "{{ startAt }}"
endAt: "{{ endAt }}"
resourceId: "{{ resourceId }}"
balanceVersion: {{ balanceVersion }}
systemId: "{{ systemId }}"
resourceId: "{{ resourceId }}"
allowContributors: {{ allowContributors }}
primaryResourceId: "{{ primaryResourceId }}"
primaryBillingAccountResourceId: "{{ primaryBillingAccountResourceId }}"
- name: managedBy
value: "{{ managedBy }}"
description: |
The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.
- name: kind
value: "{{ kind }}"
description: |
Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
- name: identity
description: |
Managed service identity (system assigned and/or user assigned identities).
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
- name: sku
description: |
The resource model definition representing SKU.
value:
name: "{{ name }}"
tier: "{{ tier }}"
size: "{{ size }}"
family: "{{ family }}"
capacity: {{ capacity }}
- name: plan
description: |
Plan for the resource.
value:
name: "{{ name }}"
publisher: "{{ publisher }}"
product: "{{ product }}"
promotionCode: "{{ promotionCode }}"
version: "{{ version }}"
UPDATE examples
- update
Update MACC.
UPDATE azure.billing_benefits.maccs
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND macc_name = '{{ macc_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
identity,
kind,
location,
managedBy,
plan,
properties,
sku,
systemData,
tags,
type;
DELETE examples
- delete
Delete MACC.
DELETE FROM azure.billing_benefits.maccs
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND macc_name = '{{ macc_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- cancel
- write_off
- charge_shortfall
Represents an operation to cancel MACC contract. This operation does not indicate deletion of the MACC, but rather stops applying the benefit to the account.
EXEC azure.billing_benefits.maccs.cancel
@resource_group_name='{{ resource_group_name }}' --required,
@macc_name='{{ macc_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Operation to waive a customer's pending MACC balance (Shortfall) from their account, ensuring they are not charged for the outstanding amount.
EXEC azure.billing_benefits.maccs.write_off
@resource_group_name='{{ resource_group_name }}' --required,
@macc_name='{{ macc_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Operation to charge shortfall to a customer's account, ensuring they are charged for the outstanding amount of MACC credit.
EXEC azure.billing_benefits.maccs.charge_shortfall
@resource_group_name='{{ resource_group_name }}' --required,
@macc_name='{{ macc_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;