blib/lib/Paws/SageMakerRuntime/InvokeEndpoint.pm untested

filter: Statementstmt 0.0% 0 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 30 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::SageMakerRuntime::InvokeEndpoint;
3 use Moose;
4 has Accept => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'Accept');
5 has Body => (is => 'ro', isa => 'Str', required => 1);
6 has ContentType => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'Content-Type');
7 has CustomAttributes => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'X-Amzn-SageMaker-Custom-Attributes');
8 has EndpointName => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'EndpointName', required => 1);
9 has InferenceId => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'X-Amzn-SageMaker-Inference-Id');
10 has TargetContainerHostname => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'X-Amzn-SageMaker-Target-Container-Hostname');
11 has TargetModel => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'X-Amzn-SageMaker-Target-Model');
12 has TargetVariant => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'X-Amzn-SageMaker-Target-Variant');
13  
14 use MooseX::ClassAttribute;
15 class_has _stream_param => (is => 'ro', default => 'Body');
16 class_has _api_call => (isa => 'Str', is => 'ro', default => 'InvokeEndpoint');
17 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/endpoints/{EndpointName}/invocations');
18 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
19 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::SageMakerRuntime::InvokeEndpointOutput');
20 1;
21  
22 ### main pod documentation begin ###
23  
24 =head1 NAME
25  
26 Paws::SageMakerRuntime::InvokeEndpoint - Arguments for method InvokeEndpoint on L<Paws::SageMakerRuntime>
27  
28 =head1 DESCRIPTION
29  
30 This class represents the parameters used for calling the method InvokeEndpoint on the
31 L<Amazon SageMaker Runtime|Paws::SageMakerRuntime> service. Use the attributes of this class
32 as arguments to method InvokeEndpoint.
33  
34 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to InvokeEndpoint.
35  
36 =head1 SYNOPSIS
37  
38 my $runtime.sagemaker = Paws->service('SageMakerRuntime');
39 my $InvokeEndpointOutput = $runtime . sagemaker->InvokeEndpoint(
40 Body => 'BlobBodyBlob',
41 EndpointName => 'MyEndpointName',
42 Accept => 'MyHeader', # OPTIONAL
43 ContentType => 'MyHeader', # OPTIONAL
44 CustomAttributes => 'MyCustomAttributesHeader', # OPTIONAL
45 InferenceId => 'MyInferenceId', # OPTIONAL
46 TargetContainerHostname => 'MyTargetContainerHostnameHeader', # OPTIONAL
47 TargetModel => 'MyTargetModelHeader', # OPTIONAL
48 TargetVariant => 'MyTargetVariantHeader', # OPTIONAL
49 );
50  
51 # Results:
52 my $Body = $InvokeEndpointOutput->Body;
53 my $ContentType = $InvokeEndpointOutput->ContentType;
54 my $CustomAttributes = $InvokeEndpointOutput->CustomAttributes;
55 my $InvokedProductionVariant =
56 $InvokeEndpointOutput->InvokedProductionVariant;
57  
58 # Returns a L<Paws::SageMakerRuntime::InvokeEndpointOutput> object.
59  
60 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
61 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/runtime.sagemaker/InvokeEndpoint>
62  
63 =head1 ATTRIBUTES
64  
65  
66 =head2 Accept => Str
67  
68 The desired MIME type of the inference in the response.
69  
70  
71  
72 =head2 B<REQUIRED> Body => Str
73  
74 Provides input data, in the format specified in the C<ContentType>
75 request header. Amazon SageMaker passes all of the data in the body to
76 the model.
77  
78 For information about the format of the request body, see Common Data
79 Formats-Inference
80 (https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html).
81  
82  
83  
84 =head2 ContentType => Str
85  
86 The MIME type of the input data in the request body.
87  
88  
89  
90 =head2 CustomAttributes => Str
91  
92 Provides additional information about a request for an inference
93 submitted to a model hosted at an Amazon SageMaker endpoint. The
94 information is an opaque value that is forwarded verbatim. You could
95 use this value, for example, to provide an ID that you can use to track
96 a request or to provide other metadata that a service endpoint was
97 programmed to process. The value must consist of no more than 1024
98 visible US-ASCII characters as specified in Section 3.3.6. Field Value
99 Components (https://tools.ietf.org/html/rfc7230#section-3.2.6) of the
100 Hypertext Transfer Protocol (HTTP/1.1).
101  
102 The code in your model is responsible for setting or updating any
103 custom attributes in the response. If your code does not set this value
104 in the response, an empty value is returned. For example, if a custom
105 attribute represents the trace ID, your model can prepend the custom
106 attribute with C<Trace ID:> in your post-processing function.
107  
108 This feature is currently supported in the AWS SDKs but not in the
109 Amazon SageMaker Python SDK.
110  
111  
112  
113 =head2 B<REQUIRED> EndpointName => Str
114  
115 The name of the endpoint that you specified when you created the
116 endpoint using the CreateEndpoint
117 (https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html)
118 API.
119  
120  
121  
122 =head2 InferenceId => Str
123  
124 If you provide a value, it is added to the captured data when you
125 enable data capture on the endpoint. For information about data
126 capture, see Capture Data
127 (https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-data-capture.html).
128  
129  
130  
131 =head2 TargetContainerHostname => Str
132  
133 If the endpoint hosts multiple containers and is configured to use
134 direct invocation, this parameter specifies the host name of the
135 container to invoke.
136  
137  
138  
139 =head2 TargetModel => Str
140  
141 The model to request for inference when invoking a multi-model
142 endpoint.
143  
144  
145  
146 =head2 TargetVariant => Str
147  
148 Specify the production variant to send the inference request to when
149 invoking an endpoint that is running two or more variants. Note that
150 this parameter overrides the default behavior for the endpoint, which
151 is to distribute the invocation traffic based on the variant weights.
152  
153 For information about how to use variant targeting to perform a/b
154 testing, see Test models in production
155 (https://docs.aws.amazon.com/sagemaker/latest/dg/model-ab-testing.html)
156  
157  
158  
159  
160 =head1 SEE ALSO
161  
162 This class forms part of L<Paws>, documenting arguments for method InvokeEndpoint in L<Paws::SageMakerRuntime>
163  
164 =head1 BUGS and CONTRIBUTIONS
165  
166 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
167  
168 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
169  
170 =cut
171