api_portals
Creates, updates, deletes, gets or lists an api_portals resource.
Overview
| Name | api_portals |
| Type | Resource |
| Id | azure_extras.app_platform.api_portals |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource Id for the resource. |
name | string | The name of the resource. |
apiTryOutEnabledState | string | Indicates whether the API try-out feature is enabled or disabled. When enabled, users can try out the API by sending requests and viewing responses in API portal. When disabled, users cannot try out the API. Known values are: "Enabled" and "Disabled". |
gatewayIds | array | The array of resource Ids of gateway to integrate with API portal. |
httpsOnly | boolean | Indicate if only https is allowed. |
instances | array | Collection of instances belong to API portal. |
provisioningState | string | State of the API portal. Known values are: "Creating", "Updating", "Succeeded", "Failed", and "Deleting". |
public | boolean | Indicates whether the API portal exposes endpoint. |
resourceRequests | object | The requested resource quantity for required CPU and Memory. |
sku | object | Sku of the API portal resource. |
sourceUrls | array | Collection of OpenAPI source URL locations. |
ssoProperties | object | Single sign-on related configuration. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
type | string | The type of the resource. |
url | string | URL of the API portal, exposed when 'public' is true. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource Id for the resource. |
name | string | The name of the resource. |
apiTryOutEnabledState | string | Indicates whether the API try-out feature is enabled or disabled. When enabled, users can try out the API by sending requests and viewing responses in API portal. When disabled, users cannot try out the API. Known values are: "Enabled" and "Disabled". |
gatewayIds | array | The array of resource Ids of gateway to integrate with API portal. |
httpsOnly | boolean | Indicate if only https is allowed. |
instances | array | Collection of instances belong to API portal. |
provisioningState | string | State of the API portal. Known values are: "Creating", "Updating", "Succeeded", "Failed", and "Deleting". |
public | boolean | Indicates whether the API portal exposes endpoint. |
resourceRequests | object | The requested resource quantity for required CPU and Memory. |
sku | object | Sku of the API portal resource. |
sourceUrls | array | Collection of OpenAPI source URL locations. |
ssoProperties | object | Single sign-on related configuration. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
type | string | The type of the resource. |
url | string | URL of the API portal, exposed when 'public' is true. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, service_name, api_portal_name, subscription_id | Get the API portal and its properties. | |
list | select | resource_group_name, service_name, subscription_id | Handles requests to list all resources in a Service. | |
create_or_update | insert | resource_group_name, service_name, api_portal_name, subscription_id | Create the default API portal or update the existing API portal. | |
create_or_update | replace | resource_group_name, service_name, api_portal_name, subscription_id | Create the default API portal or update the existing API portal. | |
delete | delete | resource_group_name, service_name, api_portal_name, subscription_id | Delete the default API portal. | |
validate_domain | exec | resource_group_name, service_name, api_portal_name, subscription_id, name | Check the domains are valid as well as not in use. |
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 |
|---|---|---|
api_portal_name | string | The name of API portal. Required. |
resource_group_name | string | The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Required. |
service_name | string | The name of the Service resource. Required. |
subscription_id | string |
SELECT examples
- get
- list
Get the API portal and its properties.
SELECT
id,
name,
apiTryOutEnabledState,
gatewayIds,
httpsOnly,
instances,
provisioningState,
public,
resourceRequests,
sku,
sourceUrls,
ssoProperties,
systemData,
type,
url
FROM azure_extras.app_platform.api_portals
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND api_portal_name = '{{ api_portal_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Handles requests to list all resources in a Service.
SELECT
id,
name,
apiTryOutEnabledState,
gatewayIds,
httpsOnly,
instances,
provisioningState,
public,
resourceRequests,
sku,
sourceUrls,
ssoProperties,
systemData,
type,
url
FROM azure_extras.app_platform.api_portals
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Create the default API portal or update the existing API portal.
INSERT INTO azure_extras.app_platform.api_portals (
properties,
sku,
resource_group_name,
service_name,
api_portal_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ sku }}',
'{{ resource_group_name }}',
'{{ service_name }}',
'{{ api_portal_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
sku,
systemData,
type
;
# Description fields are for documentation purposes
- name: api_portals
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the api_portals resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the api_portals resource.
- name: api_portal_name
value: "{{ api_portal_name }}"
description: Required parameter for the api_portals resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the api_portals resource.
- name: properties
description: |
API portal properties payload.
value:
provisioningState: "{{ provisioningState }}"
public: {{ public }}
url: "{{ url }}"
httpsOnly: {{ httpsOnly }}
gatewayIds:
- "{{ gatewayIds }}"
sourceUrls:
- "{{ sourceUrls }}"
ssoProperties:
scope:
- "{{ scope }}"
clientId: "{{ clientId }}"
clientSecret: "{{ clientSecret }}"
issuerUri: "{{ issuerUri }}"
resourceRequests:
cpu: "{{ cpu }}"
memory: "{{ memory }}"
instances:
- name: "{{ name }}"
status: "{{ status }}"
apiTryOutEnabledState: "{{ apiTryOutEnabledState }}"
- name: sku
description: |
Sku of the API portal resource.
value:
name: "{{ name }}"
tier: "{{ tier }}"
capacity: {{ capacity }}
REPLACE examples
- create_or_update
Create the default API portal or update the existing API portal.
REPLACE azure_extras.app_platform.api_portals
SET
properties = '{{ properties }}',
sku = '{{ sku }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND api_portal_name = '{{ api_portal_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
sku,
systemData,
type;
DELETE examples
- delete
Delete the default API portal.
DELETE FROM azure_extras.app_platform.api_portals
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND api_portal_name = '{{ api_portal_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- validate_domain
Check the domains are valid as well as not in use.
EXEC azure_extras.app_platform.api_portals.validate_domain
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@api_portal_name='{{ api_portal_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"name": "{{ name }}"
}'
;