pub trait Provider:
Send
+ Sync
+ 'static {
type ListResourceStream: Stream<Item = Result<Event, Status>> + Send + 'static;
type InvokeActionStream: Stream<Item = Result<Event, Status>> + Send + 'static;
Show 28 methods
// Required methods
fn get_metadata<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_schema<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn prepare_provider_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn validate_resource_type_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn validate_data_source_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn upgrade_resource_state<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_resource_identity_schemas<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn upgrade_resource_identity<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn configure<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn read_resource<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn plan_resource_change<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn apply_resource_change<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn import_resource_state<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn move_resource_state<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn read_data_source<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn generate_resource_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn validate_ephemeral_resource_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn open_ephemeral_resource<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn renew_ephemeral_resource<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn close_ephemeral_resource<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_resource<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListResourceStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn validate_list_resource_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_functions<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn call_function<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn plan_action<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn invoke_action<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::InvokeActionStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn validate_action_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stop<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Generated trait containing gRPC methods that should be implemented for use with ProviderServer.
Required Associated Types§
Required Methods§
Sourcefn get_metadata<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_metadata<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
GetMetadata returns upfront information about server capabilities and supported resource types without requiring the server to instantiate all schema information, which may be memory intensive. This method is CURRENTLY UNUSED and it serves mostly for convenience of code generation inside of terraform-plugin-mux.
Sourcefn get_schema<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_schema<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
GetSchema returns schema information for the provider, data resources, and managed resources.
fn prepare_provider_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_resource_type_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_data_source_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upgrade_resource_state<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn get_resource_identity_schemas<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_resource_identity_schemas<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
GetResourceIdentitySchemas returns the identity schemas for all managed resources.
Sourcefn upgrade_resource_identity<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upgrade_resource_identity<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
UpgradeResourceIdentityData should return the upgraded resource identity data for a managed resource type.
Sourcefn configure<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn configure<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
////// One-time initialization, called before other functions below
Sourcefn read_resource<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_resource<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
////// Managed Resource Lifecycle
fn plan_resource_change<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn apply_resource_change<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn import_resource_state<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn move_resource_state<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_data_source<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn generate_resource_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn validate_ephemeral_resource_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_ephemeral_resource_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
////// Ephemeral Resource Lifecycle
fn open_ephemeral_resource<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn renew_ephemeral_resource<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close_ephemeral_resource<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn list_resource<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListResourceStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_resource<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListResourceStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
///// List
fn validate_list_resource_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn get_functions<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_functions<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
GetFunctions returns the definitions of all functions.
Sourcefn call_function<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn call_function<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
////// Provider-contributed Functions
Sourcefn plan_action<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn plan_action<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
////// Actions
fn invoke_action<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::InvokeActionStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_action_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Request>,
) -> Pin<Box<dyn Future<Output = Result<Response<Response>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".