pub struct Builder { /* private fields */ }
Expand description

A builder for CreateWorkspaceInput.

Implementations§

Specifies whether the workspace can access Amazon Web Services resources in this Amazon Web Services account only, or whether it can also access Amazon Web Services resources in other accounts in the same organization. If you specify ORGANIZATION, you must specify which organizational units the workspace can access in the workspaceOrganizationalUnits parameter.

Examples found in repository?
src/client.rs (line 463)
462
463
464
465
        pub fn account_access_type(mut self, input: crate::model::AccountAccessType) -> Self {
            self.inner = self.inner.account_access_type(input);
            self
        }

Specifies whether the workspace can access Amazon Web Services resources in this Amazon Web Services account only, or whether it can also access Amazon Web Services resources in other accounts in the same organization. If you specify ORGANIZATION, you must specify which organizational units the workspace can access in the workspaceOrganizationalUnits parameter.

Examples found in repository?
src/client.rs (line 471)
467
468
469
470
471
472
473
        pub fn set_account_access_type(
            mut self,
            input: std::option::Option<crate::model::AccountAccessType>,
        ) -> Self {
            self.inner = self.inner.set_account_access_type(input);
            self
        }

A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.

Examples found in repository?
src/client.rs (line 476)
475
476
477
478
        pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.client_token(input.into());
            self
        }

A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.

Examples found in repository?
src/client.rs (line 481)
480
481
482
483
        pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_client_token(input);
            self
        }

The name of an IAM role that already exists to use with Organizations to access Amazon Web Services data sources and notification channels in other accounts in an organization.

Examples found in repository?
src/client.rs (line 486)
485
486
487
488
        pub fn organization_role_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.organization_role_name(input.into());
            self
        }

The name of an IAM role that already exists to use with Organizations to access Amazon Web Services data sources and notification channels in other accounts in an organization.

Examples found in repository?
src/client.rs (line 494)
490
491
492
493
494
495
496
        pub fn set_organization_role_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_organization_role_name(input);
            self
        }

If you specify SERVICE_MANAGED on AWS Grafana console, Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use Amazon Web Services data sources and notification channels. In CLI mode, the permissionType SERVICE_MANAGED will not create the IAM role for you.

If you specify CUSTOMER_MANAGED, you will manage those roles and permissions yourself. If you are creating this workspace in a member account of an organization that is not a delegated administrator account, and you want the workspace to access data sources in other Amazon Web Services accounts in the organization, you must choose CUSTOMER_MANAGED.

For more information, see Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels.

Examples found in repository?
src/client.rs (line 501)
500
501
502
503
        pub fn permission_type(mut self, input: crate::model::PermissionType) -> Self {
            self.inner = self.inner.permission_type(input);
            self
        }

If you specify SERVICE_MANAGED on AWS Grafana console, Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use Amazon Web Services data sources and notification channels. In CLI mode, the permissionType SERVICE_MANAGED will not create the IAM role for you.

If you specify CUSTOMER_MANAGED, you will manage those roles and permissions yourself. If you are creating this workspace in a member account of an organization that is not a delegated administrator account, and you want the workspace to access data sources in other Amazon Web Services accounts in the organization, you must choose CUSTOMER_MANAGED.

For more information, see Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels.

Examples found in repository?
src/client.rs (line 511)
507
508
509
510
511
512
513
        pub fn set_permission_type(
            mut self,
            input: std::option::Option<crate::model::PermissionType>,
        ) -> Self {
            self.inner = self.inner.set_permission_type(input);
            self
        }

The name of the CloudFormation stack set to use to generate IAM roles to be used for this workspace.

Examples found in repository?
src/client.rs (line 516)
515
516
517
518
        pub fn stack_set_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stack_set_name(input.into());
            self
        }

The name of the CloudFormation stack set to use to generate IAM roles to be used for this workspace.

Examples found in repository?
src/client.rs (line 524)
520
521
522
523
524
525
526
        pub fn set_stack_set_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_stack_set_name(input);
            self
        }

Appends an item to workspace_data_sources.

To override the contents of this collection use set_workspace_data_sources.

Specify the Amazon Web Services data sources that you want to be queried in this workspace. Specifying these data sources here enables Amazon Managed Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to read data from these sources. You must still add them as data sources in the Grafana console in the workspace.

If you don't specify a data source here, you can still add it as a data source in the workspace console later. However, you will then have to manually configure permissions for it.

Examples found in repository?
src/client.rs (line 534)
533
534
535
536
        pub fn workspace_data_sources(mut self, input: crate::model::DataSourceType) -> Self {
            self.inner = self.inner.workspace_data_sources(input);
            self
        }

Specify the Amazon Web Services data sources that you want to be queried in this workspace. Specifying these data sources here enables Amazon Managed Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to read data from these sources. You must still add them as data sources in the Grafana console in the workspace.

If you don't specify a data source here, you can still add it as a data source in the workspace console later. However, you will then have to manually configure permissions for it.

Examples found in repository?
src/client.rs (line 543)
539
540
541
542
543
544
545
        pub fn set_workspace_data_sources(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::DataSourceType>>,
        ) -> Self {
            self.inner = self.inner.set_workspace_data_sources(input);
            self
        }

