create_view
async
¶
create_view(
view_name: ViewName,
*,
config_overrides: Optional[AsyncResourceExplorer2ClientConfig] = None,
client_token: Optional[str] = None,
included_properties: Optional[IncludedPropertyList] = None,
scope: Optional[str] = None,
filters: Optional[SearchFilter] = None,
tags: Optional[TagMap] = None,
) -> CreateViewOutput
Creates a view that users can query by using the Search operation. Results from queries that you make using this view include only resources that match the view's Filters. For more information about Amazon Web Services Resource Explorer views, see Managing views in the Amazon Web Services Resource Explorer User Guide.
Only the principals with an IAM identity-based policy that grants Allow to the Search action on a Resource with the Amazon resource name (ARN) of this view can Search using views you create with this operation.
Parameters:
-
client_token(Optional[str], default:None) –This value helps ensure idempotency. Resource Explorer uses this value to prevent the accidental creation of duplicate versions. We recommend that you generate a UUID-type value to ensure the uniqueness of your views.
-
view_name(ViewName) –The name of the new view. This name appears in the list of views in Resource Explorer.
The name must be no more than 64 characters long, and can include letters, digits, and the dash (-) character. The name must be unique within its Amazon Web Services Region.
-
included_properties(Optional[IncludedPropertyList], default:None) –Specifies optional fields that you want included in search results from this view. It is a list of objects that each describe a field to include.
The default is an empty list, with no optional fields included in the results.
-
scope(Optional[str], default:None) –The root ARN of the account, an organizational unit (OU), or an organization ARN. If left empty, the default is account.
-
filters(Optional[SearchFilter], default:None) –An array of strings that specify which resources are included in the results of queries made using this view. When you use this view in a Search operation, the filter string is combined with the search's
QueryStringparameter using a logicalANDoperator.For information about the supported syntax, see Search query reference for Resource Explorer in the Amazon Web Services Resource Explorer User Guide.
This query string in the context of this operation supports only filter prefixes with optional operators. It doesn't support free-form text. For example, the string
region:us* service:ec2 -tag:stage=prodincludes all Amazon EC2 resources in any Amazon Web Services Region that begins with the lettersusand is not tagged with a keyStagethat has the valueprod. -
tags(Optional[TagMap], default:None) –Tag key and value pairs that are attached to the view.
Raises:
-
AccessDeniedException–The credentials that you used to call this operation don't have the minimum required permissions.
-
ConflictException–If you attempted to create a view, then the request failed because either you specified parameters that didn’t match the original request, or you attempted to create a view with a name that already exists in this Amazon Web Services Region.
If you attempted to create an index, then the request failed because either you specified parameters that didn't match the original request, or an index already exists in the current Amazon Web Services Region.
If you attempted to update an index type to
AGGREGATOR, then the request failed because you already have anAGGREGATORindex in a different Amazon Web Services Region. -
InternalServerException–The request failed because of internal service error. Try your request again later.
-
ServiceQuotaExceededException–The request failed because it exceeds a service quota.
-
ThrottlingException–The request failed because you exceeded a rate limit for this operation. For more information, see Quotas for Resource Explorer.
-
UnauthorizedException–The principal making the request isn't permitted to perform the operation.
-
ValidationException–You provided an invalid value for one of the operation's parameters. Check the syntax for the operation, and try again.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_resource_explorer_2/_services/async_resource_explorer2.py
1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 | |