pub struct Client { /* private fields */ }Expand description
Client for AWS App Monetization
Client for invoking operations on AWS App Monetization. Each operation on AWS App Monetization is a method on this
this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env() instead, which returns a ConfigLoader that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_appmonetization::Client::new(&config);Occasionally, SDKs may have additional service-specific values that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Builder struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_appmonetization::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();See the aws-config docs and Config for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the ArchiveMetric operation has
a Client::archive_metric, function which returns a builder for that operation.
The fluent builder ultimately has a send() function that returns an async future that
returns a result, as illustrated below:
let result = client.archive_metric()
.app_id("example")
.send()
.await;The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn archive_metric(&self) -> ArchiveMetricFluentBuilder
pub fn archive_metric(&self) -> ArchiveMetricFluentBuilder
Constructs a fluent builder for the ArchiveMetric operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.metric_id(impl Into<String>)/set_metric_id(Option<String>):
required: true
The ID of the metric to archive.
- On success, responds with
ArchiveMetricOutputwith field(s):app_id(String): The ID of the app the archived metric belonged to.metric_id(String): The ID of the archived metric.
- On failure, responds with
SdkError<ArchiveMetricError>
Source§impl Client
impl Client
Sourcepub fn archive_plan(&self) -> ArchivePlanFluentBuilder
pub fn archive_plan(&self) -> ArchivePlanFluentBuilder
Constructs a fluent builder for the ArchivePlan operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.plan_id(impl Into<String>)/set_plan_id(Option<String>):
required: true
The identifier of the plan. We generate this value when you create the plan. It is unique within the app and is never reused. Treat it as opaque.
- On success, responds with
ArchivePlanOutputwith field(s):app_id(String): The ID of the app the archived plan belonged to.plan_id(String): The server-generated identifier of the archived plan.
- On failure, responds with
SdkError<ArchivePlanError>
Source§impl Client
impl Client
Sourcepub fn cancel_subscription(&self) -> CancelSubscriptionFluentBuilder
pub fn cancel_subscription(&self) -> CancelSubscriptionFluentBuilder
Constructs a fluent builder for the CancelSubscription operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.user_id(impl Into<String>)/set_user_id(Option<String>):
required: true
An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value.effective_at(DateTime)/set_effective_at(Option<DateTime>):
required: true
The subscription’s current effective time, as returned by GetSubscription, used as an optimistic-concurrency check. If GetSubscription returns a pending change, passpendingChange.effectiveAt; otherwise passsubscription.effectiveAt. This value does not choose when the cancellation takes effect: a new cancellation takes effect at the end of the current billing period, returned ascancellationEffectiveAt. If the subscription’s effective time has changed since you read it (for example, because another plan change was made), the value no longer matches and the request fails with ConflictException; call GetSubscription again and retry with the new value. If the subscription is already cancelled or a cancellation is already scheduled, the request returns its current state and does not compare this value.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox.
- On success, responds with
CancelSubscriptionOutputwith field(s):subscription(Option<Subscription>): The subscription as it stands after the cancellation is scheduled.cancellation_effective_at(DateTime): The time when the cancellation takes effect, at the end of the current billing period. The subscription remains active until this time.
- On failure, responds with
SdkError<CancelSubscriptionError>
Source§impl Client
impl Client
Sourcepub fn create_app(&self) -> CreateAppFluentBuilder
pub fn create_app(&self) -> CreateAppFluentBuilder
Constructs a fluent builder for the CreateApp operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):
required: true
A human-readable display name for the app.description(impl Into<String>)/set_description(Option<String>):
required: false
A longer description of what the app does.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
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.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: false
Optional tags to add to the app when it is created. To add tags when you create the app, you must also have permission for appmonetization:TagResource.cost_tracking(CostTrackingConfiguration)/set_cost_tracking(Option<CostTrackingConfiguration>):
required: false
Optional cost-tracking configuration: the IAM role AWS App Monetization uses to track this app’s AWS costs. To pass a role, you must have permission for iam:PassRole on it.
- On success, responds with
CreateAppOutputwith field(s):app(Option<App>): The created app, carrying its service-assigned appId and initial status. On an idempotent replay with the same clientToken, this is the app the original call created.
- On failure, responds with
SdkError<CreateAppError>
Source§impl Client
impl Client
Sourcepub fn create_app_payment_registration(
&self,
) -> CreateAppPaymentRegistrationFluentBuilder
pub fn create_app_payment_registration( &self, ) -> CreateAppPaymentRegistrationFluentBuilder
Constructs a fluent builder for the CreateAppPaymentRegistration operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app being registered for payment.legal_name(impl Into<String>)/set_legal_name(Option<String>):
required: false
Your registered legal name.developer_address(DeveloperAddress)/set_developer_address(Option<DeveloperAddress>):
required: false
Your business address.tax_registration_number(impl Into<String>)/set_tax_registration_number(Option<String>):
required: false
Your tax registration number (for example, VAT, GST, or EIN).business_type(BusinessType)/set_business_type(Option<BusinessType>):
required: false
Whether the seller is an individual or a registered business.email(impl Into<String>)/set_email(Option<String>):
required: false
Your primary contact email for this registration, distinct from supportEmail (the address shown to customers). If you omit it, AWS App Monetization uses supportEmail.support_email(impl Into<String>)/set_support_email(Option<String>):
required: false
Your support email address, displayed in the invoice footer.display_name(impl Into<String>)/set_display_name(Option<String>):
required: false
Customer-facing name (doing-business-as) shown to buyers on invoices, distinct from legalName.support_phone(impl Into<String>)/set_support_phone(Option<String>):
required: false
Customer-facing support phone number shown to buyers on invoices.invoice_logo(Blob)/set_invoice_logo(Option<Blob>):
required: false
Logo printed on the seller’s invoices: raw PNG or JPEG bytes, up to 100 KiB. The image type is detected from the bytes. Write-only: the logo is not returned by GetAppPaymentRegistration.tax_registrations(TaxRegistration)/set_tax_registrations(Option<Vec::<TaxRegistration>>):
required: false
The jurisdictions where the seller is registered to collect tax.return_url(impl Into<String>)/set_return_url(Option<String>):
required: true
The URL the seller’s browser is redirected to after completing hosted registration.refresh_url(impl Into<String>)/set_refresh_url(Option<String>):
required: true
The URL the seller’s browser is redirected to if the hosted registration session expires.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
A unique, case-sensitive identifier to ensure that the operation completes no more than one time.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox.
- On success, responds with
CreateAppPaymentRegistrationOutputwith field(s):registration_url(String): The hosted URL the seller opens to finish entering payment and tax details.expires_at(DateTime): The time the registration URL expires.
- On failure, responds with
SdkError<CreateAppPaymentRegistrationError>
Source§impl Client
impl Client
Sourcepub fn create_billing_portal_session(
&self,
) -> CreateBillingPortalSessionFluentBuilder
pub fn create_billing_portal_session( &self, ) -> CreateBillingPortalSessionFluentBuilder
Constructs a fluent builder for the CreateBillingPortalSession operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app the portal is for.user_id(impl Into<String>)/set_user_id(Option<String>):
required: true
The ID of the end user the portal is for. Do not include personally identifiable or otherwise sensitive data in this value.return_url(impl Into<String>)/set_return_url(Option<String>):
required: true
A URL in your app. A plan checkout started from the portal doesn’t redirect here: after payment, the buyer returns to the portal’s My subscription page. Bound into the session and reused for every checkout the buyer launches from the portal.refresh_url(impl Into<String>)/set_refresh_url(Option<String>):
required: true
A URL in your app. A plan checkout started from the portal doesn’t redirect here: if the buyer cancels, they return to the portal’s plans page. Bound into the session alongside returnUrl.session_duration_seconds(i32)/set_session_duration_seconds(Option<i32>):
required: false
The lifetime of the hosted session, in seconds, counted from this call. Omit to use the service default. It does not set how long billingPortalUrl works; see expiresAt.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
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.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox.
- On success, responds with
CreateBillingPortalSessionOutputwith field(s):billing_portal_url(String): The URL of the billing portal page to redirect the end user’s browser to. The URL carries a short-lived session token or a single-use link in its fragment. The link works once, until expiresAt or the end of the session if sooner.session_token(Option<String>): The billing portal session token carried in the fragment of billingPortalUrl. Absent when billingPortalUrl carries a single-use link instead.expires_at(DateTime): The time when the single-use link inbillingPortalUrlexpires, 10 minutes after it was created. After this time the URL no longer works and you must create a new session.manage_token(Option<String>): A short-lived token that authorizes updates to the buyer profile from the billing portal. Returned only with sessionToken.
- On failure, responds with
SdkError<CreateBillingPortalSessionError>
Source§impl Client
impl Client
Sourcepub fn create_metric(&self) -> CreateMetricFluentBuilder
pub fn create_metric(&self) -> CreateMetricFluentBuilder
Constructs a fluent builder for the CreateMetric operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app the metric belongs to.name(impl Into<String>)/set_name(Option<String>):
required: true
A human-readable display name for the metric (for example,Riddles Solved).description(impl Into<String>)/set_description(Option<String>):
required: true
A description of what the metric measures.event_type(impl Into<String>)/set_event_type(Option<String>):
required: true
The event type this metric aggregates. Must match the eventType sent on PutEvent.unit_name(impl Into<String>)/set_unit_name(Option<String>):
required: true
The unit of measure for the metric (for example, “requests” or “tokens”).definition(MetricDefinition)/set_definition(Option<MetricDefinition>):
required: true
The aggregation definition: filters, aggregation function, grouping, and period.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
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.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: false
Optional tags to add to the metric when it is created. Tagging on create also requires permission for appmonetization:TagResource.
- On success, responds with
CreateMetricOutputwith field(s):metric(Option<Metric>): The newly created metric, in the app’s draft. It goes live on the next app-level PublishDraft.
- On failure, responds with
SdkError<CreateMetricError>
Source§impl Client
impl Client
Sourcepub fn create_one_time_checkout_session(
&self,
) -> CreateOneTimeCheckoutSessionFluentBuilder
pub fn create_one_time_checkout_session( &self, ) -> CreateOneTimeCheckoutSessionFluentBuilder
Constructs a fluent builder for the CreateOneTimeCheckoutSession operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app the purchase is for.user_id(impl Into<String>)/set_user_id(Option<String>):
required: true
The ID of the end user making the purchase. Do not include personally identifiable or otherwise sensitive data in this value.items(CheckoutItem)/set_items(Option<Vec::<CheckoutItem>>):
required: true
The purchasables to buy. Each line is a usage pack or add-on and the number of units to buy.return_url(impl Into<String>)/set_return_url(Option<String>):
required: true
The URL the buyer’s browser is sent to after they complete payment at checkout (the checkout page’s success-redirect target). A one-time purchase always requires payment, so there is no cancel-redirect field on this operation.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
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.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox.
- On success, responds with
CreateOneTimeCheckoutSessionOutputwith field(s):checkout_url(String): An absolute HTTP or HTTPS URL the buyer’s browser is redirected to in order to complete payment.expires_at(DateTime): The time when the checkout session expires.checkout_session_id(String): The ID of the created checkout session.
- On failure, responds with
SdkError<CreateOneTimeCheckoutSessionError>
Source§impl Client
impl Client
Sourcepub fn create_one_time_price(&self) -> CreateOneTimePriceFluentBuilder
pub fn create_one_time_price(&self) -> CreateOneTimePriceFluentBuilder
Constructs a fluent builder for the CreateOneTimePrice operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app the one-time price belongs to.definition(OneTimePriceDefinition)/set_definition(Option<OneTimePriceDefinition>):
required: true
The definition of the one-time price to create, including its display name, price, metric, and credited capacity.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
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.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: false
Optional tags to add to the one-time price when it is created. Tagging on create also requires permission for appmonetization:TagResource.
- On success, responds with
CreateOneTimePriceOutputwith field(s):one_time_price(Option<OneTimePrice>): The newly created one-time price.
- On failure, responds with
SdkError<CreateOneTimePriceError>
Source§impl Client
impl Client
Sourcepub fn create_plan(&self) -> CreatePlanFluentBuilder
pub fn create_plan(&self) -> CreatePlanFluentBuilder
Constructs a fluent builder for the CreatePlan operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app the plan belongs to.definition(PlanDefinition)/set_definition(Option<PlanDefinition>):
required: true
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.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
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.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: false
Optional tags to add to the plan when it is created. Tagging on create also requires permission for appmonetization:TagResource.
- On success, responds with
CreatePlanOutputwith field(s):plan(Option<Plan>): The newly created plan, carrying its server-generated planId. It exists on the draft (DRAFT) offering until it is published.
- On failure, responds with
SdkError<CreatePlanError>
Source§impl Client
impl Client
Sourcepub fn create_subscription_checkout_session(
&self,
) -> CreateSubscriptionCheckoutSessionFluentBuilder
pub fn create_subscription_checkout_session( &self, ) -> CreateSubscriptionCheckoutSessionFluentBuilder
Constructs a fluent builder for the CreateSubscriptionCheckoutSession operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app the subscription is for.user_id(impl Into<String>)/set_user_id(Option<String>):
required: true
The ID of the end user being subscribed. Do not include personally identifiable or otherwise sensitive data in this value.plan_id(impl Into<String>)/set_plan_id(Option<String>):
required: false
The plan to subscribe to or change to. Absent to open the hosted pricing page for the buyer to choose; the response then carries planSelectionRequired.pricingUrl.return_url(impl Into<String>)/set_return_url(Option<String>):
required: true
The URL the buyer’s browser is sent to after they complete payment at checkout. If the buyer is sent to a hosted checkout page, this is that page’s success-redirect target. If you omitplanId, the buyer chooses a plan on a hosted pricing page. After that checkout, the buyer returns to the hosted pages, not to this URL.refresh_url(impl Into<String>)/set_refresh_url(Option<String>):
required: true
The URL the buyer’s browser is sent to if they cancel or abandon the hosted checkout page without completing payment (the checkout page’s cancel-redirect target). Point it at a page where the buyer can retry. If you omitplanId, the buyer chooses a plan on a hosted pricing page. After that checkout, the buyer returns to the hosted pages, not to this URL.session_duration_seconds(i32)/set_session_duration_seconds(Option<i32>):
required: false
The lifetime of the hosted session, in seconds, counted from this call. Omit to use the service default. It does not set how long pricingUrl works; see expiresAt.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
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.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox.
- On success, responds with
CreateSubscriptionCheckoutSessionOutputwith field(s):outcome(Option<CheckoutOutcome>): The outcome of the request. Exactly one member of the union is set.
- On failure, responds with
SdkError<CreateSubscriptionCheckoutSessionError>
Source§impl Client
impl Client
Sourcepub fn delete_app(&self) -> DeleteAppFluentBuilder
pub fn delete_app(&self) -> DeleteAppFluentBuilder
Constructs a fluent builder for the DeleteApp operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app to delete. You can identify the app by either its ID or its Amazon Resource Name (ARN). If you provide both, they must refer to the same app.identifier(impl Into<String>)/set_identifier(Option<String>):
required: false
The Amazon Resource Name (ARN) of the app. You can identify the app by either its ID or its ARN. If you provide both, they must refer to the same app. A sandbox ARN names the app’s sandbox; if you also send scope, the two must name the same environment.scope(RequestScope)/set_scope(Option<RequestScope>):
required: false
The environment to act on: live or sandbox. Optional. You can name the environment with this member, with a sandbox resource ARN, or both; if you send both they must name the same environment, or the request is rejected.
- On success, responds with
DeleteAppOutputwith field(s):app_id(String): The ID of the deleted app.status(AppStatus): The resource status after deletion.arn(Option<String>): The resource ARN of the deleted app.
- On failure, responds with
SdkError<DeleteAppError>
Source§impl Client
impl Client
Sourcepub fn delete_one_time_price(&self) -> DeleteOneTimePriceFluentBuilder
pub fn delete_one_time_price(&self) -> DeleteOneTimePriceFluentBuilder
Constructs a fluent builder for the DeleteOneTimePrice operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app the one-time price belongs to.one_time_price_id(impl Into<String>)/set_one_time_price_id(Option<String>):
required: true
The ID of the one-time price to delete.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
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.
- On success, responds with
DeleteOneTimePriceOutput - On failure, responds with
SdkError<DeleteOneTimePriceError>
Source§impl Client
impl Client
Sourcepub fn delete_third_party_cost(&self) -> DeleteThirdPartyCostFluentBuilder
pub fn delete_third_party_cost(&self) -> DeleteThirdPartyCostFluentBuilder
Constructs a fluent builder for the DeleteThirdPartyCost operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.cost_id(impl Into<String>)/set_cost_id(Option<String>):
required: true
The ID of the cost to remove.
- On success, responds with
DeleteThirdPartyCostOutput - On failure, responds with
SdkError<DeleteThirdPartyCostError>
Source§impl Client
impl Client
Sourcepub fn get_app(&self) -> GetAppFluentBuilder
pub fn get_app(&self) -> GetAppFluentBuilder
Constructs a fluent builder for the GetApp operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app to read. You can identify the app by either its ID or its Amazon Resource Name (ARN). If you provide both, they must refer to the same app.identifier(impl Into<String>)/set_identifier(Option<String>):
required: false
The Amazon Resource Name (ARN) of the app. You can identify the app by either its ID or its ARN. If you provide both, they must refer to the same app. A sandbox ARN names the app’s sandbox; if you also send scope, the two must name the same environment.scope(RequestScope)/set_scope(Option<RequestScope>):
required: false
The environment to act on: live or sandbox. Optional. You can name the environment with this member, with a sandbox resource ARN, or both; if you send both they must name the same environment, or the request is rejected.
- On success, responds with
GetAppOutputwith field(s):app(Option<App>): The requested app.
- On failure, responds with
SdkError<GetAppError>
Source§impl Client
impl Client
Sourcepub fn get_app_infra_cost_summary(&self) -> GetAppInfraCostSummaryFluentBuilder
pub fn get_app_infra_cost_summary(&self) -> GetAppInfraCostSummaryFluentBuilder
Constructs a fluent builder for the GetAppInfraCostSummary operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.started_at(DateTime)/set_started_at(Option<DateTime>):
required: true
Start of the reporting window.ended_at(DateTime)/set_ended_at(Option<DateTime>):
required: true
End of the reporting window. Must be after startedAt, at most 720 hours after it, and not in the future.cost_type(CostType)/set_cost_type(Option<CostType>):
required: true
Specifies which cost data to return.group_by(InfraCostSummaryDimension)/set_group_by(Option<InfraCostSummaryDimension>):
required: false
The breakdown dimension. Defaults to SERVICE when omitted.filter_by(InfraCostSummaryDimension, Vec::<String>)/set_filter_by(Option<HashMap::<InfraCostSummaryDimension, Vec::<String>>>):
required: false
Filter constraints keyed by dimension. A filter dimension may differ from groupBy.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox.
- On success, responds with
GetAppInfraCostSummaryOutputwith field(s):app_id(String): The ID of the app.cost_type(CostType): The cost data that this summary reflects (echoes the request).currency(Currency): The ISO 4217 currency code of the cost amounts.group_by(InfraCostSummaryDimension): The dimension that the summary is grouped by.total(String): The total cost for the window.groups(Vec::<CostGroup>): One row per value of the groupBy dimension (cost per service, user, or UTC day).started_at(DateTime): Start of the reporting window the summary covers.ended_at(DateTime): End of the reporting window the summary covers.updated_at(DateTime): The time the summary was last updated.
- On failure, responds with
SdkError<GetAppInfraCostSummaryError>
Source§impl Client
impl Client
Sourcepub fn get_app_payment_registration(
&self,
) -> GetAppPaymentRegistrationFluentBuilder
pub fn get_app_payment_registration( &self, ) -> GetAppPaymentRegistrationFluentBuilder
Constructs a fluent builder for the GetAppPaymentRegistration operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox.
- On success, responds with
GetAppPaymentRegistrationOutputwith field(s):app_payment_registration(Option<AppPaymentRegistration>): The app’s current payment registration.
- On failure, responds with
SdkError<GetAppPaymentRegistrationError>
Source§impl Client
impl Client
Sourcepub fn get_app_revenue_summary(&self) -> GetAppRevenueSummaryFluentBuilder
pub fn get_app_revenue_summary(&self) -> GetAppRevenueSummaryFluentBuilder
Constructs a fluent builder for the GetAppRevenueSummary operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.period(impl Into<String>)/set_period(Option<String>):
required: false
The billing period, in “YYYY-MM” form. Defaults to the current month when omitted.group_by(RevenueSummaryDimension)/set_group_by(Option<RevenueSummaryDimension>):
required: false
The breakdown dimension. Defaults to PLAN when omitted.filter_by(RevenueSummaryDimension, Vec::<String>)/set_filter_by(Option<HashMap::<RevenueSummaryDimension, Vec::<String>>>):
required: false
Filter constraints keyed by dimension. A filter dimension may differ from groupBy.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox.
- On success, responds with
GetAppRevenueSummaryOutputwith field(s):app_id(String): The ID of the app.period(String): The billing period, in “YYYY-MM” form, that the summary covers.currency(Currency): The ISO 4217 currency code of the revenue amounts.group_by(RevenueSummaryDimension): The dimension that the summary is grouped by.total_revenue(String): The total revenue for the period, as the sum of subscription and usage revenue.subscription_revenue(String): The subscription revenue for the period.usage_revenue(String): The usage-based revenue for the period.groups(Vec::<RevenueGroup>): One row per value of the groupBy dimension (revenue per plan).updated_at(DateTime): The time the summary was last updated.
- On failure, responds with
SdkError<GetAppRevenueSummaryError>
Source§impl Client
impl Client
Sourcepub fn get_app_subscription_summary(
&self,
) -> GetAppSubscriptionSummaryFluentBuilder
pub fn get_app_subscription_summary( &self, ) -> GetAppSubscriptionSummaryFluentBuilder
Constructs a fluent builder for the GetAppSubscriptionSummary operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.group_by(SubscriptionSummaryDimension)/set_group_by(Option<SubscriptionSummaryDimension>):
required: false
The breakdown dimension. Defaults to STATUS when omitted.filter_by(SubscriptionSummaryDimension, Vec::<String>)/set_filter_by(Option<HashMap::<SubscriptionSummaryDimension, Vec::<String>>>):
required: false
Filter constraints keyed by dimension. A filter dimension may differ from groupBy.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox.
- On success, responds with
GetAppSubscriptionSummaryOutputwith field(s):app_id(String): The ID of the app.group_by(SubscriptionSummaryDimension): The dimension that the summary is grouped by.total_subscribers(i32): The total number of subscribers across the app.groups(Vec::<SubscriptionGroup>): One row per value of the groupBy dimension (subscriber count per status or per plan).updated_at(DateTime): The time the summary was last updated.
- On failure, responds with
SdkError<GetAppSubscriptionSummaryError>
Source§impl Client
impl Client
Sourcepub fn get_app_usage_summary(&self) -> GetAppUsageSummaryFluentBuilder
pub fn get_app_usage_summary(&self) -> GetAppUsageSummaryFluentBuilder
Constructs a fluent builder for the GetAppUsageSummary operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.started_at(DateTime)/set_started_at(Option<DateTime>):
required: true
Start of the reporting window.ended_at(DateTime)/set_ended_at(Option<DateTime>):
required: true
End of the reporting window. Must be after startedAt, at most 720 hours after it, and not in the future.group_by(UsageSummaryDimension)/set_group_by(Option<UsageSummaryDimension>):
required: false
The breakdown dimension. Defaults to METRIC when omitted.filter_by(UsageSummaryDimension, Vec::<String>)/set_filter_by(Option<HashMap::<UsageSummaryDimension, Vec::<String>>>):
required: false
Filter constraints keyed by dimension. A filter dimension may differ from groupBy.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox.
- On success, responds with
GetAppUsageSummaryOutputwith field(s):app_id(String): The ID of the app.group_by(UsageSummaryDimension): The dimension that the summary is grouped by.total_events(i64): The total number of usage events counted across the window.groups(Vec::<UsageGroup>): One row per value of the groupBy dimension (usage per metric, user, or UTC day).started_at(DateTime): Start of the reporting window the summary covers.ended_at(DateTime): End of the reporting window the summary covers.updated_at(DateTime): The time the summary was last updated.
- On failure, responds with
SdkError<GetAppUsageSummaryError>
Source§impl Client
impl Client
Sourcepub fn get_entitlement_decision(&self) -> GetEntitlementDecisionFluentBuilder
pub fn get_entitlement_decision(&self) -> GetEntitlementDecisionFluentBuilder
Constructs a fluent builder for the GetEntitlementDecision operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.user_id(impl Into<String>)/set_user_id(Option<String>):
required: true
An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value.event_type(impl Into<String>)/set_event_type(Option<String>):
required: true
The type of action the user is attempting, used to determine the applicable plan capability and quota. Use the same event type you will send on the event.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
The environment of the app that this operation applies to. Specify live to use the live app, or sandbox to use the app’s isolated test environment.quantity(impl Into<String>)/set_quantity(Option<String>):
required: true
The number of units the pending action will consume, as a non-negative decimal string (the same Quantity shape PutEvent uses). Send the real amount if known, otherwise your best upper estimate (for example a request’s max tokens). Used when a metric counts events or sums or maxes the event quantity itself. The decision is DENY when usage already reached the limit, or when folding this event in would push it past (SUM and COUNT add the increment; MAX takes the larger of current usage and the increment).properties(impl Into<String>, impl Into<String>)/set_properties(Option<HashMap::<String, String>>):
required: false
The same event properties you will send on the event. Each metric’s filter is applied to them, and a summed or maxed field value is read from them. Omit them or send {} when the event has none; a metric that sums or maxes a property then rejects the check, as PutEvent rejects the event. Do not include personally identifiable or otherwise sensitive data in these values.
- On success, responds with
GetEntitlementDecisionOutputwith field(s):decision(EntitlementDecision): The decision indicating whether the user may perform the action.reason(Option<EntitlementReason>): The reason behind the decision.plan_id(Option<String>): The ID of the plan the decision was evaluated against, when the user has a subscription.metrics(Option<Vec::<EntitlementMetricStatus>>): The per-metric quota status relevant to the decision.
- On failure, responds with
SdkError<GetEntitlementDecisionError>
Source§impl Client
impl Client
Sourcepub fn get_metric(&self) -> GetMetricFluentBuilder
pub fn get_metric(&self) -> GetMetricFluentBuilder
Constructs a fluent builder for the GetMetric operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.metric_id(impl Into<String>)/set_metric_id(Option<String>):
required: true
The ID of the metric to retrieve.stage(PlanStage)/set_stage(Option<PlanStage>):
required: false
The offering stage to read the metric from: DRAFT (the latest draft) or PUBLISHED (the offering customers see). Absent: PUBLISHED when scope=live, DRAFT when scope=sandbox.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox. live reads the published offering by default; sandbox reads the app’s draft.
- On success, responds with
GetMetricOutputwith field(s):metric(Option<Metric>): The requested metric.
- On failure, responds with
SdkError<GetMetricError>
Source§impl Client
impl Client
Sourcepub fn get_metric_usage(&self) -> GetMetricUsageFluentBuilder
pub fn get_metric_usage(&self) -> GetMetricUsageFluentBuilder
Constructs a fluent builder for the GetMetricUsage operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.user_id(impl Into<String>)/set_user_id(Option<String>):
required: true
The end user whose usage is read. Do not include personally identifiable or otherwise sensitive data in this value.started_at(DateTime)/set_started_at(Option<DateTime>):
required: true
Inclusive start of the reporting window (half-open [startedAt, endedAt)).ended_at(DateTime)/set_ended_at(Option<DateTime>):
required: true
Exclusive end of the reporting window. Must be after startedAt; the window may span at most 744 hours (31 days, the longest monthly billing period). Must not be in the future beyond a small clock-skew allowance.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox. sandbox reads the app’s isolated test environment. Usage is kept separately per environment.max_results(i32)/set_max_results(Option<i32>):
required: false
Maximum number of per-metric usage entries to return in this page (1-25, default 25).next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
Opaque continuation token from a prior response. The window (startedAt/endedAt) must be unchanged across a pagination sequence.
- On success, responds with
GetMetricUsageOutputwith field(s):usage(Vec::<MetricUsage>): One entry per metric in this page, carrying its usage over the window. A metric with no events in the window is returned with usage = 0.next_token(Option<String>): Opaque continuation token. Present when more metrics remain; pass it back (with the same window) to read the next page. Absent on the last page.
- On failure, responds with
SdkError<GetMetricUsageError>
Source§impl Client
impl Client
Sourcepub fn get_one_time_price(&self) -> GetOneTimePriceFluentBuilder
pub fn get_one_time_price(&self) -> GetOneTimePriceFluentBuilder
Constructs a fluent builder for the GetOneTimePrice operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app the one-time price belongs to.one_time_price_id(impl Into<String>)/set_one_time_price_id(Option<String>):
required: true
The ID of the one-time price to return.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox. live reads the published offering; sandbox reads the app’s draft (what the sandbox runs).
- On success, responds with
GetOneTimePriceOutputwith field(s):one_time_price(Option<OneTimePrice>): The requested one-time price.
- On failure, responds with
SdkError<GetOneTimePriceError>
Source§impl Client
impl Client
Sourcepub fn get_plan(&self) -> GetPlanFluentBuilder
pub fn get_plan(&self) -> GetPlanFluentBuilder
Constructs a fluent builder for the GetPlan operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.plan_id(impl Into<String>)/set_plan_id(Option<String>):
required: true
The identifier of the plan. AWS App Monetization generates this value when you create the plan. It is unique within the app and is never reused. Treat it as opaque.stage(PlanStage)/set_stage(Option<PlanStage>):
required: false
The offering stage to read the plan from: DRAFT (the latest draft) or PUBLISHED (the offering customers see). Absent: PUBLISHED when scope=live, DRAFT when scope=sandbox.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox. live reads the published offering by default; sandbox reads the app’s draft (what the sandbox runs).
- On success, responds with
GetPlanOutputwith field(s):plan(Option<Plan>): The requested plan.
- On failure, responds with
SdkError<GetPlanError>
Source§impl Client
impl Client
Sourcepub fn get_plan_recommendation(&self) -> GetPlanRecommendationFluentBuilder
pub fn get_plan_recommendation(&self) -> GetPlanRecommendationFluentBuilder
Constructs a fluent builder for the GetPlanRecommendation operation.
- The fluent builder is configurable:
app_name(impl Into<String>)/set_app_name(Option<String>):
required: false
Display name of the app, used in the rendered text. Absent:your app.segment(CustomerSegment)/set_segment(Option<CustomerSegment>):
required: true
Who buys the app.app_type(PlanRecommendationAppType)/set_app_type(Option<PlanRecommendationAppType>):
required: true
Kind of app. It sets the service’s usage and value benchmarks for this kind of app.value_kind(ValueKind)/set_value_kind(Option<ValueKind>):
required: false
What kind of value the app gives its users. Absent: PRODUCTIVITY. An experiential app has no time or money value, so with EXPERIENTIAL each ofactions\[\].minutesSaved,actions\[\].moneySaved,actions\[\].valuePerUse,hourlyRateandvalueSharethat is sent is rejected. With EXPERIENTIAL, noplanOptions.publishedPriceand no comparables used, a CONSUMER app is valued at the typical monthly price of public apps of itsappType(there is none for API_WRAPPER), shown as an estimate. That estimate is not used when it is too close to a typical user’s usage cost, so the estimate alone never makes the verdict NOT_MONETIZABLE. The estimate exists only for CONSUMER: a PROSUMER or ENTERPRISE experiential app with noplanOptions.publishedPriceand no usable comparables is priced from cost (verdict COST_ONLY, or COST_NOT_CHECKED when costs are not checked: nounitCost, orcosts.sourceNONE; confidence LOW).actions(BillableAction)/set_actions(Option<Vec::<BillableAction>>):
required: true
The things that your app charges for, each with its cost to serve, typical usage, and value to a customer. Names must be unique. Give a value basis (minutesSaved,moneySavedorvaluePerUse, one per action) on every action or on none: when no action has a value basis and there is no experiential estimate (seevalueKind), the price is based on cost (and comparables, if opted in, orplanOptions.publishedPrice) and the confidence is LOW. GiveunitCoston every action or on none.hourly_rate(f64)/set_hourly_rate(Option<f64>):
required: false
What one hour of a customer’s time is worth, in USD: the hourly rate of the person whose time the app saves. Required when any action hasminutesSaved. There is no default. It is used only withactions\[\].minutesSaved: sent when no action hasminutesSaved, or withvalueKindEXPERIENTIAL, it is rejected.value_share(f64)/set_value_share(Option<f64>):
required: false
The most a typical customer would pay for the app, as a share of the time value it saves them (minutesSaved/ 60 timeshourlyRate). Above 1 when the minutes understate the value. The value of one use of an action withminutesSavedisminutesSaved/ 60 timeshourlyRatetimes the share; the share does not apply tomoneySavedorvaluePerUse. When an action’s value is above 0, each outside option’smonthlyCostis also weighed at this share (seeOutsideOption). Absent: the service’s benchmark share. For PROSUMER this value scales the service’s benchmark share instead of replacing it. With usable comparables the recommended price uses the service’s benchmark share for comparables instead, but this value still sets the price from the app’s value alone, which the confidence and the texts compare with. Rejected unless an action’sminutesSaved,moneySavedorvaluePerUseis above 0 and, besides, an action hasminutesSaved(0 counts) or an outside option’smonthlyCostis above 0: otherwise it changes nothing (with no value above 0 there is no value estimate, and an outside option counts in full). Rejected withvalueKindEXPERIENTIAL.features(FeatureScores)/set_features(Option<FeatureScores>):
required: false
How this app scores on the characteristics customers decide on, and how much each one matters. Required when a comparable or an outside option inalternativesis scored byfeatures, and used only then: sent when no comparable and no outside option is scored byfeatures, it is rejected. A comparable withalternatives.comparablesOptInOPTED_OUT is validated but not used, sofeaturesscored only against such comparables is validated with them and changes nothing. Absent: every comparable and outside option is scored by itsquality.costs(CostInputs)/set_costs(Option<CostInputs>):
required: false
Cost inputs beyond each action’sunitCost: where the costs came from, any costs that could not be priced, fixed monthly cost and target margins. Absent:costs.sourceis inferred fromactions\[\].unitCost, and the costs count as complete but unconfirmed (seecosts.unknown).alternatives(AlternativeInputs)/set_alternatives(Option<AlternativeInputs>):
required: false
What customers could use instead of the app: comparable apps and what they do without any product. Absent: no comparables (comparablesOptInOPTED_OUT) and no outside options.market(MarketInputs)/set_market(Option<MarketInputs>):
required: false
Who the customers are, how many there are and, for a deployed app, how many pay today; and any checkout drop-off rates to use instead of the benchmarks. Absent: each member’s default (seeMarketInputs).plan_options(PlanOptions)/set_plan_options(Option<PlanOptions>):
required: false
The pricing model and optional plans to consider, prices to evaluate, and the developer’s own price (publishedPrice). Absent: each member’s default (seePlanOptions); the service chooses the pricing model and plans.context(RequestContext)/set_context(Option<RequestContext>):
required: false
Where the inputs came from, and notes on them. Changes no price, plan, verdict or confidence label: only howsummaryanddetailslabel and word the inputs. Absent: the rendered text uses default labels.
- On success, responds with
GetPlanRecommendationOutputwith field(s):pricing_model(PricingModel): The recommended pricing model. Equals the request’splanOptions.pricingModelPreferencewhenplanOptions.preferenceOutcomeis HONORED.recommended_price(Option<Price>): Recommended monthly price of the main paid plan, for FLAT and TIERED. When an annual plan is recommended, it is inplanswithbillingCycleANNUAL; this is still the monthly price.recommended_price_range(Option<PriceRange>): Prices whose modeled profit is within a few percent of the best, when the profit curve is flat near its top.recommendedPriceis the middle of this range.unit_prices(Option<Vec::<UnitPrice>>): Price per use of each action, for PER_USE and PER_USE_SPLIT.plans(Vec::<RecommendedPlan>): The recommended plans. To create them, map eachactionNameto the app’s metric ID.credit_packs(Vec::<RecommendedCreditPack>): One-time credit packs sold alongside the plans. Empty unless the request’splanOptions.creditPackInclusionwas INCLUDE.verdict(RecommendationVerdict): Viability verdict.confidence(RecommendationConfidence): Confidence in the recommendation.confidence_reason(String): Why the confidence is what it is.basis(String): What the price is based on: modeled demand, or, without a value estimate, cost or comparables.costs(Option<CostOutcome>): How the recommended price relates to cost to serve.alternatives(Option<AlternativesOutcome>): Which comparable apps were used and which were not.plan_options(Option<PlanOptionsOutcome>): What became of the request’splanOptions: the pricing-model preference, the Free and Max plans and the evaluated plan prices.analysis(Option<PricingAnalysis>): How the recommendation compares with other pricing models.recommendation_version(String): Identifies the recommendation model and benchmark data behind this answer, for support. It changes when either changes.summary(String): The recommendation as text for the developer: the price, the plans, the reasons and the assumptions behind them.details(String): The same text assummarywith a Details section on how the recommendation was worked out, for a developer who asks for details. Some figures appear only insummaryanddetails.
- On failure, responds with
SdkError<GetPlanRecommendationError>
Source§impl Client
impl Client
Sourcepub fn get_subscription(&self) -> GetSubscriptionFluentBuilder
pub fn get_subscription(&self) -> GetSubscriptionFluentBuilder
Constructs a fluent builder for the GetSubscription operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.user_id(impl Into<String>)/set_user_id(Option<String>):
required: true
An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox.
- On success, responds with
GetSubscriptionOutputwith field(s):subscription(Option<Subscription>): The user’s current subscription.pending_change(Option<PendingChange>): The scheduled change to the subscription, if one is pending; null otherwise.current_period_ends_at(Option<DateTime>): The time when the current billing period ends and the next begins. Pending changes take effect and usage quotas reset at this time. Null for one-time subscriptions.
- On failure, responds with
SdkError<GetSubscriptionError>
Source§impl Client
impl Client
Sourcepub fn get_subscription_history(&self) -> GetSubscriptionHistoryFluentBuilder
pub fn get_subscription_history(&self) -> GetSubscriptionHistoryFluentBuilder
Constructs a fluent builder for the GetSubscriptionHistory operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.user_id(impl Into<String>)/set_user_id(Option<String>):
required: true
An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value.effective_after(DateTime)/set_effective_after(Option<DateTime>):
required: false
Returns records whose effectiveDate is at or after this instant (inclusive).effective_before(DateTime)/set_effective_before(Option<DateTime>):
required: false
Returns records whose effectiveDate is before this instant (exclusive).max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of items to return in a single page.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox.
- On success, responds with
GetSubscriptionHistoryOutputwith field(s):items(Vec::<Subscription>): The page of historical subscription records for the user.next_token(Option<String>): An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.
- On failure, responds with
SdkError<GetSubscriptionHistoryError>
Source§impl Client
impl Client
Sourcepub fn get_third_party_cost(&self) -> GetThirdPartyCostFluentBuilder
pub fn get_third_party_cost(&self) -> GetThirdPartyCostFluentBuilder
Constructs a fluent builder for the GetThirdPartyCost operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.cost_id(impl Into<String>)/set_cost_id(Option<String>):
required: true
The ID of the cost to return.
- On success, responds with
GetThirdPartyCostOutputwith field(s):item(Option<ThirdPartyCostItem>): The requested third-party cost.
- On failure, responds with
SdkError<GetThirdPartyCostError>
Source§impl Client
impl Client
Sourcepub fn list_apps(&self) -> ListAppsFluentBuilder
pub fn list_apps(&self) -> ListAppsFluentBuilder
Constructs a fluent builder for the ListApps operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of items to return in a single page. Valid range: 1 to 100.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.
- On success, responds with
ListAppsOutputwith field(s):apps(Vec::<App>): The page of apps owned by the caller’s account.next_token(Option<String>): An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.
- On failure, responds with
SdkError<ListAppsError>
Source§impl Client
impl Client
Sourcepub fn list_metrics(&self) -> ListMetricsFluentBuilder
pub fn list_metrics(&self) -> ListMetricsFluentBuilder
Constructs a fluent builder for the ListMetrics operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.stage(PlanStage)/set_stage(Option<PlanStage>):
required: false
The offering stage to list metrics from: DRAFT (the latest authored draft) or PUBLISHED (the published offering customers see). Absent: PUBLISHED when scope=live, DRAFT when scope=sandbox. A stage with nothing published lists as empty.max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of items to return in a single page. Valid range is 1 to 100.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox. live reads the published offering by default; sandbox reads the app’s draft (what the sandbox runs).
- On success, responds with
ListMetricsOutputwith field(s):metrics(Vec::<Metric>): A list of metrics.next_token(Option<String>): An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.
- On failure, responds with
SdkError<ListMetricsError>
Source§impl Client
impl Client
Sourcepub fn list_one_time_prices(&self) -> ListOneTimePricesFluentBuilder
pub fn list_one_time_prices(&self) -> ListOneTimePricesFluentBuilder
Constructs a fluent builder for the ListOneTimePrices operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app whose one-time prices are listed.stage(PlanStage)/set_stage(Option<PlanStage>):
required: false
The offering stage to list one-time prices from: DRAFT (the latest authored draft) or PUBLISHED (the published offering customers see). Absent: PUBLISHED when scope=live, DRAFT when scope=sandbox.max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of one-time prices to return in a single call. To retrieve the remaining results, make another call with the nextToken value that is returned in the response.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
The pagination token that is returned by a previous call. Use it to retrieve the next page of results. Omit this parameter on the first call.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox. live reads the published offering by default; sandbox reads the app’s draft (what the sandbox runs).
- On success, responds with
ListOneTimePricesOutputwith field(s):one_time_prices(Vec::<OneTimePrice>): The one-time prices for the app.next_token(Option<String>): The pagination token to use in a subsequent call to retrieve the next page of results. This value is absent when there are no more results to return.
- On failure, responds with
SdkError<ListOneTimePricesError>
Source§impl Client
impl Client
Sourcepub fn list_plans(&self) -> ListPlansFluentBuilder
pub fn list_plans(&self) -> ListPlansFluentBuilder
Constructs a fluent builder for the ListPlans operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.stage(PlanStage)/set_stage(Option<PlanStage>):
required: false
Which offering stage to list plans from: DRAFT (the latest authored draft) or PUBLISHED (the published offering customers see). Absent: PUBLISHED when scope=live, DRAFT when scope=sandbox. A stage with nothing published yet lists as empty.max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of items to return in a single page. Valid range is 1 to 100.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox. live reads the published offering by default; sandbox reads the app’s draft (what the sandbox runs).
- On success, responds with
ListPlansOutputwith field(s):plans(Vec::<Plan>): The page of plans for the app; each carries the stage it was read from.next_token(Option<String>): An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.
- On failure, responds with
SdkError<ListPlansError>
Source§impl Client
impl Client
Sourcepub fn list_subscriptions(&self) -> ListSubscriptionsFluentBuilder
pub fn list_subscriptions(&self) -> ListSubscriptionsFluentBuilder
Constructs a fluent builder for the ListSubscriptions operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of items to return in a single page.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox.
- On success, responds with
ListSubscriptionsOutputwith field(s):items(Vec::<SubscriptionSummary>): The page of subscription summaries for the app.next_token(Option<String>): An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.
- On failure, responds with
SdkError<ListSubscriptionsError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: true
ARN of the app, pricing plan, billing metric or one-time price whose tags to list.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(HashMap::<String, String>): The tags on the resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn list_third_party_costs(&self) -> ListThirdPartyCostsFluentBuilder
pub fn list_third_party_costs(&self) -> ListThirdPartyCostsFluentBuilder
Constructs a fluent builder for the ListThirdPartyCosts operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of items to return in a single page. Valid range: 1-100.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.
- On success, responds with
ListThirdPartyCostsOutputwith field(s):items(Vec::<ThirdPartyCostItem>): The app’s declared third-party costs.next_token(Option<String>): The pagination token; absent when there are no more results.
- On failure, responds with
SdkError<ListThirdPartyCostsError>
Source§impl Client
impl Client
Sourcepub fn publish_draft(&self) -> PublishDraftFluentBuilder
pub fn publish_draft(&self) -> PublishDraftFluentBuilder
Constructs a fluent builder for the PublishDraft operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.
- On success, responds with
PublishDraftOutputwith field(s):app(Option<App>): The app after publish. The published draft is now live.
- On failure, responds with
SdkError<PublishDraftError>
Source§impl Client
impl Client
Sourcepub fn put_aws_service_event(&self) -> PutAwsServiceEventFluentBuilder
pub fn put_aws_service_event(&self) -> PutAwsServiceEventFluentBuilder
Constructs a fluent builder for the PutAwsServiceEvent operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
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.user_id(impl Into<String>)/set_user_id(Option<String>):
required: true
An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value.service(impl Into<String>)/set_service(Option<String>):
required: true
The AWS service name that emitted the usage event.operation(impl Into<String>)/set_operation(Option<String>):
required: true
The AWS operation (API action) that produced the usage event.quantity(impl Into<String>)/set_quantity(Option<String>):
required: false
A non-negative decimal quantity represented as a string (for example, “1500” or “12.5”).timestamp(DateTime)/set_timestamp(Option<DateTime>):
required: true
The time the event occurred, as an ISO-8601 date-time in UTC (for example, “2026-07-26T15:04:05Z”).aws_region(impl Into<String>)/set_aws_region(Option<String>):
required: false
The AWS Region in which the event occurred.properties(impl Into<String>, impl Into<String>)/set_properties(Option<HashMap::<String, String>>):
required: false
The key/value properties carried on a usage event. Property values can be referenced by metric filters and grouping.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
The environment of the app that this operation applies to. Specify live to use the live app, or sandbox to use the app’s isolated test environment.
- On success, responds with
PutAwsServiceEventOutputwith field(s):event_id(String): The ID assigned to the recorded event.status(ServiceEventStatus): The processing status of the accepted event.
- On failure, responds with
SdkError<PutAwsServiceEventError>
Source§impl Client
impl Client
Sourcepub fn put_custom_charges(&self) -> PutCustomChargesFluentBuilder
pub fn put_custom_charges(&self) -> PutCustomChargesFluentBuilder
Constructs a fluent builder for the PutCustomCharges operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.user_id(impl Into<String>)/set_user_id(Option<String>):
required: true
The end user these charges bill.charges(CustomCharge)/set_charges(Option<Vec::<CustomCharge>>):
required: true
The custom charges to add to this user’s next invoice. Stored at the submitted grain; the service never splits a charge. Accepted all-or-nothing.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox.
- On success, responds with
PutCustomChargesOutputwith field(s):billing_period_start_at(DateTime): The billing period the service assigned these charges to, resolved from the user’s current subscription. The caller supplies no window; this reports where the charges landed.billing_period_end_at(DateTime): End of the assigned billing period.
- On failure, responds with
SdkError<PutCustomChargesError>
Source§impl Client
impl Client
Sourcepub fn put_event(&self) -> PutEventFluentBuilder
pub fn put_event(&self) -> PutEventFluentBuilder
Constructs a fluent builder for the PutEvent operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app the event belongs to.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
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.user_id(impl Into<String>)/set_user_id(Option<String>):
required: true
The ID of the end user the event is attributed to. Do not include personally identifiable or otherwise sensitive data in this value.event_type(impl Into<String>)/set_event_type(Option<String>):
required: true
The event type. Correlates with the event type of the metrics that aggregate it.quantity(impl Into<String>)/set_quantity(Option<String>):
required: true
The amount of usage the event represents, as a non-negative decimal string (for example, “1” or “12.5”).timestamp(DateTime)/set_timestamp(Option<DateTime>):
required: true
The time the event occurred.properties(impl Into<String>, impl Into<String>)/set_properties(Option<HashMap::<String, String>>):
required: false
The key/value properties carried on the event, usable in metric filters and grouping. When a metric sums or takes the max of a property, that property’s value must be a plain non-negative decimal (up to 15 digits before the point and 6 after; no sign, exponent, spaces, or commas, for example “1200” or “12.5”), and events that break this are rejected.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
The environment of the app that this operation applies to: the live app or the app’s isolated sandbox test environment.
- On success, responds with
PutEventOutputwith field(s):event_id(String): The server-assigned identifier for the recorded event.status(String): The status of the recorded event.
- On failure, responds with
SdkError<PutEventError>
Source§impl Client
impl Client
Sourcepub fn put_third_party_cost(&self) -> PutThirdPartyCostFluentBuilder
pub fn put_third_party_cost(&self) -> PutThirdPartyCostFluentBuilder
Constructs a fluent builder for the PutThirdPartyCost operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app the cost belongs to.cost_id(impl Into<String>)/set_cost_id(Option<String>):
required: false
The ID of the cost. Omit it to create a new cost, or supply an existing cost ID to update that cost in place.label(impl Into<String>)/set_label(Option<String>):
required: true
A human-readable label for the cost (for example, “Anthropic API”).amount(impl Into<String>)/set_amount(Option<String>):
required: true
A flat monthly amount as a decimal string (for example, “12.50”).frequency(ThirdPartyCostFrequency)/set_frequency(Option<ThirdPartyCostFrequency>):
required: false
How often the cost recurs. MONTHLY is the only value today.currency(Currency)/set_currency(Option<Currency>):
required: false
The currency of the amount. Defaults to USD when omitted (USD is the only supported currency).description(impl Into<String>)/set_description(Option<String>):
required: false
A free-form description of the cost.effective_from(impl Into<String>)/set_effective_from(Option<String>):
required: false
First month (YYYY-MM) the cost applies in. Absent means the cost has no start month.effective_to(impl Into<String>)/set_effective_to(Option<String>):
required: false
Last month (YYYY-MM) the cost applies in. Absent means the cost has no end month. When both are present, effectiveFrom must not be after effectiveTo.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
AWS App Monetization does not use this value for this operation. To retry without creating a duplicate cost, pass thecostIdreturned by the first call.
- On success, responds with
PutThirdPartyCostOutputwith field(s):item(Option<ThirdPartyCostItem>): The third-party cost that was created or updated.
- On failure, responds with
SdkError<PutThirdPartyCostError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: true
ARN of the app, pricing plan, billing metric or one-time price to tag.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: true
Tags to add. A tag whose key already exists on the resource has its value overwritten.
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: true
ARN of the app, pricing plan, billing metric or one-time price to remove tags from.tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: true
Keys of the tags to remove. A key that is not on the resource is ignored.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_app(&self) -> UpdateAppFluentBuilder
pub fn update_app(&self) -> UpdateAppFluentBuilder
Constructs a fluent builder for the UpdateApp operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app to update. You can identify the app by either its ID or its Amazon Resource Name (ARN). If you provide both, they must refer to the same app.name(impl Into<String>)/set_name(Option<String>):
required: false
A human-readable display name for the app.description(impl Into<String>)/set_description(Option<String>):
required: false
The new description. An empty string clears it; omitting the member keeps the current one.identifier(impl Into<String>)/set_identifier(Option<String>):
required: false
The Amazon Resource Name (ARN) of the app. You can identify the app by either its ID or its ARN. If you provide both, they must refer to the same app. A sandbox ARN names the app’s sandbox; if you also send scope, the two must name the same environment.scope(RequestScope)/set_scope(Option<RequestScope>):
required: false
The environment to act on: live or sandbox. Optional. You can name the environment with this member, with a sandbox resource ARN, or both; if you send both they must name the same environment, or the request is rejected.cost_tracking(CostTrackingConfiguration)/set_cost_tracking(Option<CostTrackingConfiguration>):
required: false
Optional cost-tracking configuration: the IAM role AWS App Monetization uses to track this app’s AWS costs. Passing a role also requires permission for iam:PassRole on it. You can send it with or without a new name or description.
- On success, responds with
UpdateAppOutputwith field(s):app(Option<App>): The updated app.
- On failure, responds with
SdkError<UpdateAppError>
Source§impl Client
impl Client
Sourcepub fn update_app_payment_registration(
&self,
) -> UpdateAppPaymentRegistrationFluentBuilder
pub fn update_app_payment_registration( &self, ) -> UpdateAppPaymentRegistrationFluentBuilder
Constructs a fluent builder for the UpdateAppPaymentRegistration operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app whose payment registration is updated.payment_registration_id(impl Into<String>)/set_payment_registration_id(Option<String>):
required: false
Binds the app to this payment registration, owned by the caller, or rebinds it from another one. Cannot be combined with legal-detail or contact members. Naming the registration the app already holds succeeds without a write.legal_name(impl Into<String>)/set_legal_name(Option<String>):
required: false
Your registered legal name.developer_address(DeveloperAddress)/set_developer_address(Option<DeveloperAddress>):
required: false
Your business address.tax_registration_number(impl Into<String>)/set_tax_registration_number(Option<String>):
required: false
Your tax registration number (for example, VAT, GST, or EIN).email(impl Into<String>)/set_email(Option<String>):
required: false
Your primary contact email for this registration, distinct from supportEmail (the address shown to customers).support_email(impl Into<String>)/set_support_email(Option<String>):
required: false
Your support email address, displayed in the invoice footer.display_name(impl Into<String>)/set_display_name(Option<String>):
required: false
Customer-facing name (doing-business-as) shown to buyers on invoices, distinct from legalName.support_phone(impl Into<String>)/set_support_phone(Option<String>):
required: false
Customer-facing support phone number shown to buyers on invoices.invoice_logo(Blob)/set_invoice_logo(Option<Blob>):
required: false
Logo printed on the seller’s invoices: raw PNG or JPEG bytes, up to 100 KiB. The image type is detected from the bytes. Write-only: the logo is not returned by GetAppPaymentRegistration.tax_registrations(TaxRegistration)/set_tax_registrations(Option<Vec::<TaxRegistration>>):
required: false
The jurisdictions where the seller is registered to collect tax.scope(RequestScope)/set_scope(Option<RequestScope>):
required: true
Required. The environment: live or sandbox.
- On success, responds with
UpdateAppPaymentRegistrationOutputwith field(s):app_payment_registration(Option<AppPaymentRegistration>): The app’s updated payment registration.
- On failure, responds with
SdkError<UpdateAppPaymentRegistrationError>
Source§impl Client
impl Client
Sourcepub fn update_metric(&self) -> UpdateMetricFluentBuilder
pub fn update_metric(&self) -> UpdateMetricFluentBuilder
Constructs a fluent builder for the UpdateMetric operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.metric_id(impl Into<String>)/set_metric_id(Option<String>):
required: true
The ID of the metric to update.name(impl Into<String>)/set_name(Option<String>):
required: false
A human-readable display name for the metric.description(impl Into<String>)/set_description(Option<String>):
required: false
A description of what the metric measures.event_type(impl Into<String>)/set_event_type(Option<String>):
required: false
The event type this metric aggregates.unit_name(impl Into<String>)/set_unit_name(Option<String>):
required: false
The unit of measure for the metric (for example, “requests”), in lowercase snake_case.definition(MetricDefinition)/set_definition(Option<MetricDefinition>):
required: false
The aggregation definition: filters, aggregation function, grouping, and period.
- On success, responds with
UpdateMetricOutputwith field(s):metric(Option<Metric>): The updated metric.
- On failure, responds with
SdkError<UpdateMetricError>
Source§impl Client
impl Client
Sourcepub fn update_one_time_price(&self) -> UpdateOneTimePriceFluentBuilder
pub fn update_one_time_price(&self) -> UpdateOneTimePriceFluentBuilder
Constructs a fluent builder for the UpdateOneTimePrice operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app the one-time price belongs to.one_time_price_id(impl Into<String>)/set_one_time_price_id(Option<String>):
required: true
The ID of the one-time price to update.definition(OneTimePriceDefinition)/set_definition(Option<OneTimePriceDefinition>):
required: true
The new definition to apply to the one-time price, including its display name, price, metric, and credited capacity.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
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.
- On success, responds with
UpdateOneTimePriceOutputwith field(s):one_time_price(Option<OneTimePrice>): The updated one-time price.
- On failure, responds with
SdkError<UpdateOneTimePriceError>
Source§impl Client
impl Client
Sourcepub fn update_plan(&self) -> UpdatePlanFluentBuilder
pub fn update_plan(&self) -> UpdatePlanFluentBuilder
Constructs a fluent builder for the UpdatePlan operation.
- The fluent builder is configurable:
app_id(impl Into<String>)/set_app_id(Option<String>):
required: true
The ID of the app.plan_id(impl Into<String>)/set_plan_id(Option<String>):
required: true
The identifier of the plan. AWS App Monetization generates this value when you create the plan. It is unique within the app and is never reused. Treat it as opaque.definition(PlanDefinition)/set_definition(Option<PlanDefinition>):
required: true
The plan’s updated pricing and packaging definition.
- On success, responds with
UpdatePlanOutputwith field(s):plan(Option<Plan>): The updated plan.
- On failure, responds with
SdkError<UpdatePlanError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Forget for Client
impl Freeze for Client
impl Move for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);