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')
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 5
0
def GetTriggerResourceSpec():
    return concepts.ResourceSpec(
        'run.namespaces.triggers',
        namespacesId=run_resource_args.NamespaceAttributeConfig(),
        triggersId=TriggerAttributeConfig(),
        resource_name='Trigger')