Quick Start
Features
Environment Management
Create and configure isolated environments
Worker Registration
Generate commands for worker registration
Auto-Provisioning
Automatic Temporal namespace setup
Status Tracking
Monitor environment provisioning status
List Environments
Retrieve all environments in your organization:status_filter(str, optional): Filter by status: ‘active’, ‘inactive’, ‘provisioning’, ‘ready’, or ‘error’
Get Environment
Retrieve a specific environment by ID:environment_id(str, required): Environment UUID
Create Environment
Create a new environment:environment_data(dict, required): Environment configurationname(str): Environment namedescription(str): Environment descriptionstatus(str, optional): Environment status (default: ‘active’)configuration(dict, optional): Environment-specific configurationmetadata(dict, optional): Additional metadata
If this is the first environment for your organization, it will trigger the Temporal Cloud namespace provisioning workflow automatically.
Update Environment
Update an existing environment (partial update):environment_id(str, required): Environment UUIDenvironment_data(dict, required): Fields to update (partial update)name(str, optional): Environment namedescription(str, optional): Descriptionstatus(str, optional): Environment statusconfiguration(dict, optional): Configuration settingsmetadata(dict, optional): Additional metadata
Delete Environment
Delete an environment:environment_id(str, required): Environment UUID
Worker Registration
Get Worker Command
Get the registration command for workers in an environment:environment_id(str, required): Environment UUID
command(str): Full worker start commandworker_token(str): Worker authentication tokentemporal_namespace(str): Temporal namespaceenvironment_name(str): Environment name
Worker Registration Example
Complete Example
Here’s a complete example of setting up environments for different stages:Error Handling
Handle environment-related errors:Environment Provisioning
Understanding Environment States
Environments go through several states during provisioning:- provisioning: Initial state when environment is created
- ready: Temporal namespace is provisioned and ready
- active: Environment is active and accepting work
- error: Provisioning failed or environment error occurred
- inactive: Environment is disabled
Monitoring Provisioning
Best Practices
Environment Strategy
- Environment Per Stage: Create separate environments for dev, staging, and production
- Isolated Resources: Use environments to isolate different workloads
- Naming Convention: Use clear, consistent naming (e.g., “production-us-east”)
- Default Environment: Reserve the default environment for testing and development
Worker Management
- Dedicated Workers: Deploy dedicated workers for each environment
- Worker Scaling: Scale workers based on environment workload
- Secure Tokens: Treat worker tokens as secrets; rotate regularly
- Health Monitoring: Monitor worker health and connectivity
Configuration
- Resource Limits: Set appropriate max_workers and timeout values
- Metadata: Use metadata to track ownership, cost centers, and stages
- Status Management: Use status to control environment availability
- Regular Reviews: Review environment configurations periodically
Security
- Token Rotation: Regularly rotate worker tokens
- Access Control: Limit who can create/modify environments
- Network Isolation: Use network policies to isolate environment workers
- Audit Logging: Monitor environment changes and access
Use Cases
Multi-Stage Deployment
Multi-Region Setup
Team Isolation
Testing Environments
API Reference
Next Steps
Workers Service
Monitor and manage workers
Agents Service
Deploy agents to environments
Teams Service
Run teams in specific environments
Jobs Service
Schedule jobs to run in environments