Get a resource type api versions

def get_api_versions(call=None, kwargs=None):  # pylint: disable=unused-argument
    '''
    Get a resource type api versions
    '''
    if kwargs is None:
        kwargs = {}

    if 'resource_provider' not in kwargs:
        raise SaltCloudSystemExit(
            'A resource_provider must be specified'
        )

    if 'resource_type' not in kwargs:
        raise SaltCloudSystemExit(
            'A resource_type must be specified'
        )

    api_versions = []

    try:
        resconn = get_conn(client_type='resource')
        provider_query = resconn.providers.get(
            resource_provider_namespace=kwargs['resource_provider']
        )

        for resource in provider_query.resource_types:
            if six.text_type(resource.resource_type) == kwargs['resource_type']:
                resource_dict = resource.as_dict()
                api_versions = resource_dict['api_versions']
    except CloudError as exc:
        __utils__['azurearm.log_cloud_error']('resource', exc.message)

    return api_versions