actionCloud Run

create_service

Creates a Cloud Run service

Activity as code

Below are the details and signature of the activity Python module.

Typeaction
Modulechaosgcp.cloudrun.actions
Namecreate_service
Returnnull

Usage

JSON

{
  "name": "create-service",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosgcp.cloudrun.actions",
    "func": "create_service",
    "arguments": {
      "parent": "",
      "service_id": "",
      "container": {}
    }
  }
}

YAML

name: create-service
provider:
  arguments:
    container: {}
    parent: ''
    service_id: ''
  func: create_service
  module: chaosgcp.cloudrun.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
parentstringYesProject PathFull project path
service_idstringYesService NameName used to identify the service
descriptionstring""NoDescription
containerobjectYesContainer DefinitionJSON encoded description of the container
max_instance_request_concurrencyinteger30NoRequest ConcurrencyMaximum requests concurrency per instance
service_accountstring""NoService AccountName of the service account to attach to the service
encryption_keystring""NoEncryption KeyName of the encryption key to associate with the service
trafficobjectnullNoTraffic TargetJSON encoded sequence of of tarffic target objects
labelsobjectnullNoLabelsJSON encoded set of labels
annotationsobjectnullNoAnnotationsJSON encoded set of annotations

See https://cloud.google.com/python/docs/reference/run/latest/google.cloud.run_v2.types.Service

Signature

def create_service(parent: str,
                   service_id: str,
                   container: Dict[str, Any],
                   description: str = None,
                   max_instance_request_concurrency: int = 0,
                   service_account: str = None,
                   encryption_key: str = None,
                   traffic: List[Dict[str, Any]] = None,
                   labels: Dict[str, str] = None,
                   annotations: Dict[str, str] = None,
                   configuration: Dict[str, Dict[str, str]] = None,
                   secrets: Dict[str, Dict[str, str]] = None):
    pass