A description for the workspace. This is used only to help you identify this workspace.

Pattern: ^[\\p{L}\\p{Z}\\p{N}\\p{P}]{0,2048}$

Examples found in repository?
src/client.rs (line 549)
548
549
550
551
        pub fn workspace_description(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.workspace_description(input.into());
            self
        }

A description for the workspace. This is used only to help you identify this workspace.

Pattern: ^[\\p{L}\\p{Z}\\p{N}\\p{P}]{0,2048}$

Examples found in repository?
src/client.rs (line 558)
554
555
556
557
558
559
560
        pub fn set_workspace_description(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_workspace_description(input);
            self
        }

The name for the workspace. It does not have to be unique.

Examples found in repository?
src/client.rs (line 563)
562
563
564
565
        pub fn workspace_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.workspace_name(input.into());
            self
        }

The name for the workspace. It does not have to be unique.

Examples found in repository?
src/client.rs (line 571)
567
568
569
570
571
572
573
        pub fn set_workspace_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_workspace_name(input);
            self
        }

Appends an item to workspace_notification_destinations.

To override the contents of this collection use set_workspace_notification_destinations.

Specify the Amazon Web Services notification channels that you plan to use in this workspace. Specifying these data sources here enables Amazon Managed Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to use these channels.

Examples found in repository?
src/client.rs (line 583)
579
580
581
582
583
584
585
        pub fn workspace_notification_destinations(
            mut self,
            input: crate::model::NotificationDestinationType,
        ) -> Self {
            self.inner = self.inner.workspace_notification_destinations(input);
            self
        }

Specify the Amazon Web Services notification channels that you plan to use in this workspace. Specifying these data sources here enables Amazon Managed Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to use these channels.

Examples found in repository?
src/client.rs (line 591)
587
588
589
590
591
592
593
        pub fn set_workspace_notification_destinations(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::NotificationDestinationType>>,
        ) -> Self {
            self.inner = self.inner.set_workspace_notification_destinations(input);
            self
        }

Appends an item to workspace_organizational_units.

To override the contents of this collection use set_workspace_organizational_units.

Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.

Examples found in repository?
src/client.rs (line 603)
599
600
601
602
603
604
605
        pub fn workspace_organizational_units(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.inner = self.inner.workspace_organizational_units(input.into());
            self
        }

Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.

Examples found in repository?
src/client.rs (line 611)
607
608
609
610
611
612
613
        pub fn set_workspace_organizational_units(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.inner = self.inner.set_workspace_organizational_units(input);
            self
        }

The workspace needs an IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from. If you already have a role that you want to use, specify it here. The permission type should be set to CUSTOMER_MANAGED.

Examples found in repository?
src/client.rs (line 616)
615
616
617
618
        pub fn workspace_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.workspace_role_arn(input.into());
            self
        }

The workspace needs an IAM role that grants permissions to the Amazon Web Services resources that the workspace will view data from. If you already have a role that you want to use, specify it here. The permission type should be set to CUSTOMER_MANAGED.

Examples found in repository?
src/client.rs (line 624)
620
621
622
623
624
625
626
        pub fn set_workspace_role_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_workspace_role_arn(input);
            self
        }

Appends an item to authentication_providers.

To override the contents of this collection use set_authentication_providers.

Specifies whether this workspace uses SAML 2.0, Amazon Web Services Single Sign On, or both to authenticate users for using the Grafana console within a workspace. For more information, see User authentication in Amazon Managed Grafana.

Examples found in repository?
src/client.rs (line 636)
632
633
634
635
636
637
638
        pub fn authentication_providers(
            mut self,
            input: crate::model::AuthenticationProviderTypes,
        ) -> Self {
            self.inner = self.inner.authentication_providers(input);
            self
        }

Specifies whether this workspace uses SAML 2.0, Amazon Web Services Single Sign On, or both to authenticate users for using the Grafana console within a workspace. For more information, see User authentication in Amazon Managed Grafana.

Examples found in repository?
src/client.rs (line 644)
640
641
642
643
644
645
646
        pub fn set_authentication_providers(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AuthenticationProviderTypes>>,
        ) -> Self {
            self.inner = self.inner.set_authentication_providers(input);
            self
        }

Adds a key-value pair to tags.

To override the contents of this collection use set_tags.

The list of tags associated with the workspace.

Examples found in repository?
src/client.rs (line 657)
652
653
654
655
656
657
658
659
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            self.inner = self.inner.tags(k.into(), v.into());
            self
        }

The list of tags associated with the workspace.

Examples found in repository?
src/client.rs (line 667)
661
662
663
664
665
666
667
668
669
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.inner = self.inner.set_tags(input);
            self
        }

Consumes the builder and constructs a CreateWorkspaceInput.

Examples found in repository?
src/client.rs (line 430)
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateWorkspace,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateWorkspaceError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::CreateWorkspaceOutput,
            aws_smithy_http::result::SdkError<crate::error::CreateWorkspaceError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more