def GetCoreNamespaceResourceSpec():
    """Returns a resource spec for namespace core api, rather than just run.namespaces."""
    return concepts.ResourceSpec(
        'anthosevents.api.v1.namespaces',
        namespacesId=run_resource_args.NamespaceAttributeConfig(),
        resource_name='namespace',
        api_version='v1')
def GetTriggerResourceSpec():
    return concepts.ResourceSpec(
        util.ANTHOS_TRIGGER_COLLECTION_NAME,
        namespacesId=run_resource_args.NamespaceAttributeConfig(),
        triggersId=TriggerAttributeConfig(),
        resource_name='Trigger',
        api_version='v1beta1')
Example #3
0
def GetTriggerResourceSpec(api_version=EVENTS_ALPHA_API_VERSION):
    return concepts.ResourceSpec(
        'run.namespaces.triggers',
        namespacesId=run_resource_args.NamespaceAttributeConfig(),
        triggersId=TriggerAttributeConfig(),
        resource_name='Trigger',
        api_version=api_version)
Example #4
0
def GetNamespaceResourceSpec(api_version=EVENTS_ALPHA_API_VERSION):
    """Returns a resource spec for the namespace."""
    return concepts.ResourceSpec(
        'run.namespaces',
        namespacesId=run_resource_args.NamespaceAttributeConfig(),
        resource_name='namespace',
        api_version=api_version)
def GetTriggerResourceSpec():
    return concepts.ResourceSpec(
        'run.namespaces.triggers',
        namespacesId=run_resource_args.NamespaceAttributeConfig(),
        triggersId=TriggerAttributeConfig(),
        resource_name='Trigger')