Class CfnVirtualService

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:46.016Z") @Stability(Stable) public class CfnVirtualService extends CfnResource implements IInspectable
A CloudFormation AWS::AppMesh::VirtualService.

Creates a virtual service within a service mesh.

A virtual service is an abstraction of a real service that is provided by a virtual node directly or indirectly by means of a virtual router. Dependent services call your virtual service by its virtualServiceName , and those requests are routed to the virtual node or virtual router that is specified as the provider for the virtual service.

For more information about virtual services, see Virtual services .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.appmesh.*;
 CfnVirtualService cfnVirtualService = CfnVirtualService.Builder.create(this, "MyCfnVirtualService")
         .meshName("meshName")
         .spec(VirtualServiceSpecProperty.builder()
                 .provider(VirtualServiceProviderProperty.builder()
                         .virtualNode(VirtualNodeServiceProviderProperty.builder()
                                 .virtualNodeName("virtualNodeName")
                                 .build())
                         .virtualRouter(VirtualRouterServiceProviderProperty.builder()
                                 .virtualRouterName("virtualRouterName")
                                 .build())
                         .build())
                 .build())
         .virtualServiceName("virtualServiceName")
         // the properties below are optional
         .meshOwner("meshOwner")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnVirtualService

      protected CfnVirtualService(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnVirtualService

      protected CfnVirtualService(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnVirtualService

      @Stability(Stable) public CfnVirtualService(@NotNull Construct scope, @NotNull String id, @NotNull CfnVirtualServiceProps props)
      Create a new AWS::AppMesh::VirtualService.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The full Amazon Resource Name (ARN) for the virtual service.
    • getAttrMeshName

      @Stability(Stable) @NotNull public String getAttrMeshName()
      The name of the service mesh that the virtual service resides in.
    • getAttrMeshOwner

      @Stability(Stable) @NotNull public String getAttrMeshOwner()
      The AWS IAM account ID of the service mesh owner.

      If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with Shared Meshes .

    • getAttrResourceOwner

      @Stability(Stable) @NotNull public String getAttrResourceOwner()
      The AWS IAM account ID of the resource owner.

      If the account ID is not your own, then it's the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with Shared Meshes .

    • getAttrUid

      @Stability(Stable) @NotNull public String getAttrUid()
      The unique identifier for the virtual service.
    • getAttrVirtualServiceName

      @Stability(Stable) @NotNull public String getAttrVirtualServiceName()
      The name of the virtual service.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Optional metadata that you can apply to the virtual service to assist with categorization and organization.

      Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

    • getMeshName

      @Stability(Stable) @NotNull public String getMeshName()
      The name of the service mesh to create the virtual service in.
    • setMeshName

      @Stability(Stable) public void setMeshName(@NotNull String value)
      The name of the service mesh to create the virtual service in.
    • getSpec

      @Stability(Stable) @NotNull public Object getSpec()
      The virtual service specification to apply.
    • setSpec

      @Stability(Stable) public void setSpec(@NotNull IResolvable value)
      The virtual service specification to apply.
    • setSpec

      @Stability(Stable) public void setSpec(@NotNull CfnVirtualService.VirtualServiceSpecProperty value)
      The virtual service specification to apply.
    • getVirtualServiceName

      @Stability(Stable) @NotNull public String getVirtualServiceName()
      The name to use for the virtual service.
    • setVirtualServiceName

      @Stability(Stable) public void setVirtualServiceName(@NotNull String value)
      The name to use for the virtual service.
    • getMeshOwner

      @Stability(Stable) @Nullable public String getMeshOwner()
      The AWS IAM account ID of the service mesh owner.

      If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes .

    • setMeshOwner

      @Stability(Stable) public void setMeshOwner(@Nullable String value)
      The AWS IAM account ID of the service mesh owner.

      If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes .