aws_sdk_appmonetization/client/create_plan.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreatePlan`](crate::operation::create_plan::builders::CreatePlanFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`app_id(impl Into<String>)`](crate::operation::create_plan::builders::CreatePlanFluentBuilder::app_id) / [`set_app_id(Option<String>)`](crate::operation::create_plan::builders::CreatePlanFluentBuilder::set_app_id):<br>required: **true**<br>The ID of the app the plan belongs to.<br>
7 /// - [`definition(PlanDefinition)`](crate::operation::create_plan::builders::CreatePlanFluentBuilder::definition) / [`set_definition(Option<PlanDefinition>)`](crate::operation::create_plan::builders::CreatePlanFluentBuilder::set_definition):<br>required: **true**<br>The pricing and packaging definition for the plan. The plan's identifier is not supplied here: CreatePlan mints a server-generated planId and returns it on the created plan.<br>
8 /// - [`client_token(impl Into<String>)`](crate::operation::create_plan::builders::CreatePlanFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_plan::builders::CreatePlanFluentBuilder::set_client_token):<br>required: **false**<br>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.<br>
9 /// - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_plan::builders::CreatePlanFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_plan::builders::CreatePlanFluentBuilder::set_tags):<br>required: **false**<br>Optional tags to add to the plan when it is created. Tagging on create also requires permission for appmonetization:TagResource.<br>
10 /// - On success, responds with [`CreatePlanOutput`](crate::operation::create_plan::CreatePlanOutput) with field(s):
11 /// - [`plan(Option<Plan>)`](crate::operation::create_plan::CreatePlanOutput::plan): The newly created plan, carrying its server-generated planId. It exists on the draft (DRAFT) offering until it is published.
12 /// - On failure, responds with [`SdkError<CreatePlanError>`](crate::operation::create_plan::CreatePlanError)
13 pub fn create_plan(&self) -> crate::operation::create_plan::builders::CreatePlanFluentBuilder {
14 crate::operation::create_plan::builders::CreatePlanFluentBuilder::new(self.handle.clone())
15 }
16}