Struct aws_sdk_computeoptimizer::types::builders::ScopeBuilder
source · #[non_exhaustive]pub struct ScopeBuilder { /* private fields */ }
Expand description
A builder for Scope
.
Implementations§
source§impl ScopeBuilder
impl ScopeBuilder
sourcepub fn name(self, input: ScopeName) -> Self
pub fn name(self, input: ScopeName) -> Self
The name of the scope.
The following scopes are possible:
-
Organization
- Specifies that the recommendation preference applies at the organization level, for all member accounts of an organization. -
AccountId
- Specifies that the recommendation preference applies at the account level, for all resources of a given resource type in an account. -
ResourceArn
- Specifies that the recommendation preference applies at the individual resource level.
sourcepub fn set_name(self, input: Option<ScopeName>) -> Self
pub fn set_name(self, input: Option<ScopeName>) -> Self
The name of the scope.
The following scopes are possible:
-
Organization
- Specifies that the recommendation preference applies at the organization level, for all member accounts of an organization. -
AccountId
- Specifies that the recommendation preference applies at the account level, for all resources of a given resource type in an account. -
ResourceArn
- Specifies that the recommendation preference applies at the individual resource level.
sourcepub fn get_name(&self) -> &Option<ScopeName>
pub fn get_name(&self) -> &Option<ScopeName>
The name of the scope.
The following scopes are possible:
-
Organization
- Specifies that the recommendation preference applies at the organization level, for all member accounts of an organization. -
AccountId
- Specifies that the recommendation preference applies at the account level, for all resources of a given resource type in an account. -
ResourceArn
- Specifies that the recommendation preference applies at the individual resource level.
sourcepub fn value(self, input: impl Into<String>) -> Self
pub fn value(self, input: impl Into<String>) -> Self
The value of the scope.
If you specified the name
of the scope as:
-
Organization
- Thevalue
must beALL_ACCOUNTS
. -
AccountId
- Thevalue
must be a 12-digit Amazon Web Services account ID. -
ResourceArn
- Thevalue
must be the Amazon Resource Name (ARN) of an EC2 instance or an Auto Scaling group.
Only EC2 instance and Auto Scaling group ARNs are currently supported.
sourcepub fn set_value(self, input: Option<String>) -> Self
pub fn set_value(self, input: Option<String>) -> Self
The value of the scope.
If you specified the name
of the scope as:
-
Organization
- Thevalue
must beALL_ACCOUNTS
. -
AccountId
- Thevalue
must be a 12-digit Amazon Web Services account ID. -
ResourceArn
- Thevalue
must be the Amazon Resource Name (ARN) of an EC2 instance or an Auto Scaling group.
Only EC2 instance and Auto Scaling group ARNs are currently supported.
sourcepub fn get_value(&self) -> &Option<String>
pub fn get_value(&self) -> &Option<String>
The value of the scope.
If you specified the name
of the scope as:
-
Organization
- Thevalue
must beALL_ACCOUNTS
. -
AccountId
- Thevalue
must be a 12-digit Amazon Web Services account ID. -
ResourceArn
- Thevalue
must be the Amazon Resource Name (ARN) of an EC2 instance or an Auto Scaling group.
Only EC2 instance and Auto Scaling group ARNs are currently supported.
Trait Implementations§
source§impl Clone for ScopeBuilder
impl Clone for ScopeBuilder
source§fn clone(&self) -> ScopeBuilder
fn clone(&self) -> ScopeBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ScopeBuilder
impl Debug for ScopeBuilder
source§impl Default for ScopeBuilder
impl Default for ScopeBuilder
source§fn default() -> ScopeBuilder
fn default() -> ScopeBuilder
source§impl PartialEq for ScopeBuilder
impl PartialEq for ScopeBuilder
source§fn eq(&self, other: &ScopeBuilder) -> bool
fn eq(&self, other: &ScopeBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ScopeBuilder
Auto Trait Implementations§
impl Freeze for ScopeBuilder
impl RefUnwindSafe for ScopeBuilder
impl Send for ScopeBuilder
impl Sync for ScopeBuilder
impl Unpin for ScopeBuilder
impl UnwindSafe for ScopeBuilder
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
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 more