Skip to main content

associations

Creates, updates, deletes, gets or lists an associations resource.

Overview

Nameassociations
TypeResource
Idazure.custom_providers.associations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe association id.
namestringThe association name.
provisioningStatestringThe provisioning state of the association. Known values are: "Accepted", "Deleting", "Running", "Succeeded", and "Failed".
targetResourceIdstringThe REST resource instance of the target resource for this association.
typestringThe association type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectscope, association_nameGet an association.
list_allselectscopeGets all association for the given scope.
create_or_updateinsertscope, association_nameCreate or update an association.
create_or_updatereplacescope, association_nameCreate or update an association.
deletedeletescope, association_nameDelete an association.

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.

NameDatatypeDescription
association_namestringThe name of the association. Required.
scopestringThe scope of the association. Required.

SELECT examples

Get an association.

SELECT
id,
name,
provisioningState,
targetResourceId,
type
FROM azure.custom_providers.associations
WHERE scope = '{{ scope }}' -- required
AND association_name = '{{ association_name }}' -- required
;

INSERT examples

Create or update an association.

INSERT INTO azure.custom_providers.associations (
properties,
scope,
association_name
)
SELECT
'{{ properties }}',
'{{ scope }}',
'{{ association_name }}'
RETURNING
id,
name,
properties,
type
;

REPLACE examples

Create or update an association.

REPLACE azure.custom_providers.associations
SET
properties = '{{ properties }}'
WHERE
scope = '{{ scope }}' --required
AND association_name = '{{ association_name }}' --required
RETURNING
id,
name,
properties,
type;

DELETE examples

Delete an association.

DELETE FROM azure.custom_providers.associations
WHERE scope = '{{ scope }}' --required
AND association_name = '{{ association_name }}' --required
;